Search code examples
androidsqliteandroid-emulatorsqliteopenhelper

Copying SQLite db from Android to PC (and back again)?


I have created a db (SQLite) in my Android device (emulator), I would like to copy it from the device to my PC for easy editing.

Is this possible?

Where does the application place the db file and how do I get access to it? Obviously it is stored on the virtual device (emulator)


Solution

  • Fire up DDMS in Eclipse or standalone. Then go to the File Explorer tab. Open data/data/[app name]/databases

    There you will find [databasename].db

    Highlight the file and then in the corner of the DDM window there will be an icon that shows an old school floppy disk with a red arrow. Click that and you will be given a file browser window to select where you want to copy the file to your hard drive.