Runs command as root (if available) and return output @deprecated Consider using Shell.Pool.SU.run() instead @param command The command to run @return Output of the command, or null if root isn't available or in case of an error
(@NonNull String command)
| 395 | * case of an error |
| 396 | */ |
| 397 | @Nullable |
| 398 | @Deprecated |
| 399 | @WorkerThread |
| 400 | public static List<String> run(@NonNull String command) { |
| 401 | return Shell.run("su", new String[]{ |
| 402 | command |
| 403 | }, null, false); |
| 404 | } |
| 405 | |
| 406 | /** |
| 407 | * Runs commands as root (if available) and return output |