AUSTIN — The state’s top criminal appeals court has ruled that investigators must have search warrants to search the cellphones of suspects and other persons of interest.

The 8-1 ruling Wednesday of the Texas Court of Criminal Appeals upheld a lower-court order in the case of a Huntsville student arrested and charged with a minor misdemeanor over a disturbance aboard a school bus.

According to court documents, his cellphone was confiscated and placed in the jail property room. A Huntsville police officer later examined its contents without a warrant and found an image of another student urinating in a boys’ restroom at school. The suspect was then charged with a state-jail felony of improper photography, and his attorney filed a motion to suppress the cellphone and the image.