[Huawei Ascend Mate 2] scented:
Sign in key

I have a Freedom Mobile variant with bootloader unlocked. I was able to use a method on this forum to convert my phone oem to allow it to upgrade to the official Lollipop. Phone been great on Lollipop but lately slowing down. Thought I would try to get it update to Lineage OS 14.1. I've installed TWRP and download the lastest Lineage OS 14.1 for this phone.

Tried to flash the Lineage OS rom through TWRP but got an error 7 because my bootloader is unknown and the rom key wants it to be exactly MSM8226C00B322_BOOT. I read somewhere online that you need to delete the string assert to bypass the requirement of the script. Just wondering if anyone knows what to delete in the script below and if it would bypass and allow to install.

Thanks.

assert(getprop("ro.product.device") == "MT2L03" || getprop("ro.build.product") == "MT2L03" || getprop("ro.product.device") == "hwMT2L03" || getprop("ro.build.product") == "hwMT2L03" || getprop("ro.product.device") == "mt2" || getprop("ro.build.product") == "mt2" || getprop("ro.product.device") == "mt2l03" || getprop("ro.build.product") == "mt2l03" || abort("E3004: This package is for device: MT2L03,hwMT2L03,mt2,mt2l03; this device is " + getprop("ro.product.device") + "."););

assert(getprop("ro.bootloader") == "MSM8226C00B322_BOOT" || abort("This package supports bootloader(s): MSM8226C00B322_BOOT; this device has bootloader " + getprop("ro.bootloader") + "."););

ui_print("Target: Huawei/MT2L03/hwMT2L03:5.1/HuaweiMT2L03/C00B322:user/release-keys");

ifelse(is_mounted("/system"), unmount("/system"));

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);

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");

run_program("/tmp/install/bin/backuptool.sh", "backup");

unmount("/system");

if is_mounted("/data") then

package_extract_file("META-INF/org/lineageos/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

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data", "");

package_extract_file("META-INF/org/lineageos/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");

unmount("/data");

endif;

show_progress(0.750000, 0);

ui_print("Patching system image unconditionally...");

block_image_update("/dev/block/platform/msm_sdcc.1/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||

abort("E1001: Failed to update system image.");

show_progress(0.020000, 10);

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", "");

run_program("/tmp/install/bin/backuptool.sh", "restore");

unmount("/system");

show_progress(0.050000, 5);

package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");

show_progress(0.200000, 10);

set_progress(1.000000);