The U.S. Border Patrol has the right to search laptops, thumb drives and cell phones of travelers.They call it a border check and they can perform this when you cross the U.S. frontier in any direction (i.e. When you're leaving the country, and not just when you enter the country, but also at the extended border. This generally refers to 100 miles from the border that covers where two-thirds the U.S. citizen live.The U.S. government established a policy three years ago that required you to give your password to electronic devices upon entering the country. They can then keep them. Then they announced last year that they could create a central repository for traveler emails and store your data for 75 years.It's not surprising that electronic device searches are on the rise. Between October 2008 - June 2010, 6500 devices were searched. There were 10,000 device searches in 2016, and 30200 in 2017. In 2019, that number was 41,000.Most of these searches don't seem legal. A federal judge in Boston ruled, November 2019, that cell phone forensic searches require reasonable suspicion that contraband is present.The Supreme Court has now allowed a 9th Circuit ruling to stand.The ruling prohibits border officers from conducting fisheries to find intelligence or evidence of any crime, past or present, whether border-related or not. Instead, they must now limit their search for digital contraband, which is defined by the courts as child pornography.This ruling is applicable to the 9th Circuit: Alaska, Arizona and California, Hawaii.These states and territories allow you to enter and leave the U.S. without your devices being searched. While immigration can still manually search any device of anyone crossing the border, they cannot search for digital contraband and must search only the areas on the phone that would contain such material.If the government wants to conduct a forensic search on your devices, they will need reasonable suspicion. They'll make a case for it but can't do it randomly. It can't be done for digital contraband. A warrant is required for searches that are conducted in the interest of investigation.If the government searches your device manually for contraband, and finds evidence of a crime, they should stop the search.