After run the project through mobile In the android device monitor only i see the (data) but it does not show the hierarchy means data->data.
-
1DDMS -> file explorer -> data -> data -> see your package name -> databases -> here your . Follow this Path. Pull the database to your desktop and Mozilla is providing the SqiliteDatabse plugin.After installing the plugin you can paste your database there.Hope this will help you. – Jaimin Thakkar Feb 13 '17 at 07:07
-
thanks j ..after going to file explorer i can see only data ..remaining hierarchy part is not showing ,,after run the project in my mobile – Dipankar Dutta Feb 13 '17 at 07:27
-
What exactly do you mean with "hierarchy"? – CL. Feb 13 '17 at 08:00
-
DDMS -> file explorer -> data->(upto this i can see ) – Dipankar Dutta Feb 13 '17 at 08:02
-
This is not an answer to my question. What exactly do you want to see? – CL. Feb 13 '17 at 08:02
-
i have created the sqlite database and insert some data ..i want to see how it stored ... – Dipankar Dutta Feb 13 '17 at 08:05
-
@DipankarDutta: you have to run the project in emulator.you can not see the db which is run by your phone. – Jaimin Thakkar Feb 13 '17 at 08:35
3 Answers
You can't access the database via Android Device Monitor except on a rooted device as in the https://stackoverflow.com/a/8896049/4758255.
But you can use Stetho:
Stetho is a sophisticated debug bridge for Android applications. When enabled, developers have access to the Chrome Developer Tools feature natively part of the Chrome desktop browser. Developers can also choose to enable the optional dumpapp tool which offers a powerful command-line interface to application internals.

- 1
- 1

- 28,609
- 11
- 78
- 96
-
-
@cricket_007: Did you read the op question btw?. Op didn't ask about emulator and my answer didn't either. – ישו אוהב אותך Feb 13 '17 at 07:25
-
-
i am testing the app in real device..and i am using android studio 2.2.3 – Dipankar Dutta Feb 13 '17 at 07:58
If you want to view your database, then you need to give the path to store the database file in the constructor, as shown below.
public class DatabaseHelper extends SQLiteOpenHelper {
//Database helper class constructor...
public DatabaseHelper(Context context) {
super(context, context.getExternalFilesDir(DATABASE_NAME)
.getAbsolutePath() + File.separator + DATABASE_NAME, null, DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
}
}
After doing this you can view the database with the help of DDMS.
Hope this is helpful :)

- 1,073
- 10
- 18
-
-
after selecting the data->(not able to see the data or hierarchy) – Dipankar Dutta Feb 13 '17 at 07:40
-
@DipankarDutta: Right now your database file is stored in external storage location not in data folder. data folder will open only for emulator not for phones. So we need to store the db file in external path and you need to check in "mnt->shell->emulated->0->Android->data->your package name" this is where I used to find the db in moto g first generation. Hope this helps:) – Jeevanandhan Feb 13 '17 at 08:09
-
Thank you very much dear.....now i can see the structure......again thanks a lot... – Dipankar Dutta Feb 13 '17 at 09:45
-
sorry ,i dont have more reputation to upvote your ans ..but i marked as a correct ans. someone has edited and given the votes i think ..thanks a lot ...you really help me a lot.. – Dipankar Dutta Feb 13 '17 at 16:27
I'd recommend using the Android Debug Database library. It's much easier to use, with minimal setup. Although you can not access it via your phone, but through your browser instead.

- 3,173
- 3
- 28
- 45