No! Please don’t be mistaken! I am not here to give you tips on how to dust your iPhone off environmental dirt. Rather I would like to enlighten you on a couple of methodologies of erasing every iota of information from your iPhone, if you want to do so due to any personal reason.
The first is called the Rich Mogul method in which you can overwrite your data with music files. The other is the Jonathan Zdziarski method in which you restore the iPhone to a new phone state and then jailbreak it. Then you access the shell, render the mounts read only using Umount, and rewrite the partitions with dev/zero. Next, in the recovery mode you make your iPhone perform system recovery. Repeating the process a number of times with dev/random is going to prevent the remotest possibility of any recovery of the data that you’ve wiped.
Its anybody’s guess that the former method is not foolproof as the OS will render live files and the non-writable space of the hard drives immune to overwriting with music files and hence, the chances of some of your personal data remaining is fairly high. The other method definitely seems to be a thorough way to wipe out all your personal data.
I think thorough cleaning being the priority, the Jonathan method can be used. However, both methods have a long way to go in terms of gaining the confidence of users.
via: Hack A Day