Last night I was sitting passenger in my friends parked car. We had just lit a joint when the cops pulled up behind us. They brought four police cars, informed us over loud speaker to remain in the car. They had the driver step out of the car while I remained in the car with my hands against the dash as advised to do so by another police officer. When the driver stepped out one of the officers said "Man that's some strong ****". They asked if he/we had been smoking, I believe he said yes. They then asked if they could search his car, he said yes (for whatever reason), and found what I believe was less than 1 gram of weed. I was then questioned as to where the weed was purchased, I said "I don't know, because its not mine", and really honest to god, it was not mine, it was the drivers. At this point they had me step out of the car as well, patted me down and took what I had in my pockets (keys). After being made to sit on the ground and answer some more questions (were you going to a party...etc), they then proceeded to cuff the driver and I without informing me of anything, put us both in the cruiser and took us to the station. At the station the finger printed us, took mug shots, and detained us in a jail cell for eight hours. After eight hours, they gave us our stuff back, a copy of what seems to be a ticket with a date to report to court on what appears to be possession of weed (cops handwriting was terrible, so not certain).
At no point was I told that I was under arrest, and I also never had my miranda rights read.
That was also not my weed, not my car and I was not driving.
Does it matter that I was never informed of arrest? Was I technically arrested? Miranda rights matter? How do I prove it was not my weed?

