BlackBerry (BBRY) logged a massive third-quarter loss of $4.4 billion on Friday due to hefty writedowns and impairment charges as the smartphone maker continues to reel.

BlackBerry, whose beaten-down shares ticked higher in premarket action, also unveiled a five-year deal with Foxconn to make phones in emerging markets like Indonesia.

The smartphone maker has seen its market share crumble in recent years amid heavy competition from Apple (AAPL) and Google (GOOG) devices.

A tentative $4.7 billion sale earlier this year to billionaire Prem Watsa imploded. No other bidders have emerged, especially after the Canadian government rejected a buyout effort by Chinese PC maker Lenovo Group due to national-security concerns.

The Canadian company said it lost $4.4 billion, or $8.37 a share, last quarter, compared with a loss of $965 million, or $1.84 a share, a year earlier.

The red ink was driven by non-cash, pre-tax charges of $4.6 billion tied to long-lived assets, inventory and supply commitments as well as restructuring and strategic moves.

Excluding charges, BlackBerry posted an adjusted loss from continuing operations of $354 million, or 67 cents, compared with a loss of $248 million, or 47 cents a share, a year earlier.

Revenue tumbled 56% to $1.2 billion. The company recognized revenue on about 1.9 million BlackBerry smartphones, down from 3.7 million in the previous quarter.

“With the operational and organizational changes we have announced, BlackBerry has established a clear roadmap that will allow it to target a return to improved financial performance in the coming year,” BlackBerry CEO John Chen said in a statement. 

During a conference call with analysts, Chen said he believes BlackBerry will return to profitability by fiscal 2016. 

“The most immediate challenge for the company is how to transition the devices operations to a more profitable business model," he said.

Meanwhile, BlackBerry announced a five-year strategic partnership with Foxconn, the world’s largest maker of electronic products and components. The deal calls for Foxconn to jointly develop and manufacture certain new BlackBerry devices and manage the inventory tied to those devices.

The early focus of the Foxconn deal will be a smartphone for Indonesia and other emerging markets in early 2014.

“BlackBerry is an iconic brand with great technology and a loyal international fan base,” said Terry Gou, Foxconn’s founder and chairman.

BlackBerry said it had cash and investments of $3.2 billion on its balance sheet at the end of the third quarter, up from $2.6 billion at the end of the previous quarter.

Looking ahead, BlackBerry declined to offer specific financial guidance, only saying it expects to maintain its “strong cash position” and further cut costs.

Shares of Waterloo, Ontario-based BlackBerry rose 2.4% to $6.40 in premarket trading Friday morning. The company's shaves have slumped 47% so far this year and 55% over the past 12 months. 

Follow Matt Egan on Twitter @MattMEgan5