Search by tag: database

1 article

Accessing your application database from Android Studio

Open the Terminal window (Alt + F12) or:

Open the Terminal window

Then list your devices with the adb command. This will display both running emulators and connected devices:

$ adb devices
List of devices attached
emulator-5554   device

Use the device name to open a connection:

$ adb -s emulator-5554 shell
generic_x86:/ $

To avoid a Permission denied error while trying to access your application files, use the run-as command:

generic_x86:/ $ run-as com.your.package.example sqlite3 databases/yourdatabase.db