How To Fix Destroying Chroot Environment Error When I Install Second Firmware In Dualboot Patcher?


Valeran

Members
Dec 31, 2017
1
1
Hi, I have destroying chroot environment error while I trying install second firmware cyanogenos mod 12.1 in dualboot patcher. On one of the forums somebody writing that problem have only custom firmware, one of this - xiaomi.eu multilang Miui firmware and I must edit file updaters-cript file, but example was for pro-version of device that have other code in file. So I have Xiaomi Redmi Note 3 Prime MTK with xiaomi.eu multilang MIUI 9.2.2 firmware. So what I must change in updater-script file for fixing this problem, lower I write my code of updater-script file:
Code:
assert(getprop("ro.product.device") == "hennessy" || getprop("ro.build.product") == "hennessy" || abort("This package is for device: hennessy; this device is " + getprop("ro.product.device") + "."););
ifelse(is_mounted("/system"), (run_program("/update-binary-tool", "unmount", "/system") == 0));
package_extract_dir("install", "/tmp/install");
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644);
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755);
(run_program("/update-binary-tool", "mount", "/system") == 0);
run_program("/tmp/install/bin/backuptool.sh", "backup");
(run_program("/update-binary-tool", "unmount", "/system") == 0);
if is_mounted("/data") then
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
else
(run_program("/update-binary-tool", "mount", "/data") == 0);
package_extract_file("META-INF/org/cyanogenmod/releasekey", "/tmp/releasekey");
run_program("/tmp/install/bin/otasigcheck.sh") != "31744" || abort("Can't install this package on top of incompatible data. Please try another package or run a factory reset");
(run_program("/update-binary-tool", "unmount", "/data") == 0);
endif;
show_progress(0.750000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/platform/mtk-msdc.0/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
show_progress(0.020000, 10);
(run_program("/update-binary-tool", "mount", "/system") == 0);
run_program("/tmp/install/bin/backuptool.sh", "restore");
(run_program("/update-binary-tool", "unmount", "/system") == 0);
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/platform/mtk-msdc.0/by-name/boot");
show_progress(0.200000, 10);