The other day I was trying out something on my iPhone and incidentally found a way to change the way my iPhone goes into and comes out of the Standby mode. Unfortunately, while trying out this new discovery, disaster struck and I was no longer able to get out of the Standby mode as the “Slide to Unlock” slider stopped responding. I wasn’t able to receive calls and hard rebooting the iPhone didn’t help either. After about 4½ hours of painstaking hardship, I finally called it quits and decided to restore my iPhone using iTunes. But, restoring meant losing the pictures, contacts, notes and messages which I had updated since I last synced my iPhone with my Computer, which incidentally was a long time back (2 months to be precise) and therefore it meant losing a lot of precious data. Then, suddenly out of nowhere, the idea of booting my iPhone in Safe Mode struck my mind. I rebooted my iPhone in Safe Mode, reverted the changes I did which had inadvertently caused the trouble and restarted the phone in normal mode. And Voila! I was back to business within a few minutes.
Safe Mode Screen on an iPhone
But, before I actually go on explaining how to manually enable Safe Mode on an iPhone, here are some jargon busters for people who might be unfamiliar with some of the terms used further in this post.
First off, let’s start with – JailBreak. JailBreaking is the process which allows a user to run any code on iPod Touch, iPhone and iPad as opposed to only the Authorized code meant to be run by Apple. It is estimated that about 10% of all these devices around the world have been Jailbroken. Once a device is Jailbroken, a user can download and install unofficial 3rd Party applications which can extend the functionality of these devices and in some cases help circumvent the security measures enforced by Apple including “Unlocking” of the iPhone to enable using of the iPhone with any GSM network in the world and not just be restricted to AT&T (US) or the local service provider with which Apple has tied up with in a particular country to provide iPhone with a time bound service contract.
MobileSubstrate is a set of system shared dynamic libraries “.dylib” files (similar to “.DLL” files in Windows) utilized on Jailbroken devices which allow developers to write programs that extend already written programs for the iPhone. Using MobileSubstrate, a coder can modify the behavior of other applications including Apple’s built in apps, without having their source code. MobileSubstrate loads 3rd party .dylib files (“MS extensions” / “MS libraries” / “MS plugins”) and hooks them to the targeted programs. This behaviour, though also possible without MobileSubstrate, is way too easy to do so utilizing MS.
MobileSubstrate is a pre-requisite for many JailBroken programs like – Backgrounder, Clippy, SummerBoard etc. However, as with any code, a faulty MS extension can wreak havoc and make the SpringBoard (iPhone Shell which manages the iPhone OS home screen and icons – similar to the “Explorer” shell in Windows) crash which may disable the normal functionality of the iPhone. To counter this kind of a scenario, MobileSubstrate provides a “Safe Mode” (similar to the “Safe Mode” in Windows) for SpringBoard that basically disables any 3rd Party Application or extensions to run. Once in Safe Mode, you can disable and/or remove the application or extension which is causing problems to restore normal functionality of the iPhone.
Usually, MobileSubstrate’s Safe Mode is auto triggered as and when a fault occurs. But, it can also be triggered manually in case it is not auto triggered automatically and you’re unable to access the application or extension causing the problem.
Here’s how you can enable “Safe Mode” manually on the 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
If you followed the above steps correctly, you will see a screen similar to the one below:
Unlock Screen of an iPhone in Safe Mode
I could not stop my self to read it… Good work.
Thank…you! I had no idea it would be that easy.
I have done all the steps but my iDevice is stuck in circling the resprings and the commands go thru but does not make it go into Safe Mode
Hi guys, i can`t find touch /var/mobile/Library/Preferences/com.saurik.mobilesubstrate.dat
the only line that i found is /com.winterboard.plist
pleazzz help me.
H.O.Turkoglu
@ osman: u dont have to find that command line.
u just need to install ssh terminal or mobile terminal from cydia.
Note: i cudnot use Mobile terminal, so i used ssh terminal.
find ur wifi ip and use it as a hostname in ssh terminal.
use the default username: root and password: alpine to login.
once u login, type in: touch /var/mobile/Library/Preferences/com.saurik.mobilesubstrate.dat
then press enter.
finally go to winterboard to respring the device. thats all
BTW thanx alot vicks feels, very helpful info.
Wow, great GREAT thanks to this.
My iPhone4 was locked in a boot freeze cycle after JB’ing and restoring some packages, this let me get back into it.
Note for people: if you don’t have SSH access, you can use iFunBox.
Create a text file named com.saurik.mobilesubstrate.dat on your PC, then upload it to that directory!
HAPPY.
@Turner
Thanks for this answer.
How do I upload the .dat-file? I don’t know how to reacht the right directory
Thanks in advance
Great!
Many thanks!
very very very thankyou
AWESOME!!! Thanks, this helped me a bunch as I was in a loop after installing a tweak.
THANKS A LOT
Thanks for that!!
Thank You U Solved My Problems!!!
Thanks u are the man… save me from restoring my iphone… i was waiting for ios5 … tq.
Thanks so much!!!!!!
If Totally locked out :
– Open iTunes
– Plug in iPhone USB
– Push & hold power & home buttons until iTunes prompts for total restore
Note: This will force you to update the iPhone to the latest iOS ( I used an iPhone4 in this process )
It does NOT force you to update the iPhone to the latest iOS if you have valid SHSH blobs saved.
Voted, thanks!
Turner, you’re a lifesaver! My ipad2 was frozen tight! I had to hard boot, swipe to unlock didn’t work, nor did any of my activator actions to unlock! Couldn’t even get to SBSettings to respring. Based on your tip, I created a blank text document named “com.saurik.mobilesubstrate.dat”, being sure to change the file type to *.* All Types so it didn’t append the usual *.txt file extension. Then using i-FunBox, I browsed to /var/mobile/Library/Preferences/, used the “Copy From PC” feature to place the newly created text file, hard booted the ipad, and voila! It came back up in “it Safe Mode” which then allowed a respring and I’m back up and running! Thanks so much! And thanks to OP for raising such an issue to where we could all find a solution!
Thank you! iLock just kept crashing my iPhone, i tried this and i’m back in 🙂
Thanks again!!
Thanks a lot for your method. IT WORKS PERFECTLY
thanks, this didn’t fix my particular problem but it does boot you into safe mode!
safari immediately crashes with redsn0w jailbreak of ios5.0 whether I’m in safe mode or not. cydia and everything else works fine, except safari.
(Y) Yuhuuu! It works! It helped my to get rid of PWNTunes Tutorial I was sticked in with lock screen and non respondable touch…
Thank You very much!
Best regards from New Zealand,
Aidas
This tip really saved me. Thanks!
THANK YOU! YOU ARE A LIFE SAVER????? 🙂
thanks man. really appreciate this. installed something my iphone didn’t like. kept freezing, respringing, freezing, respringing. was able to reboot in safemode and remove what i had just installed though cydia and my iphone is back the way it was. thanks again.
Thank you, you guys are the best. I couldn’t do anything with my Ipad, so used Ifunbox to install OpenSSH Deb file, then used WinScp to go in and add the blank com.saurik.mobilesubstrate.dat file. Worked like a charm. Went into safe mode and removed the offending program
OMG I almost gave up, when I found this tip. You are a lifesaver. my iPad 2 went into a springboard loop the day of 5.1 update almost giving up r/t being unable to restore 5.0.1 [SOL on the A5 devices].
Always being able to ssh and sftp into my JB ipad2 [between looping] i changed my train of thought from restoring, to actually trying to fix the problem. I just happen to have all of the tools I needed to troubleshoot the offending app,mainly syslog. OMG I have a 250+ MB syslog file. It has logged every loop, every attempt to restore, i mean everything. 4 days of cranking out trying to boot, Poor thing.
Utilizing this tip saved my iPad2, allowing it to still be free from constraints, although a few slightly buggy ones.
Why is this tip not updated regarding Springboard boot loop, All updated 2012 tips referring to this problem say to restore it in iTunes after putting it into DFU mode. So that is the first route I took, trying to restore. I wasted 4 days and almost throwing in the towel by upgrading to 5.1. I am going to pass the word that this works on A5 devices as long as you have the tools to figure out (or know what) mobile substrate is causing the springboard loop.
thanks again and again…..
Thank you! Great article 😀
how blessed are we to find this post, not even cydia has mentioned this thanks google and especially vicksfeels 🙂
This is a lifesaver 🙂
hiii
i need to run safe mode
but my iphone 4s wont start
it stocks on the apple logo
and it keeps restarting
after i installed an app from sydia
so how can i run the safe mode ?
plz answer me
Generally I do not learn post on blogs, however I wish to say that this write-up very forced me to try
and do it! Your writing taste has been surprised me.
Thank you, very great article.
Nice blog here! Also your web site loads up very fast!
What host are you using? Can I get your affiliate link to your host?
I wish my web site loaded up as fast as yours lol
What to write in ‘Host Name’ column in winscp?
Wow, that’s what I was exploring for, what a material! present here at this blog, thanks admin of this site.
I’m not that much of a internet reader to be honest but your blogs really nice, keep
it up! I’ll go ahead and bookmark your site to come back later on.
Many thanks
I do not even understand how I finished up right here,
but I thought this post was great. I don’t recognise who you’re however definitely
you are going to a famous blogger if you
aren’t already. Cheers!
Merci pour votre expertise sur le sujet. En vous souhaitans plein de succès.
Nice post. I was checking constantly this blog and I am impressed! Extremely useful information specially the last part kdadgbfgbdce
Nice read, I just passed this onto a friend who was doing some research on that. And he just bought me lunch since I found it for him smile So let me rephrase that Thank you for lunch! Whenever you have an efficient government you have a dictatorship. by Harry S Truman. fcddebgkekee