in reply to Cryptic file names in iPhone backup

marek1703:

It *is* human readable, just a bit cryptic. I don't know the details of what the case is here (I don't do anything with iPhones), but I'd bet it's a system-generated filename to ensure that it's a unique filename. You wouldn't want different applications mixing their data together, as it would make applications difficult to uninstall. If I was building an app for a phone, I'd ensure that each database was for a specific user and application combination. Then I could easily delete users or applications from the system without having to know any internal details of the database.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

  • Comment on Re: Cryptic file names in iPhone backup

Replies are listed 'Best First'.
Re^2: Cryptic file names in iPhone backup
by marek1703 (Acolyte) on Feb 17, 2015 at 16:08 UTC

    Thank you roboticus!

    I thought these file names are simply hex codes which need to be translated to decimal code. I tried with pack or with sprintf with no avail. So I have to wade with the sqlitebrowser through 601files (=result of the shell command ls -1U | wc -l) just to find the right one, which contains the notes?

      marek1703:

      That may be the case ... as I said, I don't know the details.

      But you can frequently make the computer do most of the wading for you, something like:

      my %db_tables; my @db_list = `ls -1U`; for my $db_name (@db_list) { eval { my $DB = DBI->connect("dbi:SQLite:dbname=$db_name"); my $ST = $DB->table_info(undef, undef, 'TABLE'); while (my $hr = $ST->fetchrow_hashref) { $db_tables{$hr->{TABLE_NAME}}{$db_name}=0; } }; if ($@) { print "Skipping $db_name (Not a database? '$@'\n"; } } for my $tbl (sort keys %db_tables) { print "TABLE: $tbl\nDBs: ", join(", ", @{$db_tables{$tbl}}), "\n\n" +; }

      This script should be close to something that will search all the databases you found and list the tables to help you narrow it down.

      Having said that, if you have 600+ databases, then my guess may have been horribly incorrect. Perhaps the application stores each note in its down database (yuck!) or maybe (based on the path name) each database is a list of changes on the iPhone that need to be synched with other devices or ...? It may be more profitable to ask on an apple developer forum about these databases.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.