20080214

iphone 1.1.3 master.passwd fix

this is for my future reference as im sure ill forget. when you passwd on 1.1.3 the springboard resets every 5 seconds. to restore the original:

1. unzip the 1.1.3 image (change ipsw to zip and unzip)
2. compile, install vfdecrypt. I found this in the jailbreak-1.1.3 package but you might find it elsewhere. to compile from this tree i had to change the Makefule so that CC=gcc, not the iphone ARM cross compiler.
3. decrypt the dmg containing the passwd files:
./vfdecrypt -i 022-3743-100.dmg -o decrypted113.dmg -k 11070c11d93b9be5069b643204451ed95aad37df7b332d10e48fd3d23c62fca517055816
4. mount and scp passwd and master.passwd over to your phone

in the future to change the password copy the hash output from the following command into the master.passwd file for the root user:
perl -e 'print crypt("yournewpassword", "/s"), "\n"'
("/s" is the seed and can be changed to whatever you like as well)

3 comments:

Varal said...

Is there any easier way to do this, like simply replacing the damaged passwd and master.passwd files by the old ones?
I mean, I'm affraid I can't do this compilation thing.
Also, how could I "mount and scp..." as said on step 4?
One thing: I'm not able to enable the WiFi, so I can't use WinSCP.
Is there any other way, like using the iPhone white USB cable to repair this file?
Thanks!

cyphunk said...

the result in the end is exactly that, just replacing the damaged files with the originals. i dont think the issue is with any timestamps or other issues so i am sure there is a way to repair by hand. BTW, just found a copy of the file here ;)

http://pastebin.ca/904464
http://pastebin.ca/904467

Dan said...

The files above have an error in them. the mobile user:group need to be 0:0 , not 501:501

I had this issues and changing this worked for me.