BlackBerry sank deeper into a jam in the most recent quarter, posting a staggering $4.4 billion loss for the three months ended Nov. 30, 2013, as the company’s smartphone sales continued to crater.

Separately, BlackBerry announced a five-year outsourced manufacturing contract with Taiwan’s Foxconn Technology Group. The pact will focus initially on producing smartphones for Indonesia and other emerging markets.

Investors saw a glimmer of hope with the Foxconn deal, sending BlackBerry shares up as high as 17% Friday. The stock closed at $7.22 per share for the day, up 15.5% — but that’s still well off a 52-week high of $18.32 per share (and a fraction of its all-time high of $148.42 in June 2008). Analysts said key details of the Foxconn partnership, including the pricing of the devices, would have to be fleshed out.

“In our view, the company is in a holding pattern until we see the fruits of this new relationship with Foxconn,” Wedge Partners analyst Brian Blair wrote in a note.

BlackBerry Q3 sales of $1.2 billion were down 25% sequentially, from $1.6 billion in the previous quarter. The company recognized revenue on 1.9 million smartphones in the third quarter, nearly half the 3.7 million units in the previous quarter.

The quarterly net loss included charges of $4.6 billion associated with write-downs of long-term assets, inventory and supply commitments as well as previously announced restructuring under which BlackBerry is cutting 4,500 jobs or 40% of its workforce. Excluding charges, BlackBerry reported a $354 million adjusted loss from continuing operations for the third quarter.

BlackBerry, established in 1999 as Research in Motion, was a successful pioneer in smart mobile devices. But the Canadian company has been unable to compete with Apple’s iPhone and the app ecosystem it established, and the rise of phones running Google’s Android operating system put another huge dent in BlackBerry’s market share.

The “most immediate challenge for the company is how to transition the devices operations to a more profitable business model,” John Chen, executive chairman and interim CEO of BlackBerry, said in announcing the results.

This fall, BlackBerry sought to go private in a $4.7 billion deal with a consortium led by Fairfax Financial Holdings. But last month the company was forced to abandoned the plan, with Fairfax and others investing $1 billion in BlackBerry instead. The company ousted CEO Thorsten Heins and hired Chen, formerly CEO of database software vendor Sybase, as interim chief.

Chen said the Foxconn partnership “allows BlackBerry to focus on what we do best — iconic design, world-class security, software development and enterprise mobility management — while simultaneously addressing fast-growing markets leveraging Foxconn’s scale and efficiency that will allow us to compete more effectively.”

Under the partnership, Foxconn will manufacture products for BlackBerry at facilities in Indonesia and Mexico.