Everyone posting responces to this child is retarded.
First get a lawyer, a good lawyer. This may cost you 5k or more.
Second, they fucked up, 1.) What was their reason for searching the car. Your friend being high? he wasnt the driver was he? Even if they had a reason to search your friend, they had no reason to search the car. But again, i have to see the police report, which is what you should do, ask for a copy of the discovery packet, take it to your defense attorney.
2.) You do have to read miranda right every time you arrest someone. However, not reading them doesnt mean you are free to go, it just means that all the stuff you say afterwards is not admisible,
Think about speaking with an attorney