mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 08:35:37 -04:00
Add strace, fix startup error
This commit is contained in:
parent
0b7501c28d
commit
53154d03dd
@ -124,7 +124,7 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
|
|
||||||
private static final int LTYPE_INVOCATION = 0;
|
private static final int LTYPE_INVOCATION = 0;
|
||||||
private static final int LTYPE_PROCESS = 1;
|
private static final int LTYPE_PROCESS = 1;
|
||||||
private final int LAUNCH_TYPE = LTYPE_PROCESS;
|
private final int LAUNCH_TYPE = LTYPE_INVOCATION;
|
||||||
// LTYPE_INVOCATION;
|
// LTYPE_INVOCATION;
|
||||||
|
|
||||||
// private static Collection<? extends Provider.Service> rsaPkcs1List;
|
// private static Collection<? extends Provider.Service> rsaPkcs1List;
|
||||||
@ -996,6 +996,13 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void startStrace(int pid) throws Exception {
|
||||||
|
String[] straceArgs = new String[] {"/system/bin/strace",
|
||||||
|
"-o", new File(Tools.MAIN_PATH, "strace.txt").getAbsolutePath(), "-f", "-p", "" + pid};
|
||||||
|
System.out.println("strace args: " + Arrays.toString(straceArgs));
|
||||||
|
Runtime.getRuntime().exec(straceArgs);
|
||||||
|
}
|
||||||
|
|
||||||
private void runCraft() throws Throwable {
|
private void runCraft() throws Throwable {
|
||||||
String[] launchArgs = getMCArgs();
|
String[] launchArgs = getMCArgs();
|
||||||
|
|
||||||
@ -1096,6 +1103,10 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
BinaryExecutor.initJavaRuntime();
|
BinaryExecutor.initJavaRuntime();
|
||||||
BinaryExecutor.chdir(Tools.MAIN_PATH);
|
BinaryExecutor.chdir(Tools.MAIN_PATH);
|
||||||
|
|
||||||
|
if (new File(Tools.MAIN_PATH, "strace.txt").exists()) {
|
||||||
|
startStrace(android.os.Process.myTid());
|
||||||
|
}
|
||||||
|
|
||||||
VMLauncher.launchJVM(javaArgList.toArray(new String[0]));
|
VMLauncher.launchJVM(javaArgList.toArray(new String[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,6 @@ public class PojavLoginActivity extends AppCompatActivity
|
|||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
firstLaunchPrefs = getSharedPreferences("pojav_extract", MODE_PRIVATE);
|
firstLaunchPrefs = getSharedPreferences("pojav_extract", MODE_PRIVATE);
|
||||||
new File(Tools.mpProfiles).mkdir();
|
|
||||||
|
|
||||||
// Remove vmos warning???
|
// Remove vmos warning???
|
||||||
/*
|
/*
|
||||||
@ -308,6 +307,7 @@ public class PojavLoginActivity extends AppCompatActivity
|
|||||||
mkdirs(Tools.worksDir);
|
mkdirs(Tools.worksDir);
|
||||||
mkdirs(Tools.versnDir);
|
mkdirs(Tools.versnDir);
|
||||||
mkdirs(Tools.libraries);
|
mkdirs(Tools.libraries);
|
||||||
|
mkdirs(Tools.mpProfiles);
|
||||||
|
|
||||||
File file0 = new File(Tools.mpProfiles);
|
File file0 = new File(Tools.mpProfiles);
|
||||||
File file1 = new File(Tools.mpModEnable);
|
File file1 = new File(Tools.mpModEnable);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user