Know Where Database is Stored in Android Studio

Introduction

 
This article explains how to determine the location of the database created programmatically by you in Android Studio, in other words, determine where the database is stored. You often need to see the database created by you so as to determine if it is created, if the values are being inserted or not and whether the table is being updated.
 
Step 1
 
Run the application in which your database is being created. The emulator needs to be in a running state to be able to continue the following procedure. For running your application press "Shift+F10".
 
Step 2:
 
Wait until your emulator starts working. Now go to "Tools" -> "Android" -> "DDMS (monitor included)". You can also open the DDMS from:
 
im1.jpg
 
Step 3
 
You will get the following:
 
im2.jpg
 
Step 4
 
Open the File Explorer tab. You will get:
 
im3.jpg
 
Step 5
 
Open "data" -> "data" from this window:
 
im4.jpg
 
Step 6
 
Now open your project present in this data folder.
 
im5.jpg
 
Step 7
 
Click on "databases". Select the file with the same name as the name of your database. Click on "Pull a file from device". Now save the file with a ".db" extension.
 
im6.jpg
 
Step 8
 
Now open Firefox. Go to "Tools" -> "SQLite Manager".
 
im7.jpg
 
Step 9
 
From this window select "Database" -> "Connect database".
 
im8.jpg
 
Step 10
 
Now browse and select the ".db" file that you saved in step 7.
 
Step 11:
 
On the left-hand side, you will see the name of the table created by you under "tables". Double-click on it to see the data stored in the database.
 
Thank you :) 


Similar Articles