The reason that officers are not prosecuted for 'larceny' if a court rules they found something as a result of a bad search is that the rules of search and seizure are not as iron-clad and easy for the cop on the beat to understand as you may think. The courts say that we need 'probable cause' for a search without a warrant of say, a pedestrian or a car. Well, what is 'probable cause'? The textbook answer is that it means the officer has an objectively reasonable belief that contraband or other evidence of a crime is present in the area in question. Sounds simple, doesn't it? Well, try applying it in hundreds of different situations out on the street, WITHOUT the benefit of a judge or prosecutor to advise you. Just because a judge who never spent a day as a cop and has no idea how things actually happen on the street doesn't agree that you had quite enough to search that car, doesn't mean that there was any criminal intent on the officer's part to violate anyone's civil rights, and that's what is required to raise the officer's conduct to the level of a criminal offense. As far as larceny, in most states that requires an intent to permanently deprive someone of their lawful property. If evidence that someone can lawfully possess is taken as evidence and the judge rules the search was illegal, the person gets the item back. If the item was contraband (cocaine, etc), then it was not LAWFULLY possessed and the defendant is not entitled to get it back regardless of the outcome of the suppression hearing.
The point you seem to be missing is that many of the rules that govern normal people's conduct do not apply to on-duty police in many situations. We can stop people, go on their property without permission, seize items, etc. It's an integral part of the job. The courts realize that we don't have legal counsel available to us to tell us how the courts are going to rule on our actions before we take them (not that they would know, anyway- given the same situation, you would get three different opinions out of three different judges). So, they give us considerable leeway as far as criminal liability for what we do. If we do something intentionally to violate someone's rights, rather than make a good-faith judgment that some judge disagrees with a year later, then we can (and should) be held criminally liable. However, we aren't expected to be perfect (by the courts, anyway).
Your question is just too broad. Maybe if you give some specific scenarios we could assist you better.