Documents released for the first time since Prince's death reveal the musician's struggle with addiction before his death.

Court documents state that the singer had been prescribed pain medication oxycodone by a doctor but under another name to protect his identity, the drug was not listed as a cause of Prince's death.

However, nothing has been revealed about how the pop star came into possession of the drug fentanyl that actually killed him.

Prince was 57 when he was found alone and unresponsive in a lift at his Paisley Park home in Minneapolis on April 21 last year.

Authorities searched his home, mobile phone records of Prince's associates, and the musician's email accounts to try to determine how he got the fentanyl, a synthetic drug 50 times more powerful than heroin.

A search of Prince's home yielded numerous pills in various containers. Some were in prescription bottles for Kirk Johnson, Prince's long-time friend.

Some pills in other bottles were marked as if they were a mix of acetaminophen and hydrocodone - but at least one of those tested positive for fentanyl, meaning the pill was counterfeit and could only be obtained illegally.

The documents show Prince was struggling with an addiction to prescription opioids.

Just six days before he died, Prince fell ill on a plane and made an emergency stop in Illinois as he was returning home from a concert in Atlanta. Medics revived him with two doses of a drug that reverses the effects of an opioid overdose.

One court document says Dr Michael Todd Schulenberg, who saw Prince on April 7, 2016, and again on April 20, admitted to authorities that he prescribed oxycodone for Prince the same day as the emergency plane landing "but put the prescription in Kirk Johnson's name for Prince's privacy".

Dr Schulenberg has an active medical licence and is currently practising family medicine in Minnesota. His lawyer Amy Conners said last week that there are no restrictions on his licence.

Investigators have not interviewed either Mr Johnson or Dr Schulenberg since the hours after Prince died, an official with knowledge of the investigation said.

Prince did not have a mobile phone and authorities searched multiple email accounts that belonged to him as they tried to determine who he was communicating with and where he got the drugs that killed him, according to the search warrants.

The documents say some of the drugs in Prince's bedroom were in a suitcase with the name "Peter Bravestrong" on it. Police believe Bravestrong was an alias that Prince used when he travelled.