Court documents unsealed in the investigation into Prince's death suggest a doctor and a close friend helped him improperly obtain prescription opioid painkillers, but they shed no new light on how the superstar got the fentanyl that killed him.

The affidavits and search warrants were unsealed in Carver County District Court as the yearlong investigation into Prince's death continues. The documents show authorities searched Paisley Park, cellphone records of Prince's associates, and Prince's email accounts to try to determine how he got the fentanyl, a synthetic opioid drug 50 times more powerful than heroin.

The documents don't reveal answers to that question, but do provide the most details yet seen on Prince's struggle with addiction to prescription opioids in the days before he died.

Prince was 57 when he was found alone and unresponsive in an elevator at his Paisley Park estate on April 21. Just six days earlier, he fell ill on a plane and had to be revived with two doses of a drug that reverses the effects of an opioid overdose.

Associates at Paisley Park also told investigators that Prince was recently "going through withdrawals, which are believed to be the result of the abuse of prescription medication."

The documents unsealed Monday allege Dr. Michael Todd Schulenberg, a family physician who saw the musician twice last April, told authorities he prescribed the opioid painkiller oxycodone to Prince but put it under the name of Prince's bodyguard and close friend, Kirk Johnson, "for Prince's privacy," one affidavit said.

Schulenberg's attorney, Amy Conners, disputed that. She said in a statement that Schulenberg "never directly prescribed opioids to Prince, nor did he ever prescribe opioids to any other person with the intent that they would be given to Prince."

F. Clayton Tyler, Johnson's attorney, released a statement saying that after reviewing the documents, "we believe that it is clear that Kirk Johnson did not secure nor supply the drugs which caused Prince's death."

Schulenberg is practicing family medicine in Minnesota and Conners said there are no restrictions on his license.

It is illegal for a doctor to write a prescription for someone under another person's name.

Joe Tamburino, a Minnesota defense attorney who is not associated with the Prince case, said while Schulenberg and Johnson could face charges if the allegations are true, it's unlikely state or federal prosecutors would pursue them. He called them low-level offenses that wouldn't draw prison time.

He said for prosecutors, the source of the fentanyl is the big target.

"The oxycodone in this case is only tangential to the whole case," Tamburino said. "If this was a fentanyl script, oh boy, it would be a totally different situation. ... The real meat and potatoes is going to be that fentanyl thing."

The documents said Prince did not have any prescriptions, including for fentanyl.

James L. Jones, a spokesman for the U.S. Drug Enforcement Administration's field office in Chicago, said anyone convicted of writing a prescription for someone under another person's name could lose their DEA registration — meaning they could no longer prescribe medications — and could face discipline from their state medical board.

In practice, laws against prescribing drugs for someone under a false name are not usually enforced when a doctor intends to protect a celebrity's privacy, said Los Angeles attorney Ellyn Garofalo. She represented a doctor who was acquitted of all charges, including false name allegations, in the death of Anna Nicole Smith, the Playboy model and reality TV star who died of an accidental overdose in 2007.

"They would be indicting every pharmacist in Beverly Hills if this were strictly enforced," Garofalo said Monday.

Oxycodone, the generic name for the active ingredient in OxyContin, was not listed as a cause of Prince's death. But it is part of a family of painkillers driving the nation's overdose and addiction epidemic, according to the U.S. Centers for Disease Control and Prevention. Nearly 2 million Americans abused or were addicted to prescription opioids, including oxycodone, in 2014.

Patients who take prescription opioids eventually build up a tolerance and need to take stronger doses to get the same effect. In some patients, the cycle leads to dependence and addiction.

A search of Prince's home yielded numerous pills in various containers. Some were in prescription bottles for Johnson. Some pills in other bottles were marked "Watson 853," a label used for a drug that is a mix of acetaminophen and hydrocodone, another opioid painkiller. Last August, an official with knowledge of the investigation told The Associated Press that at least one of those pills tested positive for fentanyl, meaning the pill was counterfeit and obtained illegally. The official spoke on condition of anonymity because of the ongoing investigation.

In addition to the dozens of pills recovered, authorities also found a pamphlet for an addiction recovery center in California, the documents unsealed Monday show. The day before Prince died, Paisley Park staffers contacted the California addiction specialist as they were trying to get Prince help.

Dr. Howard Kornfeld sent his son, Andrew, to Minnesota that night, and the younger Kornfeld was among those who found Prince's body. Andrew Kornfeld was carrying buprenorphine, a medication that can be used to help treat opioid addiction. The Kornfelds' attorney, William Mauzy, has said Andrew had intended to give the medication to a doctor.

Prince did not have a cellphone and authorities searched multiple email accounts that they believed he was using, as they tried to determine how he got the drug that killed him, according to the search warrants. The search warrants don't reveal the outcome of the email searches.

The documents also 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 traveled.

Investigators have said little publicly about the case over the last year, other than it is active.