I am developing an app and I know my database *.db
will appear in data/data/com.****.***
I can access this file from AVD in Eclipse with he
may be to access this folder you need administrative rights.
so you have two options:-
p.s. : if you are using any of above two options you can access this folder by following these steps
open DDMS perspective -> your device ->(Select File Explorer from right window options) select package -> data -> data -> package name ->files
and from there you can pull up your file
SQLlite database is store on user's Phone and it's hidding under path:
/Data/Data/com.companyname.AppName/File/
you have 2 options here:
If you are using Android Studio 3.0 or later version then follow these steps.
You can only expand packages which runs in debug mode on non-rooted device.
Accessing the files directly on your phone is difficult, but you may be able to copy them to your computer where you can do anything you want with it. Without rooting you have 2 options:
If the application is debuggable you can use the run-as
command in adb shell
adb shell
run-as com.your.packagename
cp /data/data/com.your.packagename/
Alternatively you can use Android's backup function.
adb backup -noapk com.your.packagename
You will now be prompted to 'unlock your device and confirm the backup operation'. It's best NOT to provide a password, otherwise it becomes more difficult to read the data. Just click on 'backup my data'. The resulting 'backup.ab' file on your computer contains all application data in android backup format. Basically it's a compressed tar file. This page explains how you can use OpenSSL's zlib command to uncompress it.
You can use the adb restore backup.db
command to restore the backup.
You can download a sigle file like that:
adb exec-out run-as debuggable.app.package.name cat files/file.mp4 > file.mp4
Before you download you might wan't to have a look at the file structure in your App-Directory. For this do the following steps THelper
noticed above:
adb shell
run-as com.your.packagename
cd files
ls -als .
The Android-Studio way Shahidul
mentioned (https://stackoverflow.com/a/44089388/1256697) also work. For those who don't see the DeviceFile Explorer
Option in the Menu: Be sure, to open the /android-Directory in Android Studio.
E.g. react-native users have this inside of their Project-Folder right on the same Level as the /ios-Directory.
The easiest way (just one simple step) to pull a file from your debuggable application folder (let's say /data/data/package.name/databases/file
) on an unrooted Android 5.0+ device is by using this command:
adb exec-out run-as package.name cat databases/file > file