rootbeer
rootbeer copied to clipboard
Attempt to execute su
attempt to execute su
and check return code
This could potentially be detrimental for anyone that uses the library. According to this StackOverflow answe, executing su
using Runtime.getRuntime().exec
actually creates a new process each time it is executed.
@andrewjli The comments on that stackoverflow post indicate that this bug can be worked around if you use ProcessBuilder instead of Runtime.getRuntime().exec("su")
. Suggest anyone attempting to implement it using something like the following
new ProcessBuilder().command("su").start()