How to Securely Erase Your iPhone Before Resale

Posted June 17, 2008 at 2:36am by iClarified | Please help us and submit a translation by clicking here | 132029 views

These are instructions on how to securely erase your iPhone or iPod touch to prevent the recovery of private data.

Watch the Video!
For your convenience this tutorial is available in video format also. Click the Watch It button to view the tutorial!









Step One
Launch iTunes by selecting its icon in the dock


Step Two
Connect your iPhone or iPod touch to the computer then select it from the list of devices on the left.


Step Three
Click the Restore button in the Summary tab.


If asked to create a backup click Don't Back Up


A popup window will appear asking you to confirm the restore. Click the Restore button.


Once the Restore has complete a window will appear confirming that your iPhone, iPod has been restored to factory settings. Click the OK button.


Now you will be asked to name your iPhone, iPod touch. Enter a new name then click the Done button.


Step Four
Now follow your desired method to jailbreak your iPhone. If you do not have a preferred method then use one of the many detailed on this site!

Windows: http://www.iclarified.com/entry/index.php?enid=849
Mac: http://www.iclarified.com/entry/index.php?enid=847

Step Five
Now you will need to install BSD Subsystem and SSH on your iPhone. You can do this by using these tutorials...

Install BSD Subsystem: http://www.iclarified.com/entry/index.php?enid=687

Install SSH: http://www.iclarified.com/entry/index.php?enid=1349

NOTE***: To make sure SSH connections do not terminate I would suggest setting Auto-Lock to Never in Settings:General:Auto-Lock.

Step Six
Download umount from here and save it to your Desktop.

Step Seven
Open a new Terminal window from your Applications:Utilities folder.


Step Eight
Enter the following command into your Terminal window:
scp ~/Desktop/umount root@192.168.0.192:/sbin/umount


Don't forget to replace 192.168.0.192 with the IP Address of your iPhone.

If prompted for a password enter alpine.


Step Nine
Now lets SSH into the iPhone. Enter the following command into the Terminal window:
ssh root@192.168.0.192


Don't forget to replace 192.168.0.192 with the IP Address of your iPhone.

If prompted for a password enter alpine.


Step Ten
Now we need to give umount the executable permissions. Type the following into your Terminal window:
chmod 755 /sbin/umount


Step Eleven
To force both mount points in to read only mode, enter the following commands into Terminal:

umount -f /private/var
mount -o ro /private/var
mount -o ro /



Step Twelve
We now will wipe both partitions clean by copying /dev/zero over them. Enter the following commands into your Terminal window:

cat /dev/zero > /dev/rdisk0s2; cat /dev/zero > /dev/rdisk0s1



NOTE*: This will likely take up to an hour to complete! After completion your iPhone, iPod touch GUI will be unresponsive. This is expected.


Step Thirteen
We will now place the iPhone, iPod touch into recovery mode. You can follow the instructions here for a detailed explanation. Though all you need to do is press the Sleep/Wake button and Home button until the iTunes logo and dock connector appear on the screen.


Step Fourteen
Follow Steps One through Three again to restore your iPhone, iPod touch. Your iPhone will now be securely erased and ready for resale.


THANKS***: This method was outlined by Jonathan A. Zdziarski. You can read his post on the matter here
Share
Add Comment
Redd Michael - July 23, 2014 at 9:46am
If you want to sell your iPhone, you’d better erase all your private data before selling it out. I know you wonder that some iPhone data recovery programs can restore the deleted data even you have erased the private data. Here I will recommend an useful program-iPhone Data Eraser, which can erase the iPhone data including contacts, SMS, pictures, videos, call logs, and so on. It is quite efficient and safe that you don't need to worry that these wiped data will be retrieved back later because the program uses US Military spec over-writing technology to make the data unrecoverable. To read How to Delete iPhone Data Before Selling to learn more information of the iPhone Data Eraser.
Davo - October 31, 2010 at 10:44am
Wipe iphone 4 system clean E-mail 此主題給朋友 [按此打開] [隱藏] Iphone 4 16g, with Limera1n jailbroken, 4.1. I tried to wipe the whole file system clean by writing zeroing data, but encountered the following problem: I successfully sshed into the device, and force the two partitions (root partition and media partition) to read only mode, but have to unmount the media partition before doing that. So when typing the following command \"umount -f /private/var\" the system returns the error with \"not a directory or special device\" So anyone knows what\'s the cause? Thank you
Steve - December 22, 2009 at 8:31pm
I get \"Killed\" after entering \"umount -f /private/var\" command and \"mount_hfs: Resource busy\" after entering \"mount -o ro /private/var\" iPhone 2G OS v3.1.2 Jailbroken/Unlocked
Zoso - February 4, 2009 at 3:51pm
Does this work on windows? And it\'s like this that the iPod on my iPhone have for no special reason disappeared, do I get it back if I restore using iTunes?
Pissy - October 31, 2010 at 12:15pm
DAVO YOU NEED TO CONNECT IT TO UR PC AND DO THIS:...TRY TO JAIL BREAK IT WITH A DIFFERENT FIRMWARE THEN WHAT YOU NOW HAVE ON YOUR IPHONE BY DOING THIS YOU SCRAMBLE UP YOUR OWN FIRMWARE AND ALL WILL BE WIPED CLEAN THEN YOU DO A COMPLETE RESTORE LEAVING YOU AND ALL YOUR DIRECTORIES CLEAN AS A BABYS ASS
drkfd - September 16, 2008 at 11:44pm
Hey, Good stuff. Just curious: Anyone trying this with 2.1 firmware? When I run umount I receive \"Killed\" immediately. Doesn\'t seem to be working. I thought maybe there was an updated version of umount in the 2.1 build, but I can\'t find it anywhere. Any thoughts? Maybe this is no longer necessary due to the new erase features in 2.1? Thanks.
michael - February 3, 2009 at 1:23am
I\'m getting the exact same error, been searching all night. Have you found any other info? Maybe editing fstab?
schmave - May 29, 2009 at 8:14pm
wow, seriously dont try it! if you dont know that you have to run \"ldid -S /sbin/umount\" then you probably shouldnt be messeing around with your iphone. Becuase the CIA dosent want to retrive your data off your old iphone this is completely unnessecary.
4 More Comments
Follow iClarified
Yohann is a Beautifully Minimalist Stand for iPad [Video]
Yohann is a new, beautifully minimalist, stan...
Video Shows 4.7-inch iPhone 6 Assembled From Leaked Parts
Check out this video that shows a full assemb...
Apple is 'Actively Investigating' Possible Breach of Celebrity iCloud Accounts
Apple Finalizes iTunes Festival Schedule, Placido Domingo to Close Show
Apple has finalized the schedule for its iTun...
Apple Hires Anand Lal Shimpi, Founder of AnandTech
Apple has hired Anand Lal Shimpi, the founder...