Thursday, May 17, 2012


So, if you happen to have a jailbroken iPhone that is currently working, update it to the latest version of Mobile Substrate (0.9.3997 or later) -- they introduced a wonderful new feature last month: hold down Volume Up while powering on (or the headset button if you don't have volume on an ipod) and the device will boot into safe mode, which then lets you get to Cydia and uninstall anything that may have caused it to hang while booting.

To get an iDevice to shut off when it's frozen: Hold down the Home and Power buttons until the device powers off.

To update Mobile Substrate: just launch Cydia and go to "Search" (lower-right corner), then put in: Mobile Substrate, and tap on the result. You should have an update button on the top right after clicking the search result.  If not, perhaps try the "Modify" button, there may be an update option under there.

Other methods of getting to Safe Mode: (taken from http://vicksfeels.wordpress.com/2010/05/12/safe-mode-iphone/)

1. Open MobileTerminal on the iPhone (If you’re unable to do so proceed with Step#2, else skip to Step#3)
2. SSH to the iPhone using WinSCP/PuTTy (Windows) or Terminal (Linux or Mac)
3. Login using the following default values (provided you haven’t changed them yourself):
    UserName: root
    PassWord: alpine

4. Once logged in, enter the following command
    touch /var/mobile/Library/Preferences/com.saurik.mobilesubstrate.dat
5. Respring the SpringBoard


Note that you can use i-FunBox to run the SSH command if you don't want to play around with WinSCP or PuTTY, again, provided that you have SSH (I use the free OpenSSH) on your iDevice already.
Alternative to the touch command, you can also just create a blank file, name it com.saurik.mobilesubstrate.dat (make sure it's not com.saurik.mobilesubstrate.dat.txt, see below) and stick it in /var/mobile/Library/Preferences/ (i-Funbox includes an iPhone filesystem browser).
The touch command simply creates a blank file, or, if the file already exists, updates the existing file's date and time that it was modified to current date and time.

To create a non-.txt file extension in Windows Notepad: choose File > Save As, and select "files of type" or "Save as type" and put it to "All files (*.*)"

Another method is to put in the following command in SSH:


killall -SEGV SpringBoard

Sometimes Safe Mode will automatically be triggered by the app or tweak failing (but it will definitely be triggered by the above methods) and you will be presented with the following screen:


In which case, you can just hit "OK" and go to Cydia. (Image taken from vicksfeels wordpress article linked above).


On another topic, you may in your searchings come across mentions of putting your iPhone into DFU mode or Recovery/Restore mode.  There IS a difference between the two modes, which you can see from the following articles:

(taken from http://www.tuaw.com/2011/05/25/iphone-101-what-is-dfu-mode-and-whats-the-difference-from-rec/)


In the past couple of days, we've seen reports here and there of iPhones getting stuck in a restart loop. The black screen with the Apple logo shows up, holds for a while, and then disappears again; repeat ad infinitum. While it's not clear yet exactly what's triggering the issue (the complainants suspect that it may be a recent application update to blame), there is a tried and true way to get your iPhone, iPod touch, iPad or older iPod back to square one: either use recovery mode or do a DFU restore.
As OS X Daily explained, DFU (Device Firmware Update) mode is a means to getting your iPhone to interface with iTunes without iTunes automatically loading the latest version of iOS onto it (it skips the iBoot bootloader, for jailbreak aficionados). Differing from recovery mode -- where iTunes restores your iPhone to its original factory settings but with the latest iOS and firmware -- DFU mode allows you to change and choose the firmware you want to install onto your iPhone. For instance, you would use DFU mode if you want to install a previous version of iOS, jailbreak your iPhone or unlock your SIM. If (for whatever reason) standard recovery isn't working for you to get your device back to working condition, DFU may help you out.
Remember, if you restore your phone in any fashion (via the iTunes 'Restore' button, recovery mode or DFU) you will lose any modifications made to unsynced content or in-app data since your last iTunes sync (game states, voice memos, notes etc.). Be cautious.
So, here's the basic info on how to enter DFU mode (and it works for your iPod touch, too). Instructions may vary slightly by year or model; if these steps do not work, check YouTube's extensive library of how-to demonstrations).


  • Connect your iPhone to your computer via USB and launch iTunes.
  • Now turn your iPhone off. Hold down the sleep / power button at the top right of your iPhone, then slide your finger across the "slide to power off" button on your iPhone's screen. (If it won't turn off, press Home and Sleep/Power until the screen goes dark, then release.)
  • Once your iPhone is off, hold down both the sleep / power button as well as the home button for 10 seconds. Once 10 seconds has elapsed, release the sleep / power button on your iPhone, but continue to hold the home button until the the above message has appeared in iTunes telling you that your iPhone has been detected in recovery mode. (If you just want to go to recovery mode, skip the 10-second hold on both buttons and simply connect the phone while holding down Home, then wait for 'Connect to iTunes' screen on the phone.)
  • Click OK. You're now in DFU mode.
It's pretty straight forward, but if you see the Apple logo or the "connect to iTunes" screen on your iPhone, you're not in DFU mode. DFU leaves the screen of the iPhone completely black turned off.
To exit DFU mode, simply hold down the sleep / power button and the home button together until your iPhone disappears from the device list in iTunes, then turn on the iPhone as normal.
Again, for most purposes (save jailbreaking) there's no practical difference between DFU and a regular restore, except and unless you're in a situation where your phone won't go into restore mode normally. Restore with care!
This is as compared to Recovery Mode: (taken from http://osxdaily.com/2011/01/08/iphone-recovery-mode/)
Recovery Mode is what your iPhone goes into when you are doing a standard iOS upgrade or restore, but you may want to put your iPhone into recovery mode for other reasons (often related to a jailbreak).
Remember, Recovery Mode is different than DFU mode because DFU mode bypasses the bootloader which allows for things like downgrading firmware. You can not downgrade firmware with Recovery Mode, you can only upgrade or restore.

Enter iPhone Recovery Mode

Here’s how to enter into recovery mode, this works on the iPhoneiPad, and iPod touch:
  1. Disconnect the USB cable from your iPhone, but leave the other side connected to your Mac or PC
  2. Launch iTunes
  3. Press and hold down the Home and Sleep/Power button on the top of the iPhone to turn off the iPhone
  4. Press and continue to hold the Home button while you reconnect the USB cable to your iPhone, this will cause the iPhone to turn on
  5. Continue to hold the Home button until an alert message in iTunes informing you that an iPhone in recovery mode has been detected, like the screenshot below:

Your iPhone is now in recovery mode. If you have not launched iTunes, you will see the familiar screen of the USB cable pointing at the iTunes logo signaling to connect the iPhone to iTunes to start recovery.
Once you’re in recovery mode, you can either restore the iPhone or adjust the firmware as necessary (you can download iPhone firmware here).
After restoring or upgrading firmware, your iPhone will automatically reboot and exit recovery mode on it’s own.

Exit iPhone Recovery Mode

You can typically exit recovery by doing the following:
  • Hold down the home and power button for about 15 seconds, this shuts off the iPhone
  • Press the power button to boot the iPhone
If you are stuck in recovery mode (or DFU) and you do not want to do a restore or firmware upgrade, you can use a tool like TinyUmbrella or RecBoot to escape too. If you are still stuck that usually means you must re-install iOS firmware.


//////////////////////////////////////////////



What is iPhone DFU mode?

DFU mode is a state that you can put your iPhone into where it can interface with iTunes but does not load the iPhone operating system or boot loader (this is what really differs DFU mode from recovery mode). DFU stands for Device Firmware Update.

What is DFU mode used for?

The primary reason people need to access DFU mode on their iPhone is to change the firmware on the device. This can serve to downgrade to a prior iPhone firmware and operating system, or to use a custom firmware that is required for a jailbreak or SIM unlock. For instance, if you got the iPhone OS 4 download installed and decided you would rather have a prior version of the firmware on your iPhone, you would need to do this through DFU mode.

How to enter iPhone DFU mode

  • Connect the iPhone to your computer and launch iTunes
  • Turn the iPhone off (hold down the power button at the top of the iPhone)
  • Hold down the sleep/power button and home button together for exactly 10 seconds, then release the power button
  • Continue to hold down the Home button until a message appears in iTunes telling you an iPhone in recover mode has been detected
  • When you are in DFU mode your iPhone screen will be completely black
Even though the screen is black, that doesn’t mean the device can’t be interfaced with either iTunes or a custom firmware client (for jailbreaking, etc).
Remember that if you see the restore logo, iTunes logo, or any message on the iPhone screen, you are not in DFU mode but standard Recovery Mode. Again, DFU mode is signified by having a completely black screen on the device. If anything else is the case, repeat the steps above until you enter into DFU mode successfully.

Exit DFU mode on iPhone

The simplest way to exit out of DFU mode is to hold down the Home and sleep/power buttons on the iPhone while connected to iTunes. Then just hit the power button as and this should reboot the device as usual.
And if you’re curious, yes this works all the same on an iPod touch.
The most common use for DFU mode is to jailbreak. It’s not unusual for people to buy an existing iPhone and jailbreak the device to use the phone on another network or overseas, this is often a cheaper way to get an iPhone than to sign into a contract with AT&T, pay roaming charges, or pay the full iPhone 4 price. This is assuming you can find someone with the new iPhone that will sell it, considering how tight iPhone 4 availability and demand is at the moment, that might be difficult!




1 comment:

  1. Hi Joshua,
    I do appreciate your writing in this topic.

    broken iPhone

    ReplyDelete