You've already forked Magisk
mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-09-06 06:36:58 +00:00
Use root to launch su request Activity on Q
This commit is contained in:
@@ -32,6 +32,7 @@ import com.topjohnwu.superuser.Shell;
|
||||
import com.topjohnwu.superuser.internal.UiThreadHandler;
|
||||
import com.topjohnwu.superuser.io.SuFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -165,4 +166,19 @@ public class Utils {
|
||||
toast(R.string.open_link_failed_toast, Toast.LENGTH_SHORT);
|
||||
}
|
||||
}
|
||||
|
||||
public static String argsToCommand(List<String> args) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String s : args) {
|
||||
if (s.contains(" ")) {
|
||||
sb.append('"').append(s).append('"');
|
||||
} else {
|
||||
sb.append(s);
|
||||
}
|
||||
sb.append(' ');
|
||||
}
|
||||
sb.deleteCharAt(sb.length() - 1);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user