Victoria police chief commissioner Graham Ashton told local media the 25-year-old man from Sri Lanka was released from the Monash Medical Centre in Clayton on Wednesday (May 31) and bought the shortly after.
"He was certainly at the cockpit door, seeking entry to the door, holding this device", he said. The crew gave them seatbelts to hog-tie him before the plane made an emergency landing at Melbourne airport.
"The objective in any serious incident like this is to get every member of the crew, every passenger off the plane safely, and that is what was able to be achieved". Malaysia's Deputy Transport Minister Abdul Aziz bin Kaprawi described it as a "powerbank", the AFP agency said.
"The circumstances are that the gentleman stated he had a device, and he had a piece of equipment which, for all intents and purposes, is something that everybody would be carrying around on a daily basis", the police officer said.
The man who allegedly caused a mid-air bomb scare over Melbourne will need urgent mental health help and was suffering psychiatric illness, a court has heard.
The unnamed man was charged with making threats and false claims, and endangering an aircraft's safety - offences that carry a 10-year sentence.
Sri Lankan man Manodh Marks, who has been living at Dandenong on a student visa, appeared at Melbourne Magistrates Court on Thursday afternoon.
The Malaysia Airlines plane returned to Australia after the man threatened to detonate a bomb and attempted to enter the cockpit before he was tackled and tied up by passengers, police said Thursday.
One of the passengers aboard the plane, Andrew Leoncelli, said that the attacker was extremely "agitated".More news: Pittsburgh Penguins vs. Nashville Predators - 6/3/17 NHL Pick, Odds, and Prediction
More news: Vladimir Putin denies US intelligence claims, says hackers can be anywhere
More news: Macron Says France, India to Work Together on Climate Change
Earlier, Mr Leoncelli told Melbourne's 3AW radio station that the man threatened to "blow the plane up", prompting staff to scream for help. "So I jumped up, undid my buckle and approached him".
Several passengers wrestled Marks to the floor, said Mr Ashton.
"There were three or four guys on him already".
A passenger who gave her name as Laura told the Australian Broadcasting Corporation that she feared for her life.
'If there was a bomb on that plane we should have been evacuated from it.
"Following the incident on MH128, the disruptive passenger has been apprehended by airport security, " the statement went on.
Passengers expressed displeasure with the police response, saying they were stuck in meters away from what they believed was an explosive device for hours.
Victoria Premier Daniel Andrews said his staff had reached out to Malaysia Airlines to offer counselling support.