1

I want to get the /data/data/packagename/databases/test.db, but i can not get it "Permission denied".

I use adb shell to access data folder, it shows:

$ sudo adb shell
$ cd data
$ ls
ls: can't open '.': Permission denied

why?? I can access /system folder

SteD
  • 13,909
  • 12
  • 65
  • 76
herbertD
  • 10,657
  • 13
  • 50
  • 77
  • 1
    If you are aceessing it from the emulator terminal then you can't. – Vikas Patidar Feb 23 '11 at 07:03
  • are you trying to access the data folder from device? – Tushar Vengurlekar Feb 23 '11 at 07:33
  • possible duplicate of [How to access the database when developing on Android phone?](http://stackoverflow.com/questions/2811615/how-to-access-the-database-when-developing-on-android-phone) – Volo Apr 12 '12 at 12:53
  • Possible duplicate of [How to access data/data folder in Android device?](http://stackoverflow.com/questions/13006315/how-to-access-data-data-folder-in-android-device) – THelper Jun 14 '16 at 08:10

2 Answers2

1

You need to be a root user to do that.

Samuh
  • 36,316
  • 26
  • 109
  • 116
0

First your phone should be rooted, you can use https://www.kingoapp.com/ for that. Next, you should modify the permission of your app access, to do so you have to :

  1. Locate your adb.exe folder (you can find it in your sdk folders)

  2. Right click

  3. open cmd here

  4. Type:

    adb shell su chmod 777 /data /data/data /data/data/yourapp

Good luck

Mehdi Boukhechba
  • 2,471
  • 2
  • 19
  • 24