Search code examples
androidsqlitegoogle-chromegoogle-chrome-arc

How do I view the database of an android app when deployed through chrome arc welder?


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.


Solution

  • 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