Retrieve database or any other file from the Internal Storage using run-as

By design user build of Android (that’s what you have on your phone until you unlock the bootloader and flash the phone with userdebug or eng software) restricts access to the Internal Storage – every app can only access its own files. Fortunately for software developers not willing to root their phones Google provides a … Read more

When does SQLiteOpenHelper onCreate() / onUpgrade() run?

SQLiteOpenHelper onCreate() and onUpgrade() callbacks are invoked when the database is actually opened, for example by a call to getWritableDatabase(). The database is not opened when the database helper object itself is created. SQLiteOpenHelper versions the database files. The version number is the int argument passed to the constructor. In the database file, the version … Read more

How to access data/data folder in Android device?

Accessing the files directly on your phone is difficult, but you may be able to copy them to your computer where you can do anything you want with it. Without rooting you have 2 options: If the application is debuggable you can use the run-as command in adb shell adb shell run-as com.your.packagename cp /data/data/com.your.packagename/ … Read more