Update to use new paths
This commit is contained in:
parent
7273a1c34d
commit
f520fe36bd
@ -130,10 +130,7 @@ public class SettingsActivity extends Activity implements Topic.Subscriber {
|
||||
.setPositiveButton(R.string.ok, (d, i) -> {
|
||||
prefs.edit().putString(Const.Key.CUSTOM_CHANNEL, url.getText().toString()).apply();
|
||||
})
|
||||
.setNegativeButton(R.string.close, (d, i) -> {
|
||||
mm.updateChannel = Const.Value.STABLE_CHANNEL;
|
||||
prefs.edit().putString(Const.Key.UPDATE_CHANNEL, String.valueOf(Const.Value.STABLE_CHANNEL)).apply();
|
||||
})
|
||||
.setNegativeButton(R.string.close, null)
|
||||
.show();
|
||||
}
|
||||
return true;
|
||||
|
@ -24,11 +24,20 @@ public class Const {
|
||||
public static final String MAGISK_DISABLE_FILE = "/cache/.disable_magisk";
|
||||
public static final String TMP_FOLDER_PATH = "/dev/tmp";
|
||||
public static final String MAGISK_LOG = "/cache/magisk.log";
|
||||
public static final String BUSYBOX_PATH = "/dev/magisk/bin";
|
||||
public static final File EXTERNAL_PATH = new File(Environment.getExternalStorageDirectory(), "MagiskManager");
|
||||
|
||||
public static String BUSYBOX_PATH() {
|
||||
if (Utils.itemExist("/sbin/.core/busybox/busybox")) {
|
||||
return "/sbin/.core/busybox";
|
||||
} else {
|
||||
return "/dev/magisk/bin";
|
||||
}
|
||||
}
|
||||
|
||||
public static String MAGISK_PATH() {
|
||||
if (Utils.itemExist("/dev/magisk/img")) {
|
||||
if (Utils.itemExist("/sbin/.core/img")) {
|
||||
return "/sbin/.core/img";
|
||||
} else if (Utils.itemExist("/dev/magisk/img")) {
|
||||
return "/dev/magisk/img";
|
||||
} else {
|
||||
return "/magisk";
|
||||
|
@ -89,8 +89,9 @@ public class Shell {
|
||||
}
|
||||
|
||||
// Root shell initialization
|
||||
String bbpath = Const.BUSYBOX_PATH();
|
||||
mm.shell.run_raw(false, false,
|
||||
"export PATH=" + Const.BUSYBOX_PATH + ":$PATH",
|
||||
"export PATH=" + bbpath + ":$PATH",
|
||||
"mount_partitions",
|
||||
"find_boot_image",
|
||||
"migrate_boot_backup");
|
||||
|
Loading…
Reference in New Issue
Block a user