1

my android device monitor is not working in android studio, is any other way to see existing sq-lite database,and give the possible reason of my android device monitor issue?.

Gopal Singh Sirvi
  • 4,539
  • 5
  • 33
  • 55

3 Answers3

2

Its nice question for newbie in android. For seeing SQLite database you have to follow below step.

Step 1: Setup emulator and run it.

If you have to see SQLite database you must Run your application in Android Emulator.

(Note:- If you run your application in physical device then you are not able to see database).

Step 2: Now Run you Android Device Monitor from Android studio,now find your android emulator there,click on it and you will show File Explorer in this monitor.

Step 3: In the File Explorer there are Data Folder.Go to Data folder,there is another data folder in it. Now Find your Application here.in your application folder there is folder with name database,Which contain SQLite database file.

(Note: File Explorer>data>data>Your Application Package>database)

Step 4: There are option in the top,From there you can "Pull a file from Device(emulator)",Click on it and save it to your computer.

So here is the file by reading it you can See your database. so,now how can we read it?

Step 5: For reading the file download SQLite Browser from here install it and open it in your computer.

Step 6: In this Browser Click on Open Database and open the file which you have pull from Device(emulator).

So here you can see your database structure and also browse data. Even, You can update data and Push the file with the Android Device monitor for manually update data.

Pranav P
  • 1,755
  • 19
  • 39
  • my Android Device Monitor is not working well,is any other way to reach my database? – muhammad safwan p Jul 09 '15 at 09:53
  • May be there are possibility to other way to reach database but i know the only this simple and easy way.You can find below answers for getting other way.Even you can find the answer of why your Android device monitor not work? solve the problem and go for my answer also, – Pranav P Jul 09 '15 at 10:24
0

You can use navicate premium to create explore and query to sqlite db.

In go to file explore of your emulator go to data > data > your app and database folder extract it to your computer and open in navicate.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sohail Zahid
  • 8,099
  • 2
  • 25
  • 41
0

You can extract your device database in linux (ubuntu) system from the following commands

Note: Make sure your device is connected to adb and showing in adb devices list

adb backup -f ~/data.ab -noapk <your app package name ex app.package.name>

dd if=data.ab bs=1 skip=24 | openssl zlib -d | tar -xvf -

The first command will create a data.ab file in home directory and second command should be run from the home directory as data.ab file is in that directory after running second command there will be a app folder created in your home directory, you can see your app package name directory under it and file your db file and shared preference xml.

Mohd Mufiz
  • 2,236
  • 17
  • 28