Modify the meta-data
Thanks, that’s exactly what i was looking for.
I added some code at the start of updater-script:
ui_print(getprop("ro.product.device") + " - " + getprop("ro.build.product") + " (bootloader: " + getprop("ro.boot.bootloader") + ")");
I get output hero2ltexx - hero2lte (bootloader: G935FXXU8ETI2)
. Still, the updater-script fails the universal8890.verify_bootloader_models() != "1"
check, which means VerifyBootloaderMin
returns not 1.
I don’t understand why it returns not 1 as the ro.boot.bootloader value i have should match here. I will try to investigate by building from source when i have a little time.
Still, by removing the checks for the variants and treating it as G935F, it installed fine. Here’s the updater-script i used:
ui_print("start updater");
ui_print("Target: samsung/hero2ltexx/hero2lte:8.0.0/R16NW/G935FXXU2ERD5:user/release-keys");
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("/tmp/install/bin/backuptool.sh", "backup", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM", "ext4");
ui_print("Patching system image unconditionally...");
show_progress(0.900000, 0);
block_image_update("/dev/block/platform/155a0000.ufs/by-name/SYSTEM", package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
run_program("/tmp/install/bin/e2fsck_static", "-fy", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM");
run_program("/tmp/install/bin/resize2fs_static", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM");
run_program("/tmp/install/bin/e2fsck_static", "-fy", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM");
show_progress(0.020000, 10);
run_program("/tmp/install/bin/backuptool.sh", "restore", "/dev/block/platform/155a0000.ufs/by-name/SYSTEM", "ext4");
package_extract_file("boot.img", "/dev/block/platform/155a0000.ufs/by-name/BOOT");
show_progress(0.100000, 10);
ui_print("Patching recovery image unconditionally...");
package_extract_file("firmware-update/recovery.img", "/dev/block/platform/155a0000.ufs/by-name/RECOVERY");
ui_print("Upgrading firmware");
package_extract_file("firmware-update/F_modem.bin", "/dev/block/platform/155a0000.ufs/by-name/RADIO");
package_extract_file("firmware-update/F_sboot.bin", "/dev/block/platform/155a0000.ufs/by-name/BOTA0");
package_extract_file("firmware-update/F_cm.bin", "/dev/block/platform/155a0000.ufs/by-name/BOTA1");
package_extract_file("firmware-update/F_param.bin", "/dev/block/platform/155a0000.ufs/by-name/PARAM");
run_program("/sbin/reboot","fota_bl");
ui_print("Firmware is up-to-date");
set_progress(1.000000);