My suggestion to anyone with questions about consent is to contact a LAWYER! Do not under any circumstances take any information given to you over the forums/internet/youtube as anything but an OPINION!
Im a lawman in TX and my advice for those that are worried about being searched is to get legal advice from a certified attorney that you can prove, beyond a reasonable doubt, is an attorney of the courts and NOT youtube.
There are two multi-part videos on Youtube that address this situation. One, entitled IIRC "Busted" and is by the ACLU which, I'm pretty sure, is comprised of authentic attorneys. It should be required viewing for everyone, particularly young people who's ignorance of the law is constantly exploited by LEO.
The other is quite entertaining and is entitled something like "never speak to the police" (without a lawyer). It was made by a fairly prominent attorney and law professor whose name escapes me. It was recorded during a lecture to law students and features a cameo appearance by a genuine cop who fesses up to using the tactics that had been discussed. These interrogation tactics were specifically designed to elicit evidence of guilt from a suspect without regard to the actual guilt of innocence of said suspect. Even perfectly innocent suspects can, and do, make statements that are admissible as evidence of guilt when questioned in the way demonstrated in this lecture.
Like a previous poster said, both videos say pretty much the same thing as has been stated here. Basically, do not EVER consent to a search under any circumstances. If you feel uncomfortable refusing a search, tell them a little white lie. I have told them that my daughter is a lawyer and she said she'd kill me if I ever consented to a vehicle search, so I promised her I wouldn't. That not only makes him go away, it puts him on notice that I just might know my rights without my having to explicitly say it, (cops just HATE that and will mark you for retaliation more times than not.) BTW, my daughter is a lawyer,just not the type the cop would assume by that statement.
If a cop has a right to search, he will search without asking consent, or at the very least, he will search despite your protestations. The only time a cop asks for consent is when he knows he has no legal ground to search without it. He's not there to "cut you a break" for your cooperation. He doesn't ask just to be polite. In short, despite what he may try to make you think, he is NOT your friend.
Especially, never consent to a search after he has issued a citation. This is the oldest trick in the book. He gives you a warning or ticket and you think you're on you're free to leave (which, in fact, you ARE and you should affirm it immediately). Then, while returning to his car and as if it's a passing thought, he asks in a friendly way, "by the way, you wouldn't have anything illegal would you? Any drugs or guns or anything?"
You say, "of course not, officer".
He says, "Well then, you wouldn't mind if I just took a quick look, would you?".
You say,.....If you're smart, you say, "I don't have time and as I'm free to leave now, I bid you a good day".
Then, you leave immediately. Don't forget to buckle up and use your turn signal when you re-enter traffic.
The cop goes back to his car mumbling about losing out on another fishing expedition.
Some states' Troopers are notorious for this tactic and many became enraged and tried to take legal action when a particular Texas lawyer bought billboards on the highway emblazoned with "Just say no to illegal searches" and provided a toll free number with a recording that explained this sleazy LEO tactic.