BlackBerry's software bet continues to pay off

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

The amazing turnaround for BlackBerry continues.

Shares of BlackBerry (BB) were up in early trading Wednesday after the company reported earnings and sales that topped forecasts, led by growth in its software and services business.

BlackBerry has made the transition from a struggling hardware company to a successful software and licensing company under the leadership of CEO John Chen, who took over in late 2013.

It had to adapt since sales of its once iconic phones were plunging. BlackBerry couldn't keep up in a smartphone market dominated by Apple's (AAPL) iPhone and Google (GOOGL) Android phones made by the likes of Samsung (SSNLF).

But hardware now accounts for less than 1% of BlackBerry's total sales. The company is making a big chunk of its money from licensing deals for other smartphone makers that run BlackBerry's software.

BlackBerry announced in 2016 that it would stop making its trademark phones -- once so popular that they were dubbed CrackBerries and were loved by Barack Obama, Kim Kardashian West and other superfamous people.

Instead, BlackBerry is outsourcing the production of BlackBerry-branded phones. The company is focusing more on making apps that are used on Android phones.

BlackBerry even has a new deal with Microsoft (MSFT) that will make it easier and more secure for more businesses to use Microsoft's cloud-based Office 365 apps on mobile devices.

Related: BlackBerry's turnaround is complete

"Partnerships are a big part of our strategy, especially when you are in the software business. It's what you have to do," Chen said in an interview with CNNMoney Wednesday.

The company has made a big bet on connected cars as well. Jaguar Land Rover recently announced it will use BlackBerry's QNX software for navigation and so-called infotainment services in new cars. Ford is another top BlackBerry automotive customer too.

BlackBerry also launched a cybersecurity tool called Jarvis at the Detroit Auto Show that will help automakers find security flaws in their vehicles. Chen said BlackBerry will continue to focus on the automotive market as a key driver (pardon the pun) for growth.

"The car is no longer just about bending sheets of metal. It's about code," Chen said.

Wall Street clearly loves the new BlackBerry as well. The stock is now up 14% this year despite the recent volatility in the broader market and the tech sector in particular. Investors are probably happy to hear that Chen isn't going anywhere anytime soon either.

BlackBerry announced earlier this month that Chen's contract as CEO has been extended through November 2023.

CNNMoney Sponsors