Move I/O to background thread

Fix #177
This commit is contained in:
topjohnwu 2024-06-10 17:48:13 -07:00
parent d3df1a1b5a
commit 9bd331aa1e

View File

@ -150,10 +150,6 @@ public class RootServiceManager implements Handler.Callback {
private Shell.Task startRootProcess(ComponentName name, String action) {
Context context = Utils.getContext();
if (Utils.hasStartupAgents(context)) {
Log.e(TAG, JVMTI_ERROR);
}
if ((flags & RECEIVER_REGISTERED) == 0) {
// Register receiver to receive binder from root process
IntentFilter filter = new IntentFilter(RECEIVER_BROADCAST);
@ -172,6 +168,10 @@ public class RootServiceManager implements Handler.Callback {
}
return (stdin, stdout, stderr) -> {
if (Utils.hasStartupAgents(context)) {
Log.e(TAG, JVMTI_ERROR);
}
Context ctx = Utils.getDeContext();
File mainJar = new File(ctx.getCacheDir(), "main.jar");