Home > Gadgets > Fixing iPhone Mail Crashes (2.0 Firmware)

Fixing iPhone Mail Crashes (2.0 Firmware)

July 19th, 2008

Sometimes your iPhone mail client just doesn’t go. You open mail, and it closes again. You can’t even delete the account from the Setup application. I’m not 100% positive, but I think this usually happens when you’ve restored your settings from a pre-2.0 phone (again, unsure whether it matters if the phone was pwned or not).

You could wait for Apple to fix this bug, but with the new jailbreak tool available for 2.0 firmware, help is at hand. Jailbreaking your phone is fairly trivial, but beyond the scope of this post.

Update: Now I see there is a “Mobile Terminal” app available on Cydia. If you’re desperate you can install that, run it, enter “su” to elevate yourself to root (you’ll need the “alpine” password) then skip down to the cd /var/mobile/Library bit.
Update 2: Even easier, the BossPrefs application (available via Cydia) has an option to “Fix User Dir Permissions” (accessed via the “More” button). This does exactly the same thing as my fix below, but is heaps easier if you don’t understand Unix terminal commands.

Read on for the full details

So let’s run through what you need:

  • One iPhone with 2.0 firmware, jailbroken and diced finely.
  • One tablespoon of OpenSSH, installed using the Cydia installer on your iPhone.
  • The IP address of your iPhone when connected via Wifi (sorry USB won’t work).

To grab the IP address, head into the Wifi settings, and tap the blue “more” arrow on the connected network:

Ok, now we need to connect to that IP address using SSH. I use the Terminal app on my Mac, but you could just as easily use PuTTy on your PC. In PuTTy you’ll need to just type in the IP address to connect to. On the Mac you want to type ssh root@xxx.xxx.xxx.xxx into Terminal (where xxx.etc. is the IP address of the iPhone).

The first time you do this, you will get a long (as in 60+ seconds) delay as the iPhone computes some cryptography stuff (a key pair I think), then it will ask you if you want to accept the key pair. Obviously you do. Type “yes” on the Mac or just click “OK” if you are using PuTTy.

Next we log in with the ubuquitous iPhone root password: alpine. You should get something like this:

Now we have an interactive shell with the iPhone. Hopefully everyone knows some basic Unix shell commands, because they teach those at primary school nowadays right? Right?! Anyway… your mail is stored at /var/mobile/Library/Mail. Let’s take a look at that directory on an iPhone with “broken” mail by typing:

cd /var/mobile/Library
ls -la

See that bit that says “root mobile” on the line tha ends in “Mail/”? That means the Mail directory is owned by user “root” and group “mobile”. This is a Bad Thing(TM). We want it to be owned by user “mobile”, which is the user under which all iPhone apps run. This is an easy fix using the chown command with “-R” (for recurse directories):

chown -R mobile:mobile /var/mobile/Library/Mail

Type that command, hit enter, and we’re done. Take another look at that directory listing now:

All fixed. Now go and run your iPhone mail app and whoop with delight. That’s an order.

And I can’t leave without my standard nag: I OWN this piece of hardware. It’s mine. I shouldn’t have to hack it to fix it. Grrr.

Popularity: 61% [?]

Author: Ben Categories: Gadgets Tags: , ,
  1. bob
    August 19th, 2008 at 23:53 | #1

    holy pizz fuck it worked!!!!!!! let me marrie you

  2. magu
    August 26th, 2008 at 23:35 | #2

    I love you! I have tried basically everything: restore 2.0.2, jailbreak, un-jailbreak, 2.0.1, jailbreak, pray, curse… This has fixed it!

  3. robin
    August 30th, 2008 at 05:54 | #3

    Ah! Thank you so much, fixed me right up no troubles!

  4. September 3rd, 2008 at 09:44 | #4

    AWESOME.

    Thanks so much man. Saved me big time. Other forum posts have said that you need to do a restore as a new iPhone… that would've sucked.

  5. JC
    September 9th, 2008 at 16:55 | #5

    Thanks a lot, Just what I was looking for!!!

  6. fester99
    November 18th, 2008 at 01:32 | #6

    you can also use the boss prefs and select more tab and then click on fix user dir permissions.

  7. ISIK
    December 21st, 2008 at 23:52 | #7

    ?Fix User Dir Permissions totally helped!! thank you very much :hug:

  8. April 7th, 2009 at 14:32 | #8

    Hey, is there a section just for latest news

Comment pages
1 2 910
Comments are closed.

[ bbPress synchronization by bobrik ]