Backup Shazam Tags from Android without Root

Image

1. Connect your phone via USB and backup Shazam data files. The adb command is part of the Android SDK. You will need to change the package name “com.shazam.encore.android” to “com.shazam.android” if you have the free version.

adb backup -f com.shazam.encore.android.ab com.shazam.encore.android

2. Convert the backup file to a tar file.

dd if=com.shazam.encore.android.ab bs=1 skip=24 | openssl zlib -d > com.shazam.encore.android.tar

3. Extract the tar file.

tar -xvf com.shazam.encore.android.tar

4. Export the data from the database using sqlite.

$ sqlite3 ./apps/com.shazam.encore.android/db/library.db
SQLite version 3.7.17 2013-05-20 00:56:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> .output tags.sql
sqlite> .dump
sqlite> .exit

5. Or export csv data with this sql from spectas

$ sqlite3 ./apps/com.shazam.encore.android/db/library.db
sqlite> .mode csv
sqlite> .output tags.csv
sqlite> SELECT a.name , t.title, t.subtitle, t.album, t.subgenre_name, tg.short_datetime, tg.location_name, tg.lat, tg.lon 
FROM artist a, artist_track at, track t, tag tg
WHERE a.id = at.artist_id AND at.track_id = t._id AND tg.track_id = t._id ORDER BY tg.timestamp;
sqlite> .exit
Advertisements

About Kris Hom

Senior Software Engineer at Google

2 responses to “Backup Shazam Tags from Android without Root”

  1. -by- says :

    Thank you very much for your tip!!
    Thanks to you, I could save 370 titles collected for a year and a half.
    Have a great summer!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: