Genymotion shell is there a command to view my database?

这一生的挚爱 提交于 2019-12-05 00:51:29

问题


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.


回答1:


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



回答2:


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.




回答3:


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)



回答4:


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.



来源:https://stackoverflow.com/questions/22825335/genymotion-shell-is-there-a-command-to-view-my-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!