0

I use Samsung galaxy S2 for debugging. How can I see my database that create by my application.

I can't find by this way

Eclipse Go To Window > Showview > Other.. > File Expolrer Click On Open

Now browse To

data/data/your.package.name/databases/<DATABASE

FILE Here >

Abhijit Chakra
  • 3,201
  • 37
  • 66

8 Answers8

2

While you are debuging go to the DDMS tab. (With a virtual device, not with your phone)

Then search /sdcard/your aplication name/databases

** You have to configurate your AVD enter image description here

2

If you use emulator then go on DDMS and select device emulator then go file explore data>data>package name>database folder>.db file.

this file your database select this file and pope on any drive and open on SQLite browser.

WarrenFaith
  • 57,492
  • 25
  • 134
  • 150
1

You can only see the database on a rooted device. So root the device or just use an emulator instance, because the emulator is rooted by default.

WarrenFaith
  • 57,492
  • 25
  • 134
  • 150
0

You have to root your Device to see the database of your Applications.

Abhijit Chakra
  • 3,201
  • 37
  • 66
0

You can do it only if your device is rooted.

$ adb shell # open adb shell
$ su        # ask for superuser rights
$ cat /data/data/your.package.name/databases/database_name >> /sdcard/Download/database_name  # copy database file to a folder where you don't need root access to get it from device to PC
$ exit      # close adb shell
$ adb pull /sdcard/Download/database_name # get that copied file

Now you can browser via editor, such as sqlitebrowser

$ sqlitebrowser database_name
Yaroslav Mytkalyk
  • 16,950
  • 10
  • 72
  • 99
0

You can access app's database ONLY IF your device is rooted!

1). Find DDMS icon in the right-top of Eclipse IDE.

2). Click "File Explorer" tag.

3). Open in order :"data--> data--> your package name-->databases".

4). Select the database you want to check and click "pull a file from the device"button in the tool bar.

5).Browse sqlite database use this.

kiwi
  • 487
  • 1
  • 4
  • 16
0

If you want to see database. The way you did is correct but if your device is not root, you can not see. But I think you can run app on Emulator and: Eclipse Go To Window > Showview > Other.. > File Expolrer Click On Open.

There are 2 ways:
1. Root your device
2. Looking for it on emulator
Luc
  • 2,800
  • 2
  • 25
  • 46
0

I'm doing this with non-rooted device.
yes, it's really not a very short way but the only way I found, and if you have a big database that you want to be able to make queries and to explore it- that is comfortable way (on non rooted device) :

  • send your db file via e-mail to your pc
  • use sqlBrowser

now you can navigate your tables and exec sql queries on the data from your pc.

hope it will help somebody.

dvrm
  • 3,749
  • 4
  • 34
  • 43