Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I read my database from DDMS

In android how can I read database which is in DDMS? I want to see the data of my database which is stored in DDMS can I do this?

like image 209
user1061793 Avatar asked Nov 30 '11 04:11

user1061793


3 Answers

DDMS--> file explorer-->data--> data--> your package name-->databases

Your database should be inside databases folder

once you select your database, you will see two icons on the upper tab wherein you can push or pull the database

like image 101
Pratik Bhat Avatar answered Sep 29 '22 02:09

Pratik Bhat


You need to read SQLite records.

In order to read your SQLite records you must run the project in your emulator and NOT in Android Device. If you want to read your SQL records in the actual Android table the process is more complicated. Solutions on line suggest that the only way to achieve is to “root” the device. This is a no-no process if you do not know what you are doing.

  1. Download the Windows SQLite Database Browser from here
  2. Install it at your PC.
  3. Run the project in Eclipse using the emulator only. DO NOT have connected it your android tablet in your PC when you do the run.
  4. After the run go to Eclipse –Window –Open Perspective –Other and Select DDMS.
  5. You will see a Devices tab to the left and several tabs to the right.
  6. Select from the Devices tab the project name.
  7. From the tabs in the right select the File Explorer. Notice a folder named Data.
  8. Expand the folder data and you will see another folder inside named data also.
  9. Expand the new folder data and you will see a number of folders reflecting the package names. Select and expand the project package name. REMEMBER YOUR PROJECT MUST BE RUNNING IN ORDER TO SEE THOSE FILES. Notice a subfolder with the name databases. Expand that too.
  10. Select the folder databases and click the button pull a file from a device. This button is located at the top right corner. Select/create a folder in your hard drive to save the folder with its content.
  11. Start SQLite Database Browser. Select icon open folder. Find the Databases folder you saved in your PC at the previous step 2.10.
  12. If you are in the tab Database structure you will see the tables and columns.
  13. You can select the Browse Data tab to see the table’s data.
  14. Select from the Table scroll the table name.
like image 22
Angelos Mavrogiannakis Avatar answered Sep 29 '22 03:09

Angelos Mavrogiannakis


If you are using Eclipse and wanting to read the contents of the sqlite directly from the DDMS without pulling it out from the databases folder, you can use questoid sqlite browser

You can download it from here also.

like image 34
Lalit Poptani Avatar answered Sep 29 '22 01:09

Lalit Poptani