0% found this document useful (0 votes)
280 views2 pages

Updater Script

The document describes the steps taken to update system, vendor, and firmware images on an Android device. It patches the system and vendor partitions, extracts new boot and firmware files, and finalizes the radio update by extracting additional firmware files. Progress is tracked throughout the process.

Uploaded by

Ande Nero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
280 views2 pages

Updater Script

The document describes the steps taken to update system, vendor, and firmware images on an Android device. It patches the system and vendor partitions, extracts new boot and firmware files, and finalizes the radio update by extracting additional firmware files. Progress is tracked throughout the process.

Uploaded by

Ande Nero
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ui_print("Target:

Android/sdm660_64/sdm660_64:9/PKQ1/16.2017.1910.059-20190920:user/release-keys");
show_progress(0.650000, 0);
ui_print("Patching system image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/system",
package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat") ||
abort("E1001: Failed to update system image.");
show_progress(0.100000, 0);
ui_print("Patching vendor image unconditionally...");
block_image_update("/dev/block/bootdevice/by-name/vendor",
package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat") ||
abort("E2001: Failed to update vendor image.");
show_progress(0.050000, 5);
package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
show_progress(0.200000, 10);

# ---- radio update tasks ----

ui_print("Patching firmware images...");


ifelse(msm.boot_update("main"), (
package_extract_file("firmware-update/cmnlib64.mbn",
"/dev/block/bootdevice/by-name/cmnlib64");
package_extract_file("firmware-update/cmnlib.mbn.bak",
"/dev/block/bootdevice/by-name/cmnlibbak");
package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpm");
package_extract_file("firmware-update/xbl.elf.bak", "/dev/block/bootdevice/by-name/xblbak");
package_extract_file("firmware-update/abl.elf", "/dev/block/bootdevice/by-name/abl");
package_extract_file("firmware-update/devcfg.mbn.bak",
"/dev/block/bootdevice/by-name/devcfgbak");
package_extract_file("firmware-update/BTFM.bin.bak",
"/dev/block/bootdevice/by-name/bluetoothbak");
package_extract_file("firmware-update/pmic.elf", "/dev/block/bootdevice/by-name/pmic");
package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tz");
package_extract_file("firmware-update/hyp.mbn.bak",
"/dev/block/bootdevice/by-name/hypbak");
package_extract_file("firmware-update/abl.elf.bak", "/dev/block/bootdevice/by-name/ablbak");
package_extract_file("firmware-update/asusfw.img", "/dev/block/bootdevice/by-name/asusfw");
package_extract_file("firmware-update/cmnlib64.mbn.bak",
"/dev/block/bootdevice/by-name/cmnlib64bak");
package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hyp");
package_extract_file("firmware-update/pmic.elf.bak",
"/dev/block/bootdevice/by-name/pmicbak");
package_extract_file("firmware-update/tz.mbn.bak", "/dev/block/bootdevice/by-name/tzbak");
package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlib");
package_extract_file("firmware-update/rpm.mbn.bak",
"/dev/block/bootdevice/by-name/rpmbak");
package_extract_file("firmware-update/keymaster64.mbn",
"/dev/block/bootdevice/by-name/keymaster");
package_extract_file("firmware-update/keymaster64.mbn.bak",
"/dev/block/bootdevice/by-name/keymasterbak");
package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xbl");
package_extract_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfg");
), "");
ifelse(msm.boot_update("backup"), (
package_extract_file("firmware-update/cmnlib64.mbn",
"/dev/block/bootdevice/by-name/cmnlib64bak");
package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpmbak");
package_extract_file("firmware-update/abl.elf", "/dev/block/bootdevice/by-name/ablbak");
package_extract_file("firmware-update/pmic.elf", "/dev/block/bootdevice/by-name/pmicbak");
package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tzbak");
package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hypbak");
package_extract_file("firmware-update/cmnlib.mbn",
"/dev/block/bootdevice/by-name/cmnlibbak");
package_extract_file("firmware-update/keymaster64.mbn",
"/dev/block/bootdevice/by-name/keymasterbak");
package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xblbak");
package_extract_file("firmware-update/devcfg.mbn",
"/dev/block/bootdevice/by-name/devcfgbak");
), "");
msm.boot_update("finalize");
package_extract_file("firmware-update/NON-HLOS.bin",
"/dev/block/bootdevice/by-name/modem");
package_extract_file("firmware-update/BTFM.bin", "/dev/block/bootdevice/by-name/bluetooth");
set_progress(1.000000);

You might also like