Mac, Android Studio, emulator, SQLite database - actually find a directory?

I use Android Studio on Mac, all on the latest version. Say I'm doing this:

SQLiteDatabase db;
db = yourAppContext.openOrCreateDatabase("db.sqlite3", Context.MODE_PRIVATE, null);

Thanks to this link:

http://www.c-sharpcorner.com/UploadFile/e14021/know-where-database-is-stored-in-android-studio/

you can precisely find the directory containing your actual SQLite3 database on the emulator while it is running:

enter image description here

Quality goods.

Next, you can click the Pull button and pull this file to say your desktop on Mac. Awesome.

But how do you actually literally find this folder (in this example, the "database") on your Mac?

that is, using a regular shell terminal, I want the "CD" to go there.

, nix Mac?

+5
2

adb (Android Debug Bridge) , . , .

/ :

  • Terminal.app.
  • adb devices ( ).
  • adb shell.
  • cd , .
  • ls, , .

:

:

$ adb devices
List of devices attached
emulator-5554  device

adb shell:

$ adb -s emulator-5554 shell

(cd) SQLite3 ( com...):

adb shell
$ cd /data/data/<your app package name>/databases/

databases:

adb shell
$ ls
db.sqlite3

! push/pull () () :

adb pull /data/data/com.yourpackagename.app/databases/db.sqlite3 /local/save/path

, ADB :

adb root

:

+12

adb pull/data/data/com.application/databases/ adb pull/data/data/com.zameen.propforce/databases/

-, , ,

. adb su,

+2

Source: https://habr.com/ru/post/1665947/


All Articles