I've created an app using Android Studio and it has a database file handler. I've gone through a few post and everywhere they are saying go to data\data\ folder to get the app folder. But mine doesn't show any folder for my app. Do I have to manually set this file location to be created? How can I find my database.db file?
Asked
Active
Viewed 60 times
3 Answers
2
It should be automatically placed in data/data/databases in your app folder unless you specify otherwise. Are you sure it is created?
That is /data/data/package-name/databases/dbfilename
I have another suggestion. If you have enabled backup for your application, you might be able to use ADB BACKUP, like suggested here: http://blog.shvetsov.com/2012/09/backup-your-android-without-root-or.html

Kenneth
- 3,957
- 8
- 39
- 62
-
I didn't do anything to folder structures. There are other game app folders and all the other com.xxxx folders but not mine. – Padmal Sep 01 '15 at 14:25
-
I'm using Samsung Galaxy S Duos 2. Is it something wrong with my phone then? – Padmal Sep 01 '15 at 14:26
-
So in /data/data you can not find your package? The package name is the "package" field in your application manifest, for example package="com.test.foo" – Kenneth Sep 01 '15 at 14:27
-
I do not think the brand or phone type matters, and as stated below, this will only be possible to extract on a rooted or emulated device. – Kenneth Sep 01 '15 at 14:28
-
That's the problem. I can't find my package inside that data/data folder. There are com.android blah blah folders and game folders like com.ea.r3_row likewise but not my package com.blog.accounts – Padmal Sep 01 '15 at 14:32
-
How do you browse the folder? What message do you get? Your phone is rooted? – Kenneth Sep 01 '15 at 14:35
-
My Files -> All Files -> Device Storage -> Android -> data is one data folder where there are dropbox and EA games folders with com.android folders. Device Storage -> data -> data folder is empty but has one folder com.sec.andoid.app.FileShareServer – Padmal Sep 01 '15 at 14:45
-
I think you are looking in the wrong place, in order to access til apps data you need root access, you are using a regular file browser. – Kenneth Sep 01 '15 at 14:58
-
Without rooting it is impossible to get that db file right? :/ Thanks @Kenneth – Padmal Sep 02 '15 at 02:55
0
The database files are located in the following folders.
/data/data/packagename/databases/

coding
- 71
- 2
- 10
0
You can access the .db file only on emulator, its not possible on actual device. In the android studio open the DDMS perspective, there on the left hand side you will find the storage structure, there in data/data/ you will get the file you are looking for

Rohit Jagtap
- 1,660
- 1
- 14
- 12
-
You can on a rooted device using shell. For example "adb pull /data/data/com.foo.bar/databases/db.sql" – Kenneth Sep 01 '15 at 20:11
-
yup you are right, but i just thought rooting device is not a standard way. – Rohit Jagtap Sep 02 '15 at 04:46