Location Android MediaStore sqlite db

I am trying to find the sqlite database used by MediaStore. As far as I understand, MediaStore contains among other playlists defined in the music application by default. I really would like to duplicate the playlist, but the application does not allow this. Somehow I thought I could fix this if I could find the actual db file. But now I'm completely distracted, because I just can not find db. Btw, I am running FroYo.

+6
android mediastore
source share
3 answers

Looking at the Android source, we are interested in the android.provider.MediaStore class , and there getDatabaseForUri() seems to generate a different database for each external memory card and is called internal.db .

So, I think the file that interests you:

 /data/data/com.android.providers.media/databases/internal.db 

However, my copy of this database does not have the audio_playlists table used in the Java source, so I'm not sure if this is correct.

+11
source share

The right way to do this is to use the content provider to query the media storage and make any changes to the tables.

A quick example of how you will request all artists in MediaStore.

 String[] proj = { MediaStore.Audio.Media._ID, MediaStore.Audio.Media.DATA, MediaStore.Audio.Media.DISPLAY_NAME, MediaStore.Audio.Artists.ARTIST }; //managed query doesn't need startManagingCursor called on the cursor Cursor c = managedQuery(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI, proj, null, null, null); 
+4
source share

location:

 /data/data/com.android.providers.media/databases/internal.db 

audio_playlists are not in tables, you can see it in Views. Sql tool: sqliteman, ubuntu13.10

+3
source share

All Articles