Nov
22
2008

How To Manually Enable Safe Mode

Normally, MobileSubstrate’s ‘Safe Mode’ is only triggered when something is causing an error. However, it can also be triggered manually. This may come in handy for testing purposes, so here’s a tip on how to manually enter into MobileSubstrate’s ‘Safe Mode’.

The iPhone is known to slow down in some cases when a lot of stuff is installed and multiple things are running in the background. The incredibly useful iPhone hack that goes by the name of MobileSubstrate by Jay Freeman (aka saurik) is the basic infrastructure on which some of the very best iPhone hacks rely. When MobileSubstrate is in ‘Safe Mode‘ - which even had Erica fooled for a little while :-) - it temporarily switches off all apps and hacks relying on MobileSubstrate (such as WinterBoard, Backgrounder, Five Icon Dock, Mail Attachment plugin, MobileFinder, SBSettings & SBettingsToggles, PocketTouch, etc.).

As a result, in ‘Safe Mode’ usually things run about as fast as a fresh restore does (but without all the MobileSubstrate stuff enabled, of course). This may be useful to find out whether (and if so, how much) your iPhone is indeed running slower as a result of MobileSubstrate-based apps and hacks, and also (in some rare cases) to be able to run some application which otherwise would have crashed as a result of insufficient available memory and/or CPU power (since some MobileSubstrate-based apps and hacks use some memory and/or CPU).

So here’s how to enter into ‘Safe Mode’ manually, according to instructions from Jay Freeman:

Do, either running as user mobile (directly from MobileTerminal on the iPhone, which runs as user mobile as default; or ssh-ing into the iPhone using Terminal on a Mac or Linux system, or WinSCP+PuTTY on a Windows system):

touch /var/mobile/Library/Preferences/com.saurik.mobilesubstrate.dat

or, as user root:

su -c 'touch /var/mobile/Library/Preferences/com.saurik.mobilesubstrate.dat' mobile

Then, respring (i.e. restart SpringBoard). If all is well, you’ll be seeing a pop-up notification like this one:


To get MobileSubstrate running in regular mode again, just do as the above message states: simply reboot, restart, or respring.

[EDIT:] A quick note on how to ssh into your iPhone from OS X: open Terminal.app on your OS X system, and then enter:

ssh mobile@192.168.1.11

… where obviously you should replace “192.168.1.11″ with the IP address of your iPhone. You can look up its current IP address in Settings.app → Wi-Fi → {name of your wifi network} → IP Adress. If you have BiggBoss’s SBSettings installed (or its predecessor BossPrefs) you can look it up even easier, of course.

[UPDATE:] SBSettings.app by BigBoss now also has an ‘enter safe mode’ button. For most situations, this is much easier! :-)

 by: PiMP | in: Tips & Tricks | Views: 9,312 | Rating: 1(/5)

Rate: DownUp 1 (/5) Loading ... Loading ...

No Comments »

 RSS feed for comments on this post.  TrackBack URL.

Leave a Comment

PiMPMiPhone.info