BlackBerry Ltd (NASDAQ:BBRY) released its latest earnings report before opening bell this morning, posting a breakeven result on an adjusted basis on $352 million in non-GAAP revenue and $334 million in GAAP revenue. Analysts had been expecting adjusted losses of 5 cents per share and $392 million in revenue. In last year’s second quarter, the company reported $490 million in revenue.

BlackBerry BBRY

BlackBerry’s per-share losses widen

BlackBerry’s GAAP losses declined to 71 cents per share from 24 cents per share this year. Non-GAAP software and services revenue was $156 million, while GAAP software and services revenue amounted to $138 million. Software and services made up about 44% of total revenue, while service access fees consisted of 26% and mobility solutions made up 30%. The company said it had about 3,000 enterprise customer wins during the second quarter, and about 81% of the software and services revenue in the second quarter was recurring.

“We are reaching an inflection point with our strategy,” BlackBerry Executive Chairman and CEO John Chen said in a statement. “Our financial foundation is strong, and our pivot to software is taking hold. In Q2, we more than doubled our software revenue year over year and delivered the highest gross margin in the company’s history. We also completed initial shipments of BlackBerry Radar, an end-to end asset tracking system, and signed a strategic licensing agreement to drive global growth in our BBM consumer business.”

Also this morning, the company said it has struck a licensing deal with PT BB Merah Putih, a telecom joint venture, to manufacture, distribute and promote its phones and services in Indonesia.

BlackBerry raises guidance

BlackBerry also increased its guidance for full-year adjusted earnings to be between breakeven and a loss of 5 cents per share. Consensus currently stands at a loss of 16 cents per share for the full year. Chen said the company is still on track to deliver 30% growth in software and services revenue for fiscal 2017.

Shares of BlackBerry initially surged by more than 6%, putting the stock on track to open at its highest level since January. However, the stock pulled back a bit after the headline surprise. As of this writing, the shares are up 3.43% at $8.15 in premarket trading.