iPhone and Linux

Tuesday, July 21, 2009

Redo: Backup your SpringBoard icon arrangement

My last post about backing up the Springboard arrangement works fine, but if you view the backup file with iFile, the formatting is really messed up and you'd be amazed that it still works.

I initially thought this had something to do with the "cat" command. Since cat is a unix utility, maybe the Mac style carriage returns were messing it up. I changed the script to "cp" (copy) instead, but the output still had formatting problems.

I finally found that it is a problem with iFile. Renaming the file with a .plist extension makes it display normally.

I don't think it matters, but copying the plist to another plist is probably the better way of doing it.

backup:
#! /bin/sh
cp /var/mobile/Library/Preferences/com.apple.springboard.plist
/var/mobile/springboardbackup.plist

restore:
#! /bin/sh
cp /var/mobile/springboardbackup.plist /var/mobile/Library/Preferences/com.apple.springboard.plist

Blog Archive