If you're arrested, an officer can search you, without a warrant, for weapons, evidence of a crime, or illegal or stolen goods.
Police can search your car and trunk without your consent or a warrant if an officer has good reason to believe it contains illegal or stolen goods or evidence. If the police stop your car for any legal reason - such as a broken taillight - they can take any illegal goods in plain sight.
Certain emergency circumstances, such as the potential destruction of evidence, will allow an officer to search your home without your consent. If you're arrested at your home without a search warrant, only the area where you're located can be searched. Anything illegal in plain view can be taken or "seized."
The right of people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the person or things to be seized
To determine what might be unreasonable, a "legitimate expectation of privacy" must be established.
At the arraignment, your friend will appear before a judge who will tell him, officially, of the charges filed against him. Also, the judge may set bail. Your friend may be released on his own recognizance. If he's in need of an attorney and meets the guidelines for court appointed representation, a public defender will be assigned. If the charge is a misdemeanor, some courts allow a plea to be entered at this time.
At a preliminary hearing, the district attorney or prosecutor must establish for the judge that there are reasonable grounds (evidence) to proceed with the charges and bring your friend to trial.
Getting released from jail will depend on:
Miranda rights don't have to be recited prior to an arrest or to ask routine questions needed to establish your identity, such as your name and address. Generally, the police will "read your rights" if you're going to be questioned. If you're questioned without your lawyer being present and you haven't been read your rights, anything you say to the police likely can't be used as evidence against you in court.
You can be "detained" for a short period of time if a police officer believes you were involved in a crime or are about to commit a crime. For example, if you're standing on a street corner late at night in an area where a robbery had just occurred, a police officer may stop and ask you questions about why you're in the area, etc. This is not an arrest.
Sometimes there's no bail, but rather the accused is set free on his "own recognizance," or "O.R." All he has to do is promise to show up at court for trial. There's no money or collateral involved.
Courts look at a variety of factors when deciding to release a defendant O.R., the most important factor is the likelihood that the defendant will flee to avoid trial. The judge may look at: