BlackBerry's turnaround is complete

Could BlackBerry make a comeback?
Could BlackBerry make a comeback?

This isn't Barack Obama or Kim Kardashian West's BlackBerry anymore. And investors couldn't be happier.

BlackBerry stock surged 10% Wednesday after the Canadian tech company reported solid demand for its software.

Yes, software.

BlackBerry (BB) announced last year that it would stop making its trademark phones -- once so popular that they were dubbed CrackBerries and were loved by politicians and celebrities like Obama and Kardashian West.

Instead, BlackBerry decided to outsource the production of hardware running on BlackBerry's operating system to other smartphone makers around the world. That move is clearly paying off.

The company now generates 85% of its sales from software and services. In addition to licensing software to other smartphone makers, BlackBerry has emerged as a big player in connected cars and the Internet of Things thanks to its QNX software unit.

These are much more profitable lines of business than the cutthroat world of making hardware -- where margins tend to be razor-thin. BlackBerry said Wednesday that its gross margins improved to a record high of 77% in the quarter.

The stock is up nearly 75% this year. Some doubted BlackBerry could survive when things looked particularly bleak. I was one of them, to be honest.

But the recent gains are a clear sign that Wall Street loves the turnaround plan of CEO John Chen, who took over in November 2013.

At that time, BlackBerry was reeling. Sales were falling, losses were mounting, and the company was burning cash. It was obvious the company was too late to the touchscreen smartphone game.

Related: BlackBerry's big comeback

People no longer found the QWERTY keyboards on BlackBerrys to be as useful, and the company lost market share to companies like Samsung (SSNLF), which made phones running Google's (GOOGL) Android operating system, and Apple (AAPL) and its iPhone.

But Chen quickly embraced Android and de-emphasized BlackBerry's own operating system. Under his watch, BlackBerry launched several phones that ran Android -- and some BlackBerry-branded phones now made by other companies run Android, too.

Meanwhile, BlackBerry has also benefited from more car companies using its own software.

BlackBerry has stepped up its efforts to make QNX a bigger part of the automotive market under Chen as well. QNX now powers the Sync 3 smart entertainment and navigation systems in Ford (F) cars.

BlackBerry is also partnering with chipmaker Qualcomm (QCOM) on more technology for connected cars. (Qualcomm recently settled with BlackBerry on a licensing dispute and agreed to pay it $940 million.)

BlackBerry has deals with big automotive parts suppliers like Magna (MGA) and Bosch, and it just announced a deal last week with Denso, the largest supplier to Toyota (TM).

And BlackBerry may be just getting started. In an interview with CNNMoney on Wednesday morning, Chen said he wants the company to partner with even more auto companies, particularly the suppliers.

The goal? "We want to make BlackBerry ubiquitous in the auto sector," Chen said. To that end, Chen is even going to the North American International Auto Show in Detroit in January for the first time and will deliver a keynote address there.

Chen said the company will also keep focusing on cybersecurity products for big businesses and governments too. The stock enjoyed a pop earlier this year after the WannaCry ransomware attack as investors realized BlackBerry's security biz could benefit.

Related: BlackBerry soars after WannaCry attack

But BlackBerry isn't abandoning the product that made it famous.

Chen said the company has five contract manufacturers around the world making phones running on some form of BlackBerry software -- and BlackBerry gets royalties on every phone that's shipped.

The company is also looking to expand the use of its software beyond the phone.

Chen noted that BlackBerry announced a patent licensing deal with Timex in September. Timex will pay royalties to BlackBerry, and Chen said Timex could develop a smartwatch running on BlackBerry's Internet of Things technology.

The Timex deal is fitting. Much like the ad slogan for the famous watchmaker, BlackBerry has taken a licking but kept on ticking. And as long as BlackBerry collects big royalty checks, its sales may keep ticking higher.

CNNMoney Sponsors