Running Adb Commands Within App Gives Permission Denied
I am building an app which trying to execute some commands such as 'top' and others. i am working on android 7.0. i try this code in older android versions but when i try it on the
Solution 1:
From this
/sys and /proc are well known for leaking side channel information about processes, information which can be used to infer state about the processes. For instance, it's been documented for years that /proc access can be used to monitor for app launching, enabling phishing attacks.
So, with the release of N, dev team had intentionally restricted access of /sys
and /proc
. If I'm not mistaken, adb top
command also solely relies on the reading of /proc
's states. This is, I presume, therefore not possible to perform top
command through ProcessBuilder
without being encountered the permission denied error starting from Android N.
Post a Comment for "Running Adb Commands Within App Gives Permission Denied"