Sunday, May 22, 2011

Apple ipad lost notes

Last updated on 2011 may 22

It seems quite a common situation that Apple devices notes are being lost.
The loss of information is always a very frustrating experience, and it is even more frustrating to know that a backup of the lost information is present, but is apparently unaccessible.

The following article is related to my experience on my Ipad, but it is probably applying also to iphone and ipod.

The problem:
Notes on the device appear completely empty.

Possible causes:
1. The user was changing the email account synchronization settings on the device. Maybe an account was removed, or its settings were changed.
2. An itunes sync operation was interrupted abruptly, disconnecting the cable
3. Your ipad was hit by a spell of disgrace (:-).

Possible solutions (basic):
1. If you had Gmail synchronization in place, open your gmail account from your PC, and look for a "Notes" label among your email labels. It can be that your notes are there. If so, save them, and thank big G. Then go back to your ipad and reactivate gmail notes synchronization tapping Settings/Mail,Contacts,Calendar/your Gmail account/">"

2. If you had a non-gmail notes synchronization with your email system, check the settings. Some email systems allow notes synchronization, other do not (as an example, IBM Lotus Traveler do not sync notes).

Possible solution (advanced):
Do not sync your device, and prepare for opening the guts of your iTunes. The reason for not syncing is that apparently iTunes sync operation keeps only a single copy of the last state of the device. It can be you have another backup system that backs up the iTunes folders, so maybe you also have hopes if you already performed an iTunes sync.

The following instructions require some not so common skills, so if you are not confident, please ask for professional help. It can be you will need to enable access and proper visibility to files in these folder, as well as detailed view mode.

The following instructions are based on my iTunes installation on a Windows 7 64 bit english edition. Paths could be different under other operating systems.

On my pc, the iTunes backup folder is this:
      C:\Users\mgua\AppData\Roaming\Apple Computer\MobileSync\Backup

 in this folder, there are maybe some other folders with ugly names like:
Each of which contains the backup data of each apple devices that ever synced with your iTunes setup.
Inside these data folder there are a bunch of files with similarly ugly names and no extensions. There are no subfolders.

In my installation I have 2108 backup data files. File dates and size are very different. Dates and times reflect the moments in which iTunes synchronization updated the file.

Now sort the folder content by last modification date (clicking on the top of column date modified, in view-details mode) and look for the file named info.plist
You have to check this file contents (IMPORTANT: open it without saving any changes) to be sure you are checking the right directory (you could have more than one apple device and you can identify which backup directory you are in by checking the contents of this file).
In order to open this file, you will need a text editor which is somewhat smarter than Microsoft notepad. A good choice could be notepad++ (see ).

Here is an excerpt of my info.plist contents (some data has been edited and replaced with [omissis] placeholder)

    Build Version
    Device Name
    Display Name
    Last Backup Date
    Product Type
    Product Version
    Serial Number
    Target Identifier
    Target Type
    Unique Identifier

The backup data files contain your data. The problem is that the majority of those files are not text files and are not easily readable, and specific tools are needed.
A simple quite unspecific tool is grep, but unfortunately it is not available in basic windows installations. A very good implementation of grep for windows is included in cygwin set of tools, but this requires a big and complex installation.
Windows comes with a simpler tool, called find, that can be useful in our situation.

First we need to open a command box, and go in the aforementioned folder that contains our backup. We use the command "cd" to go to the specific folder (the path was copied and pasted from the explorer window).

We need also an unusual word that was included in one of our lost notes. A surname or any unusual and uncommon word would be great. This will be our bait. We will use the bait to go fishing for our lost notes contents.

In my case I used the word "prodexpo" that was in one of my lost notes, and found it inside a specific file, with the following command line command:

      find /I "prodexpo" *

Then I opened (with notepad++) the now identified file and was able to read the contents of one of my lost notes and recover manually the important data (names, emails and phone numbers). (be careful not to save!!).

Further analysis and reverse engineering can be performed using sql-lite tools from cygwin, but this is definitely out of scope here.


As a reference, there is a tool named decode_iphone_backup available at the following url which decodes the itunes backup directory in a more suitable filesystem format.
After the decoding, sql-lite tools can be used to access the semi-relational data structures.
The tool is intended to be run on a mac computer, but it is written in pyton, so it is easily understandable.
The tool requires another program called plutil (property list tool) which is part of Apple Mac OSX operating system.
Windows/Linux ports of plutil are probably available here (Erica Sedun great site) here and here, but I dont know if they are current:

The author of the iphone-backup-decoder tool is named Pádraig. The original tool available is dated 2007.
An extended version with a GUI interface appears to be available on the site
which apparently is Pádraig website.

I did not test any of the these tools at the time.

I learned of the existance of  Pádraig's tool from a blog post by Sharninder:

Marco   ( @mgua )


No comments: