BlackBerry shares soared Thursday after the company posted a stronger-than-expected profit of 5 cents per share.

Shares of Blackberry were up more than 14 percent, trading at $10.65 a share. The stock is up more than 50 percent this year.

Before the opening bell, the Canadian-based company reported fiscal second-quarter earnings of 5 cents per share on revenue of $249 million. That beat analysts' estimates of a break-even quarter on revenue of $220 million, according to Thomson Reuters.

Its software and services business saw a record for the quarter, increasing 26 percent year over year. The company said it expects to achieve software and services revenue growth in the range of 10 percent to 15 percent and profitability for the full year.

"We are building some very solid fundamentals in the business," CEO John Chen told CNBC's "Squawk Alley." "We're coming around. We've become a good software company [with] good earnings."

Last year, the company decided to stop making its trademark BlackBerry smartphone, license the technology to others to focus on software.

Chen said there are still "road bumps" along the way in building the business but "no so much that it will get us off the track. ... I'm comfortable with where we are as a company."

BlackBerry sees full-year revenue in the range of $920 million to $950 million. Estimates were calling for $924.4 million in fiscal 2018.