rootbeer icon indicating copy to clipboard operation
rootbeer copied to clipboard

Attempt to execute su

Open scottyab opened this issue 8 years ago • 2 comments

attempt to execute su and check return code

scottyab avatar Oct 14 '16 11:10 scottyab

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 avatar Jan 17 '17 09:01 andrewjli

@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()

stealthcopter avatar Jan 17 '17 14:01 stealthcopter