Fix root mouse capture with su binaries that don't like additional parameters after -c

This commit is contained in:
Cameron Gutman 2018-10-10 21:23:41 -07:00
parent fa761debc4
commit 7eac609219

View File

@ -55,7 +55,7 @@ public class EvdevCaptureProvider extends InputCaptureProvider {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
// Launch evdev_reader directly via SU // Launch evdev_reader directly via SU
try { try {
su = Runtime.getRuntime().exec("su -c "+evdevReaderCmd); su = new ProcessBuilder("su", "-c", evdevReaderCmd).start();
} catch (IOException e) { } catch (IOException e) {
reportDeviceNotRooted(); reportDeviceNotRooted();
e.printStackTrace(); e.printStackTrace();