1

I would like to view the contents of the databases. Is there a chrome SQLite extension which I can use to view the contents of the database. I am doing this to ensure there is not compromise of data when the app runs on my clients' Chrome browser through arc welder. My understanding is that since the file system is virtual and the apps are sandboxed there shouldn't be a way to view the contents of the database.

Sam Ahuj
  • 17
  • 7

1 Answers1

0

EDIT: Yes, as far as I can see (just tested), you only can debug/monitor (with DDMS) your app while running on a VM or a real device.

So what works (without DDMS):

  • Open JavaScript console (chrome://inspect/#apps)
  • plugin.shell('adbd') in Chrome
  • adb pull /data/data/your.package.name/databases/name.db in Terminal

Old Answer (with DDMS):

If it is sufficient to just get a snapshot of your data, you can use DDMS. You can run in directly from console

./your-sdk-root/tools/ddms
  • Select your running device or VM
  • Open Device -> File Explorer
  • Your can pull the DB from data/data/your.package.name/databases/name.db

After pulling the DB you can open this file directly with sqlite3 command or any 3rd-party tool like https://github.com/sqlitebrowser/sqlitebrowser

everyman
  • 3,377
  • 1
  • 34
  • 33
  • Unfortunately (or fortunately) DDMS is not able to detect the Dalvik VM. There are no devices listed. Does this mean Chrome is sand boxing the VM also and preventing from being detected by DDMS. – Sam Ahuj Jul 17 '15 at 07:24
  • Yes. Only way of pulling data is through console. See edit. – everyman Jul 17 '15 at 07:27
  • Yes, You can see the database and preference values using Stetho library developed by facebook team. http://facebook.github.io/stetho/ – darwin Jul 17 '15 at 07:48
  • @darwin https://github.com/facebook/stetho/issues/139 seems not to be resolved yet - but this tool is great for debugging. – everyman Jul 17 '15 at 08:24
  • Thank you :) I was able pull the data. Looks like I have to encrypt the data itself. – Sam Ahuj Jul 17 '15 at 10:23