Sony and Panasonic on Thursday posted quarterly profits as the pair try to put years of losses behind them, but analysts warned that the firms still had work to do in overhauling their bloated businesses.

Japan's electronics sector has been battered by fierce competition from lower-cost rivals, a shrinking domestic market and huge losses in the television business.

A sharp drop in the yen since late 2012 has offered a lifeline by inflating the value of profits repatriated from overseas, as Sony, Panasonic and smaller rival Sharp launched painful restructuring to slim down their vast operations. Sharp reports earnings on Friday.

But the impact of the weak yen is fading, and the industry giants had more work to do on reinventing themselves, analysts said.

"Japanese electronics makers can't expect much from the impact of a weak yen this fiscal year," said Yasuo Imanaka, an analyst at Rakuten Securities.

"Sony is now heavily relying on its entertainment, music and insurance businesses.

"They have to speed up the pace of their restructuring, which is crucial for survival. Otherwise, investors are going to lose patience."

On Thursday, Sony posted a surprise 26.8 billion yen ($261 million) net profit for the three months through June, reversing a year-earlier loss, with sales up about six percent as gamers flocked to the newest instalment of its PlayStation games console.

The consumer electronics giant also said box-office hits, including "The Amazing Spider-Man 2", boosted results at its movie unit, which includes a Hollywood studio.

Sony more than doubled operating profit in its television segment thanks to strong sales of flat-screen televisions in Asia and Europe.


'Decade of television losses'

Sony, which has been working to repair its television business for years, is still expecting a loss in the current fiscal year.

The firm lost $1.26 billion last year, as it blamed the whopping shortfall on costs tied to its exit from the personal computer business.

"The chances are growing that we'll return to profitability in the television sector," Sony Chief Financial Officer Kenichiro Yoshida said Thursday.

"We've got to achieve that goal no matter what -- we've suffered a decade of losses" in that business, he added.

Panasonic, meanwhile, said its net profit for the quarter hit 37.93 billion yen, down from 107.83 billion yen last year when it logged a big one-off gain from a pension scheme change, as sales edged up 1.5 percent.

The firm said it expects to log a 140 billion yen net profit in the current fiscal year.

Compared with its rivals, Panasonic appeared to be making more headway in shaking up its business and staying out of the red, said Keita Wakabayashi, analyst with Mito Securities in Tokyo.

"Panasonic is more stable than its competition and it now seems to be on course for a steady recovery," Wakabayashi added.

Panasonic separately announced Thursday it has signed a deal with US electric car maker Tesla to build a huge battery-making plant in the United States.

The Japanese firm, a major producer of lithium ion batteries, did not say how much it would invest in the proposed site, known as the Gigafactory, but local media has previously reported it would pump in as much as 30 billion yen.

Also Thursday, Finnish mobile giant Nokia said it had agreed to buy some of Panasonic's wireless network business, but did not supply details on the price tag.