How to open SQLite database in SQLite Management Tool

I am working on an Android project and have problems managing SQLite databases.

I downloaded the SQLite management tool and don’t know how to open the database and test.

File β†’ open database β†’

I know that the DB file is located in /data/data/package_name/databases , but how to find it in Windows Explorer. (In brief, how to find the way to open the SQLite database in the management tool)

0
source share
6 answers

The file systems of your computer and your Android device / simulator are different. You can copy files back and forth, but you cannot open files in the Android file system from a computer (and vice versa).

If you use Eclipse, open the Android / File Explorer view and use the "Pull from device" / "Tap on device" buttons on this toolbar to copy files back and forth. This is the best you can do.

EDIT: Theoretically, you could run Samba on an emulator or on a root phone; then you can redirect the SMB port to the host and have time to work with the fun database file. See Great Internet for a guide to Samba.

+2
source

You can view the android db file on Windows using the "SQLite Database Browser".

Copy your db file to your desktop and open it with this application.

download this application here

+3
source

In addition to Seva's answer, if your device is not deployed, you will not be able to access the application database file on the real device; You can only copy it from the emulator.

0
source

You are probably already talking about the SQLite file coming from the emulator, right? If so, and you have problems because the SQLite management tool does not see the file, save it with the .sqlite extension!

0
source

Another option is to use SQLite3 in adb. It is built into adb. Below is a link for adb and another for using SQLite3 in it.

How to use adb http://developer.android.com/guide/developing/tools/adb.html

Using SQlite3 via adb http://www.sqlite.org/sqlite.html

Hope this helps, George

0
source

You can achieve this in two ways, for example, we created our db file in external storage,

1 - using ADB, adb pull /mnt/shell/emulated/0/(your_db_name) any_path_you_pull

Note: if you create multiple folders, update the command accordingly.

2 - using DDMS, DDMS / File Explorer / mnt / shell / emulated / 0 / (your_db_name), and you can pull using the pull button in the right corner of the DDMS window after selecting the db file.

You can also put your db file using push using the same path. You can use any SQLite viewer tool to view db.

0
source

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


All Articles