Ever since the first release of the Android N developer preview, I get "permission denied" errors when attempting to list the root directory or other system directories. The permissions on these directories didn't seem to change (as far as I can tell).
Question:
What change(s) in Android N caused these permission denied errors?
How to replicate:
In ADB shell, run the following commands:
run-as com.debuggable.packagename
ls /
This gives permission denied errors on Android N.
Why list system directories:
I noticed this behavior on Android N with several file managers. They could no longer list the root directory or other system files. This also is limiting the output of running ps
in a shell. The changes also caused this library to stop working on Android N.