Advertisement
Advertisement


Android: adb: Permission Denied


Question

Whatever I type after "adb shell" it fails with Permission denied:

D:\android-sdk-windows\platform-tools>adb shell find /data -name *.db
find: permission denied

D:\android-sdk-windows\platform-tools>adb shell test
test: permission denied

D:\android-sdk-windows\platform-tools>adb remount
remount failed: No such file or directory

Any ideas?

2013/11/11
1
87
11/11/2013 4:08:04 AM

Accepted Answer

According to adb help:

adb root                     - restarts the adbd daemon with root permissions

Which indeed resolved the issue for me.

2016/07/21
125
7/21/2016 7:42:09 AM

Without rooting: If you can't root your phone, use the run-as <package> command to be able to access data of your application.

Example:

$ adb exec-out run-as com.yourcompany.app ls -R /data/data/com.yourcompany.app/

exec-out executes the command without starting a shell and mangling the output.

2017/04/29

The reason for "permission denied" is because your Android machine has not been correctly rooted. Did you see $ after you started adb shell? If you correctly rooted your machine, you would have seen # instead.

If you see the $, try entering Super User mode by typing su. If Root is enabled, you will see the # - without asking for password.

2012/11/15

You might need to activate adb root from the developer settings menu. If you run adb root from the cmd line you can get:

root access is disabled by system setting - enable in settings -> development options

Once you activate the root option (ADB only or Apps and ADB) adb will restart and you will be able to use root from the cmd line.

2013/03/04

data partition not accessible for non root user, if you want to access it you must root your phone.

adb root not work for all product and depend in phone build type.

in new version on android studio you can explore /data/data path for debuggable apps.

2018/12/19

Be careful with the slash, change "\" for "/" , like this: adb.exe push SuperSU-v2.79-20161205182033.apk /storage

2017/12/26

Source: https://stackoverflow.com/questions/7399028
Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Email: [email protected]