If you're receiving an "exploit failed" error message using redsn0w 0.9.9b7 – or any other redsn0w 0.9.9 beta build – to jailbreak an iPhone 4, it seems to be related to the automatic ipsw identification.
Move the iPhone3,1_5.0_9A334_Restore.ipsw into the iPhone Software Updates directory. On OS X this is located in ~/Library/iTunes/iPhone Software Updates.
Re-run redsn0w and the jailbreak will work as expected. Don't forget that it's still a tethered jailbreak.
Useful if you're installing packages from the command line and want the homescreen icons to be visible.
Install UIKit Tools (apt-get install uikittools) and from the command line run sudo -u mobile uicache
If sudo isn't installed, install that with apt-get install sudo or
And while you're on the command line, make sure to change the password for the root and mobile users.
- SSH to your iPhone
- su -
- Enter the root password, alpine by default.
passwd
- Enter your new root password
passwd mobile
- Enter the new password for the mobile user
The past week has been a rough one for all of my technology products. My MacBook Pro hard drive died, my tablet pc pen had a speck of crushed diamond or something equally hard that lead to a big gouge on the screen, half of my RAID mirror died on my development machine and some crappy software corrupted the iTunes database on my iPhone.
Word to the wise: as of January 1, 2009 there is no software available that can update the iTunes database on an iPhone or iPod Touch running firmware 2.x. Once the new hash for signing the database is reverse engineered this will be possible again, but until then be careful. I discovered this the hard way while trying to add some movies to my iPhone while my MBP was out of commission.
When you connect your iPhone after using one of the crappier utilities (quality apps tell you it's not possible) you'll be greeted with the following message:
iTunes cannot read the contents of the iPhone "XXX". Go to the Summary tab in iPhone preferences and click Restore to restore.
Restoring on a customized jailbroken iPhone is a bit of a pain; you need to reinstall all of your jailbroken apps, set your Winterboard theme, arrange all of your icons "just so", etc. It takes me about an hour to get everything just the way I like it, and I've got most of the process scripted out now.
Your iTunes database is stored in /private/var/mobile/Media/iTunes_Control/iTunes and mine has the following files in it:
Extras.itdb
IC-Info.sidb
IC-Info.sidv
PhotosFolderAlbums
PhotosFolderName
PhotosFolderPrefs
Rentals.plist
Ringtones.plist
iPhotoAlbumPrefs
iTunesApplicationIDs
iTunesControl
iTunesDB
iTunesMovies
iTunesPrefs |
The suspect file was iTunesDB. My first thought was just to remove (rename) the iTunes directory and see what happened. Instead of an error I was prompted to configure a new iPhone or restore from backup. No go. When I refreshed the directory listing I saw that iTunes had re-created the iTunes directory.
I removed everything inside of the newly created /private/var/mobile/Media/iTunes_Control/iTunes directory except iTunesDB and copied all of the files (except iTunesDB) from my backup directory, /private/var/mobile/Media/iTunes_Control/iTunes-bad. Everything inside of the iTunes directory should be owned by user/group mobile/mobile and permissions set to 644.
chmod -R 644 /private/var/mobile/Media/iTunes_Control/iTunes
chown -R mobile:mobile /private/var/mobile/Media/iTunes_Control/iTunes |
I plugged my iPhone in and iTunes happily recoginzed it, sans music. Since it's a horrific music player (I love my touch wheel) I didn't care about this, my jailbreak configurationwas much more important.
You can download the virgin iTunesDB file here.