BlackBerry's quarterly profit topped analysts' estimates, helped by a sharp rise in fees for licensing and using its technologies as it develops more software and solutions for customers.
Revenue from its licensing and intellectual property division, which includes handing out licenses for BlackBerry's existing patents to other companies, rose 71% to $99m in the fourth quarter.
The company dominated the smartphone market nearly a decade ago before losing out to Apple's iPhones and Android devices.
It has been trying to win investor confidence and make money by selling software to manage mobile devices to corporations and government agencies.
Revenue from BlackBerry's technology and solutions segment, which includes software used in next-generation autonomous cars, rose nearly 20%.
The segment houses QNX software, which is used in more than 120 million cars worldwide, and allows carmakers to offer a range of features such as infotainment, connectivity, in-car network security, advanced driver assistance system and over-the-air software update platform.
The Ontario-based company's net profit was $51m, or 8 cents per share, in the quarter ended February 28, compared with a loss of $10m, or 6 cents per share, a year ago.
Excluding one-time items, the company earned 11 cents per share, beating the average analyst estimate of 6 cents, according to IBES data from Refinitiv.
The company said its revenue rose 9% to $255m.