Many cars are searched by Texas Department of Public Safety Troopers on Texas highways and interstates. Most are the result of stops for various traffic violations, which escalate to search of the vehicle by state troopers or local deputies. Many of these searches are by "consent" -- after the officer becomes suspicious that some illegal activity may be taking place. Some of these searches are legal, some not. How do we know ?
The answer to that question is: it depends, always, on the specific facts of each case.
An officer may conduct an investigative detention by stopping and detaining a person in order to determine the person's identity, reason for being in the area, or some other such inquiry. The officer does not usually need to have probable cause to investigate potential criminal activity, if he can give specific facts which support his reason for the detention. Legal terminology for this is referred to as "specific and articulable facts", which, together with "rational inferences" from those articulated facts, would warrant the detention.
A hunch, suspicion, or even good faith belief of the officer, without such articulated facts, is never sufficient justification or excuse for an investigatory detention. Properly articulated facts justifying a detention or stop is referred to as "reasonable suspicion". Without such "reasonable suspicion", any evidence or contraband seized should be suppressed, or thrown out, by the reviewing court.
For consent to be valid, it must be free and voluntary, and must be obtained from an individual authorized to consent to a search. For instance, if a passenger seated in the back seat of the car who has no ownership rights to the vehicle tells a trooper its o.k. to search, that's not consent. Free and voluntary means just that. A coerced, or forced, consent is not valid.
Six factors are often cited to be used in considering voluntariness: 1) whether the custodial status is voluntary; that is, was the person free to leave? 2) were there coercive police procedures present? 3) the extent and level of cooperation with the police; 4) How aware the person was of his right to refuse consent; 5) Education and intelligence of the person giving the consent; 6) the person's belief, if any, that no incriminating evidence will be found.
These factors are taken into consideration by the courts on a case by case basis. And don't ask me how they decide factor number 6!