![]() ![]() ![]() The only annoying part is that everytime you run your application and generate/remove data from the database, you have to take the latest. After you have done just upload the databasefile.db to device using DDMS again. You can use any Graphic SQLite management tool to work with the databasefile.db on your PC. Then you can use SQLite3 to open and work on that databasefile.db You can pull /data/data/package_name/databases/databasefile.db from device to your harddisk using DDMS. You can see (copy from/to filesystem) the database file in the emulator selecting DDMS perspective, in the File Explorer tab. PACKAGE is the package declared in the AndroidManifest.xml (tag "manifest", attribute "package")ĭATABASEFILE is the name passed when you call the SQLiteOpenHelper constructor as explained here: Data Storage | Android Developers The databases are stored as SQLite files in /data/data/PACKAGE/databases/DATABASEFILE where: Then you will follow the path data > data > your-package-name > databases > your-database-file. You have to be on the DDMS perspective on your Eclipse IDE (Windows > Open Perspective > Other > DDMS), and, the most important, YOUR APPLICATION MUST BE RUNNING SO YOU CAN SEE THE HIERARCHY OF FOLDERS AND FILES. ![]() If you can get the specific directory and filename, you can do an "adb pull" to get the database file off of the emulator and onto your regular hard drive (this applies to a real device too, even if you have non-root permissions and "ls" isn't showing you anything). You're best off using adb from the command line to jack into a running emulator. The emulator's disk image is stored as an image file, which you can manage through either Eclipse (look for the G1-looking icon in the toolbar), or through the emulator binary itself (run "emulator -help" for a description of options). The filesystem of the emulator doesn't map to a directory on your hard drive. I am pasting it here for others who have the same confusion regarding accessing the sqlite database content in our system: I found an excellent post that answered my question. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |