When I run lsusb
in Termux, the output is permission denied
. I don't have root access.
Perhaps the Android system allows me to get specific access in root?
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It only takes a minute to sign up.
Sign up to join this communityWhen I run lsusb
in Termux, the output is permission denied
. I don't have root access.
Perhaps the Android system allows me to get specific access in root?
lsusb
command lists entries in /sys/bus/usb/devices
which is world-readable but SELinux would be denying access because u:r:untrusted_app:s0
context isn't allowed to access u:object_r:sysfs:s0
.
However you can try adb shell lsusb
because sepolicy allows u:r:shell:s0
to read the directory as defined here:
allow shell sysfs:dir r_dir_perms
And here:
define(`r_dir_perms', `{ open getattr read search ioctl lock }')