What to do when you are with someone who commits a crime?
What to do once you realize your "friend" just committed a crimeThe key is to distinguish your actions from his actions. If he just hit a lick and hopped in your car to get away, you need to get him or you out of the car as soon as possible. Get out of the car, just pull over and jump out. Other motorists will see this and can report to the police your reaction. If you are in a store and he shoplifted walk or run away from him. If he was a good friend he would not have out you in this position.
What to do before the police get to youAgain you want to distinguish yourself from the actions of your so-called friend. If he got you into something don't expect him to later to the right thing and get you out. Chances are he will keep his mouth shut. While the law doesn't require you to call the police, doing so may keep you out of jail. Its the difference between becoming a teammate with the police or an inmate with your friend. Police have tremendous discretion at the beginning of a case to not arrest people.
Get a lawyer as soon as you canYes, even if you are innocent, especially if you are innocent. Be completely candid with your lawyer and tell them everything. The lawyer can decide whether it is best to contact the police or to remain silent. Many people have gone to prison for talking to the police when they should have talked to a lawyer first.