Browse Source

Hopefully re-enable A/B devices

master
Felix 3 years ago
parent
commit
45e0f292c3
  1. 21
      META-INF/com/google/android/updater-script
  2. 2
      tmp/patch_dualsim.sh

21
META-INF/com/google/android/updater-script

@ -4,19 +4,36 @@ ui_print(" Dualsim support");
ui_print(" by");
ui_print(" Gouster4, oshmoun, local__hero & MartinX3");
ui_print("------------------------------------");
ui_print("");
ui_print("Getting current slot (if on A/B)");
if
getprop("ro.boot.slot_suffix")
then
ui_print("Current slot is " + getprop("ro.boot.slot_suffix"));
else
ui_print("Non-A/B device!");
endif;
ui_print("Mounting system partition...");
run_program("/sbin/mkdir", "/mnt/system");
run_program("/sbin/mount", "/dev/block/bootdevice/by-name/system", "/mnt/system");
run_program("/sbin/mount", "/dev/block/bootdevice/by-name/system" + getprop("ro.boot.slot_suffix"), "/mnt/system");
ui_print("Mounting vendor partition (may fail) ...");
run_program("/sbin/mount", "/vendor");
ui_print("Mounting oem partition (may fail) ...");
run_program("/sbin/mount", "/oem");
ui_print("Running patch script...");
package_extract_dir("tmp", "/tmp");
set_perm(0, 0, 0777, "/tmp/patch_dualsim.sh");
run_program("/tmp/patch_dualsim.sh");
ui_print("");
ui_print("Unmounting system partition...");
unmount("/system");
unmount("/mnt/system");
ui_print("Unmounting vendor partition (may fail) ...");
unmount("/vendor");
ui_print("Unmounting oem partition (may fail) ...");

2
tmp/patch_dualsim.sh

@ -82,7 +82,7 @@ get_lta_label() {
tr '[:upper:]' '[:lower:]' \
);
umount /lta-label
rm /lta-label
rm -r /lta-label
ui_print "Device variant is ${device_variant}"
}

Loading…
Cancel
Save