}
File extractSu() throws IOException, InterruptedException {
- Process p = Runtime.getRuntime().exec("cat /proc/cpuinfo");
- String contents = StreamUtility.readToEnd(p.getInputStream());
- p.getInputStream().close();
- p.waitFor();
- contents = contents.toLowerCase();
String arch = "armeabi";
- if (contents.contains("x86"))
+ 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");
"rm /system/app/SuperUser.*\n" +
"rm /system/app/SuperSU.*\n" +
String.format("cat %s > /system/xbin/su\n", su.getAbsolutePath()) +
- "chmod 6777 /system/xbin/su\n" +
+ "chmod 6755 /system/xbin/su\n" +
"ln -s /system/xbin/su /system/bin/su\n" +
"mount -oro,remount /system\n" +
"sync\n";
}
// this is intentionally not localized as it will change constantly.
- private static final String WHATS_NEW = "The Superuser binary will show a browser message if Superuser was uninstalled and su is broken.\n\nNotifications can now be configured per app.";
+ private static final String WHATS_NEW = "Added translations.\n\nFixes for x86.";
protected void doWhatsNew() {
if (WHATS_NEW.equals(Settings.getString(this, "whats_new")))
return;
@Override
protected void onCreate(Bundle savedInstanceState) {
- Settings.applyDarkThemeSetting(this, R.style.SuperuserDark);
+ Settings.applyDarkThemeSetting(this, R.style.SuperuserDarkActivity);
super.onCreate(savedInstanceState);
if (Settings.getBoolean(this, "first_run", true)) {