Check SU binary
Check SU binary
Check SU binary existence
The su command lets you switch the current user to any other user. If you need to run a command as a different (non-root) user, use the –l [username] option to specify the user account. Additionally,su can also be used to change to a different shell interpreter on the fly.
su is an older but more fully-featured command. It can duplicate the functionality of sudo by use of the –c option to pass a single command to the shell. A variation on the checking for SU, this attempts a 'su' binary check on following location.
- /data/local/
- /data/local/bin/
- /data/local/xbin/
- /sbin/
- /su/bin/
- /system/bin/
- /system/bin/.ext/
- /system/bin/failsafe/
- /system/sd/xbin/
- /system/usr/we-need-root/
- /system/xbin/
- /cache/
- /data/
- /dev/