The molecules or grime on your smartphones could actually dig up dirt about your lifestyles, including medication and the food you like, a new study suggests.

The study, conducted by a team of researchers from the University of California San Diego and published in the journal Proceedings of the National Academy of Sciences, reveal that everything that you take, even coffee, spices, skin creams and drugs, could leave molecular traces in smartphones, BBC reports.

The researchers were able to prove this theory by using mass spectrometry on 500 samples from the smartphones of 39 adult participants.

"All of these chemical traces on our bodies can transfer to objects. So we realized we could probably come up with a profile of a person's lifestyle based on chemistries we can detect on objects they frequently use," said Pieter Dorrestein, a professor of pharmacology at the UC San Diego School of Medicine and lead author of the study.

The researchers took a swab on the four sections of each phone and eight spots on the participants' hands. From the results, the scientists then created a profile of the participants' lifestyles by comparing the molecules found with a database of molecules that could be found on commercial products and drugs. The result is a lifestyle profile that reveal information on the participant's health, diet, places visited and products used.

"We could tell if a person is likely female, uses high-end cosmetics, dyes her hair, drinks coffee, prefers beer over wine, likes spicy food, is being treated for depression, wears sunscreen and bug spray — and therefore likely spends a lot of time outdoors — all kinds of things," Amina Bouslimani, the first author of the study, told Live Science.

Dorrestein said that the newly discovered procedure could be used for criminal investigation as it can narrow down a searc to a small group of people.