Search code examples
androidsqliterootrunas

How can I read my db files on my device, without using a computer


I am just starting out developing on android and currently only code directly on my devices (both galaxy nexus and nexus 7) using the amazing app AIDE.

Looking on here there are lots of answers for pulling the DB onto your computer using adb, but I'm not using a computer.

I am seeing answers on building the app in debuggable mode and using 'run-as' but I get a no permission error. I don't have root and am not totally averse to putting it on but want to make sure there are no non-root ways to do this.

I'm trying the run-as stuff using connectbot.

Thanks in advance


Solution

  • I don't have root and am not totally averse to putting it on but want to make sure there are no non-root ways to do this.

    There are no non-root ways to do this without work on your end. One app (say, AIDE) has no rights to access the internal storage of another app (say, yours).

    Non-root options include:

    • Adding a backup feature to your app that copies the database to external storage, at which point you can use apps like the aSQLiteManager mentioned in the previous post (also available directly on the Play Store).

    • Baking in some sort of SQLite editor into your app temporarily during development, removing it when you go to production.