return super.onCreateOptionsMenu(menu);
}
+
+ private String getArch() {
+ String prop = System.getProperty("os.arch");
+ if (prop.contains("x86") || prop.contains("i686") || prop.contains("i386")) {
+ return "x86";
+ } else if (prop.contains("mips")) {
+ return "mips";
+ } else {
+ return "armeabi";
+ }
+ }
File extractSu() throws IOException, InterruptedException {
- String arch = "armeabi";
- if (System.getProperty("os.arch").contains("x86") || System.getProperty("os.arch").contains("i686") || System.getProperty("os.arch").contains("i386"))
- arch = "x86";
ZipFile zf = new ZipFile(getPackageCodePath());
- ZipEntry su = zf.getEntry("assets/" + arch + "/su");
+ ZipEntry su = zf.getEntry("assets/" + getArch() + "/su");
InputStream zin = zf.getInputStream(su);
File ret = getFileStreamPath("su");
FileOutputStream fout = new FileOutputStream(ret);
zout.close();
ZipFile zf = new ZipFile(getPackageCodePath());
- ZipEntry ze = zf.getEntry("assets/reboot");
+ ZipEntry ze = zf.getEntry("assets/" + getArch() + "/reboot");
InputStream in;
FileOutputStream reboot;
StreamUtility.copyStream(in = zf.getInputStream(ze), reboot = openFileOutput("reboot", MODE_PRIVATE));
}
// this is intentionally not localized as it will change constantly.
- private static final String WHATS_NEW = "Recovery installation fixes for some devices.";
+ private static final String WHATS_NEW = "Added support for Android 4.3.";
protected void doWhatsNew() {
if (WHATS_NEW.equals(Settings.getString(this, "whats_new")))
return;