Can you transfer the database from an Android device to your computer for use as a database on an Android virtual device

I was wondering: can you transfer the database from an Android device to an Android virtual device in your development environment?

I use a program to enter books on a Samsung Galaxy S. From this program I can download the source code , which can help me understand various aspects of the Android development cycle.

I can compile the program perfectly and just run it on an Android virtual device. But is it possible to “download” or “transfer” the database that I created on a mobile device to my computer, and not to a virtual device?

+3
source share
2 answers

You can use Android Debug Bridge

Android Debug Bridge (adb) is a universal tool that allows you to control the state of an instance of an emulator or Android device.

You can find the adb tool in / platform -tools /.

You will need to use the command in ADB. pull

It copies the specified file from the emulator / device instance to your development computer.

If this assistant professor works for you, use the sqlite3 tool.

sqlite3 , .dump, .schema, SQL CREATE .

. .

, .

+2

. , . , , , , . ( /data/data/myapp.com/databases/ SD-, adb, ). , Android , .
/ , , . (, ) , .
, .

0

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


All Articles