How can I completely erase all personal data from my jailbroken iPhone?

How can I completely erase all personal data from my jailbroken iPhone?

Chances are if you're returning your iPhone or considering selling it in order to upgrade, admist recent reports of refurbished iPhones still containing personal data, you are going to want to do everything you can to insure your iPhone is as clean and clear as can be.

Thanks to a recent article on iPhoneAtlas, you can now take extra steps to protect your personal information. These steps require a jailbroken iPhone, and are outlined as follows:

  1. Via iTunes, perform a full restore of your iPhone. Be sure to set the device up as a new phone. This will not completely erase your personal data, but will insure no new personal data is synced to the phone after you erase it.
  2. Jailbreak the iPhone using one of the many available jailbreaking programs and SSH into your iPhone.
  3. Find 'umount' for the iPhone. This can be found on the RAM disk. Execute the following commands:

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

    The iPhone GUI will now become unresponsive, do not try to use it.

  4. Execute the following commands: cat /dev/zero > /dev/rdisk0s2
    cat /dev/zero > /dev/rdisk0s1

    This will erase the NAND memory by copying /dev/zero to each disk.

  5. Force your iPhone into recovery mode (hold the home button and the power button until a yellow triangle that advises "Connect to iTunes" comes up)
  6. Connect your iPhone to iTunes and perform another full restore

The effectiveness of the above instructions can be increased by using /dev/random in place of /dev/zero above, but will likely take considerably longer and be unnecessary for 99% of iPhone owners.

[via iPhoneAtlas]



How can I SSH?
I jailbreaked it and have ping but i cant connect anyway.. if yes, what is the login data?

user: root
pass: alpine

ip address: ur iphones ip

set to SCP