Tuesday, November 5, 2019

rom flashing - Where does Google Music store the “offline tracks”?





Possible Duplicate:
Where does Google Music store offline songs?



I have about 8 gigs of music stored within Google Music, and I recently got sick of streaming (and risking data charges), so I painstakingly allowed it to be stored offline. So my fresh 16 gig SD card now only had 8 gigs left. Then, I flashed a new rom, thinking that all my music would still be there cached (or however it works), but I was wrong. When I click "show offline tracks only" within the Google Music app, it shows nothing, yet my SD card still only has 8 gigs of space left.


So, my question is, where are these offline tracks stored on my SD card so I can go in and delete them, to free up space so I can back them all up again?


Thanks!


And also, why won't the app recognize that there is offline music stored on my SD card after a new rom is flashed? I figured that data would be untouched across roms.



Answer



Your songs should get saved to /sdcard/Android/data/com.google.android.music/cache/music.


The reason they don't appear when you install a new ROM is because the folder they're stored in contains a .nomedia file, which excludes it from the media scanner. Google Music is able to keep track of them because it puts entries into its database (which is at /data/data/com.google.android.music/databases/music.db) which point to the file. Specifically, anything in the MUSIC table with a LocalCopyType value of 200 is a song on Google's servers which you've downloaded so it will be "available offline". This disappears if you wipe your /data partition when flashing a new ROM. If you have a sqlite3 binary on your device you can use the following to get a list of all songs that are available offline:



# sqlite3 /data/data/com.google.android.music/databases/music.db
sqlite> select * from music where localcopytype = 200;

If you want to have your music stored locally across ROM installs, the easiest thing to do is just to create a folder at the root of your SD card named Music (or similar) and put the files in it. The media scanner will pick it up that way. Alternatively, you can try removing the .nomedia file from the Google Music cache folder. That should allow it be scanned, too, but I don't know if Google Music will try to re-create the file on subsequent launches of the app.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...