Apparently, the only way to completely delete data from a mobile phone is to completely destroy it.

Doing a "factory reset," an option on most phones, simply returns the gadget to its original system state and does not actually wipe out all of the data that has been written in the memory, according to BBC News. Czech Republic-based security firm Avast used forensic security tools that are publicly available to extract thousands of images, including naked selfies, from secondhand phones bought on eBay. Text messages, emails and even Google searches also were extracted.

Avast discovered that older smartphones do not actually delete data itself but only the indexing of the data. This means that by using standard forensic tools easily available online, anyone can retrieve "deleted" files from old devices. The company claims that of 40,000 photos extracted from 20 phones purchased on eBay, more than 750 are of women in stages of undress. Additionally, the company recovered a thousand Google searches, "750 emails and text messages, and 250 contact names and email addresses."

The company said deleting files from an Android phone before giving it away or selling it online is not enough. Users should overwrite the files to make them irretrievable.

Google responded to this discovery by saying Avast was experimenting on outdated smartphones. According to the maker of Android, this does not undermine the security of the vast number of Android users on the newer versions of the mobile operating system. Moreover, Google advised users to enable encryption on the device prior to factory resetting to ensure that the files cannot be accessed in the future.

On the other hand, a built-in encryption feature for both the hardware and firmware has been available for iPhone users since that device's 3GS version. However, other experts say encryption only makes data recovery more difficult, not impossible.