Ego and pride can be the biggest enemies of a tech company with a core business facing a massive decline due to unchangeable industry trends. They can lead the firm to stubbornly maintain the status quo, or something resembling it, rather than face the music and make big changes.

While Thorsten Heins was its CEO, it often felt like BlackBerry (BBRY)  fit squarely into the former category. During the tenure of John Chen, however, who took over in late 2013, there has been a healthy realism about where the company's smartphone and service access fee (SAF) businesses are headed, and what it needs to do to have some kind of profitable future. BlackBerry's latest earnings report and guidance, though not exactly stellar, show how some of Chen's moves are paying off.

BlackBerry reported fiscal third-quarter (November quarter) adjusted revenue of $301 million and earnings per share of 2 cents. Revenue missed a consensus analyst estimate of $326 million, but -- thanks to big cost cuts -- earnings topped a consensus for breakeven EPS. The company also forecast it will see positive adjusted EPS for the whole of fiscal 2017 (ends in February). That's improved from prior guidance of breakeven to a loss of 5 cents per shar, and favorable to a consensus for a loss of 1 cent per share.

Shares were up 0.8% on Tuesday afternoon, but they're still down more than 16% on the year.

With its Priv Android phone a niche product and the company having decided in September to end internal phone development in favor of licensing its brand and software to others, it's no surprise that BlackBerry's Mobility Solutions (phone) unit remained in free-fall in the third quarter. Revenue fell 33% sequentially and 68% annually to $70 million, and would've been even worse if not for $8 million in professional services revenue.

BlackBerry recently struck a deal with Chinese phone maker TCL, already responsible for producing the company's DTEK50 and DTEK60 Android phones, through which TCL will be the "exclusive global manufacturer and distributor" of BlackBerry-branded phones outside of Indonesia and South Asia. An Indonesian phone manufacturing joint venture was set up in September with an affiliate of local carrier Telkomsel, and a deal with an Indian firm is in the pipeline.

The company's high-margin SAF business, which is tied to a steadily declining phone user base, also continues to nosedive. Its sales fell 26% sequentially and 61% annually to $67 million, and are forecast to drop another 25% sequentially in the fiscal fourth quarter

But BlackBerry's software and services reporting segment, which has clearly been Chen's priority since taking over the company, is in better shape. Sales rose 4% sequentially to $163 million, and are now equal to 55% of total revenue. The momentum of BlackBerry's enterprise mobility software/services offerings and its QNX operating system, which powers many in-car infotainment systems, is fueling the business.

BlackBerry also notes its total software/services revenue rose 49% annually if one excludes patent licensing revenue, which was significant a year ago due to a major licensing deal with Cisco. But it's worth noting that Blackberry's figure also includes the aforementioned phone services revenue, and benefits from BlackBerry's $425 million acquisition of enterprise mobility management (EMM) software vendor Good Technology, which closed in November 2015. Thus this growth rate might drop in Q4.

Nonetheless, BlackBerry is guiding for total software/services revenue to be up 30% in fiscal 2017. It shouldn't be long before the business accounts for over two-thirds of sales. And as the Good acquisition and recently-announced plans to invest $75 million in a QNX autonomous driving software development and testing hub show, it's not nervous about using its sizable cash balance -- currently $1.6 billion, partly offset by $605 million in debt -- to invest in the business.

Aggressive cost-cutting efforts -- aimed in large part at the phone and SAF units -- are the other part of Chen's attempts to stabilize BlackBerry. Adjusted gross margin rose to 70% in Q3 from 62% in Q2 and 45% a year ago, thanks to a 15-point sequential improvement in Mobility Solutions GM to 41% and a mix shift towards software/services. In spite of the Good acquisition, R&D spend fell 25% annually to $75 million, and sales, marketing and admin spend fell 18% to $145 million.

All of this doesn't necessarily guarantee a profitable, cash flow-positive future. The EMM space remains hotly competitive: While research firm Gartner places BlackBerry in its EMM "Leaders" quadrant, IBM (IBM - Get Report) , MobileIron (MOBL - Get Report) , Citrix Systems (CTXS - Get Report) and VMware's (VMW - Get Report) AirWatch unit are also there. And QNX faces direct competition from Alphabet/Google's (GOOGL - Get Report) Android Auto operating system and indirect competition from Apple's  (AAPL - Get Report) CarPlay interface, which works with paired iPhones. In addition, Apple is reportedly developing its own car OS with the help of poached QNX engineers.

But compared with three years ago, there is some real hope that a successful turnaround can be pulled off. Swallowing your pride and facing reality can do that for you.

Alphabet and Apple are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells GOOGL or AAPL? Learn more now.