Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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.

share|improve this question

marked as duplicate by eldarerathis Feb 1 '13 at 0:32

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

2 Answers 2

up vote 6 down vote accepted

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.

share|improve this answer
    
Okay thanks. But when I wipe /data does it delete the actual files I've downloaded or just the pointers to them? I just don't want unaccessible songs taking up precious space haha –  roboguy12 Feb 20 '12 at 3:08
    
@roboguy12: No, it only wipes the app's database, and therefore all of its entries. The files themselves are on the SD card in the folder I noted above. You can simply delete them with a file explorer or from your computer by plugging in your phone and accessing it as a USB storage device. –  eldarerathis Feb 20 '12 at 3:11
    
The only problem is when I go into /sdcard/Android/data/com.google.android.music/cache/music, the only files that are in there are the 4 most recent songs I've listened to, not my entire 8 gig library. –  roboguy12 Feb 20 '12 at 3:15
    
@roboguy12: That's strange, I've never seen them stored anywhere else. What version of Google Music do you have and what kind of phone is it? –  eldarerathis Feb 20 '12 at 3:23
    
It's a Droid Incredible, running a stock 2.3.7 rom...the app is Music v4.1.512. And just to test it out, I went into the app and checked a few random songs to be available offline to try to find them on the SD card and they weren't in cache/music...nor could I find them anywhere on the SD Card. –  roboguy12 Feb 20 '12 at 3:30
show 4 more comments

Depending on your device and app version it might also be /data/data/com.google.android.music/files/music/.

This, of course, is secure storage and only accessible to app itself. On an non-rooted phone that is.

share|improve this answer
    
Does "secure storage" mean that on an unrooted device the folder is visible, but the contents unreadable? I have quite a few music files stored offline, but Astro File Manager reports these folders as "EMPTY" even with "Show hidden files" enabled. –  w3d Mar 8 '13 at 16:33
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.