As a brief note, today I tried to list the files in my Android application, which was running on a physical Android device — a Nexus 9 — with this
adb shell command:
adb shell com.alvinalexander.mybrowser ls /data/data/com.alvinalexander.mybrowser
When I did that, I got an Android/ADB “permission denied” error.
The short story is that a solution to this problem is to run the same command, but with the
run-as argument, like this: