Mar 5, 2008

HowTo: Restoring your iPhone Notes from a Mac

If your notes got wiped during a recent firmware upgrade, here are some steps that may help you recover them. Warning: Hacking expertise for this exercise is rated "high" to "severe".
  1. Install Apple Dev tools if they're not already on your computer.
  2. Copy this to your Mac, name it dbextract, make it executable, and add it to your path somewhere.
  3. Navigate to ~/Library/Application Support/MobileSync/Backup.
  4. List all folders chronologically, i.e. ls -lt
  5. Go into the newest folder and run dbextract against the mdbackup files in that folder: i.e. dbextract *.mdbackup
  6. Examine the extracted database files. Open them if needed in sqlite3 and .dump their contents. If they have your content, great. If not, go to the next folder in chronological order and repeat.
  7. Once you find the notes.db file you're looking for, scp or sftp it over to your iPhone and place it into /var/root/Library/Notes.

No comments: