Question

Hi i am pretty struggling on trying to view my databases that I create from my android code. I am using a genymotion emualator and I cant see anything from the filemanager in my project's data folder. Is there any way to view my database from the genymotion shell ? Thanks.

Était-ce utile?

La solution 2

I always pull it off the device and view it with the Sqlite Manager in Firefox:

adb pull /data/data/com.yourpackage/databases/yourdb.db

Autres conseils

You can install an app in your emulator which lets you browse installed apps for databases. Root must be available, and since Genymotion virtual devices are rooted, you can follow the next steps:

  1. Start your Genymotion virtual device.
  2. Download SQLite Debugger APK using any APK downloader service.
  3. Drag&drop the downloaded APK file to your already running Genymotion virtual device.
  4. Start SQLite Debugger in your emulator and select the option "App".
  5. A popup appears with all the installed apps. Select one, then view, update or delete its database.

SQLite Debugger showcase

I am not sure with via shell either but the following procedure helped me see the database

1.Download a good file browser(I used -- https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree)

  1. Go to you application from /data/data/(PACKAGE NAME)/databases/(YOUR FILE)

You can pull database from device using adb command

adb pull /data/data/com.yourpackage/databases/yourdb.db

it will be copied to folder where your terminal is pointing to.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top