How to access data/data folder in Android device?

You could also try fetching the db using root explorer app. And if that does not work then you can try this:

  1. Open cmd
  2. Change your directory and go into 'Platform tools'
  3. Type 'adb shell'
  4. su
  5. Press 'Allow' on device
  6. chmod 777 /data /data/data /data/data/com.application.package /data/data/com.application.package/*
  7. Open DDMS view in Eclipse and from there open 'FileExplorer' to get your desired file

After this you should be able to browse the files on the rooted device.


If you are using Android Studio 3.0 or later version then follow these steps.

  1. Click View > Tool Windows > Device File Explorer.
  2. Expand /data/data/[package-name] nodes.

You can only expand packages which runs in debug mode on non-rooted device.

Steps followed in Android Studio 3.0


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:

  1. 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/
    
  2. 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.