TOKYO — Sony returned to profit for the first time in five years in fiscal 2012, boosted by a weaker yen plus sales of key real estate and other assets, execs announced Thursday.

Net profit for the financial year, which ended March 31, hit 42.8 billion yen ($436 million), prexy Kazuo Hirai’s goal since taking charge last spring. Much remains to be done, however, since the core electronics biz — including its TV unit, which is bleeding red ink — is still lagging behind.

Sony’s movie biz recorded gains year-on, with sales up 11.4% to $7.415 billion and operating profit surging 40.1% to $484 million. Among contributors to the sterling results were a weaker yen against the dollar and strong B.O. for “Skyfall” and “The Amazing Spider-Man.” Higher subscription rates for SPE’s TV networks and healthier sales numbers for U.S. made-for-cable programming also brightened the profit picture.

The games units, however, suffered a 12.2% year-on sales drop to $7.15 billion, while operating profit plunged 94% to $17.2 million, as demand for the company’s PlayStation 3 hardware and PlayStation Portable hardware and software continued to slide. The anticipated launch of the new PlayStation 4 console is expected to kick-start sales again, though profits will be hit by R&D and marketing expenses for the PS4.

One bright spot is Sony’s smartphone biz, with the new Xperia Z phone recording brisk sales since its January launch. Hirai has targeted mobile devices, as well as the gaming and digital imaging units, as key profit centers for the future.

For the current fiscal year, ending in March 2014, Sony foresees the same $2.33 billion in operating profit as last year, while net profit is expected to rise 16.2% to $506 million. Sony says that it is counting on its pictures, music and financial services units to continue generating steady profits, while finally bringing its electronics biz into the black, lead by smartphones.