Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- assert(getprop("ro.product.device") == "YUPHORIA" || getprop("ro.build.product") == "YUPHORIA" || abort("This package is for device: YUPHORIA; this device is " + getprop("ro.product.device") + "."););
- ui_print("Verifying current system...");
- getprop("ro.build.fingerprint") == "YU/YUPHORIA/YUPHORIA:5.0.2/LRX22G/YNG1TBS1O3:user/release-keys" ||
- getprop("ro.build.fingerprint") == "YU/YUPHORIA/YUPHORIA:5.0.2/LRX22G/YNG1TBS2P2:user/release-keys" ||
- abort("Package expects build fingerprint of YU/YUPHORIA/YUPHORIA:5.0.2/LRX22G/YNG1TBS1O3:user/release-keys or YU/YUPHORIA/YUPHORIA:5.0.2/LRX22G/YNG1TBS2P2:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
- apply_patch_check("EMMC:/dev/block/bootdevice/by-name/boot:18903040:ed80f21ab91d9db8cfa11c99de5f45c402d9e402:18905088:e9ee3fc33dd82ad8aac0e5158bdbcb3c5e79c4ce") || abort("\"EMMC:/dev/block/bootdevice/by-name/boot:18903040:ed80f21ab91d9db8cfa11c99de5f45c402d9e402:18905088:e9ee3fc33dd82ad8aac0e5158bdbcb3c5e79c4ce\" has unexpected contents.");
- # ---- start making changes here ----
- (range_sha1("/dev/block/bootdevice/by-name/system", "2,0,1") == "07356baeeb0e80d9fc2180f8ac0885b8d519064b") || abort("/dev/block/bootdevice/by-name/system has been remounted R/W; reflash device to reenable OTA updates");
- if range_sha1("/dev/block/bootdevice/by-name/system", "68,0,32770,32897,32899,33411,65535,65536,65538,66050,98303,98304,98306,98433,98435,98947,131071,131072,131074,131586,163839,163840,163842,163969,163971,164483,196607,196608,196610,197122,229375,229376,229378,229505,229507,230019,262143,262144,262146,262658,294911,294912,294914,295041,295043,295555,327679,327680,327682,328194,360447,360448,360450,360962,393215,393216,393218,393730,425983,425984,425986,426498,458730,458752,458754,459266,468279,491520,491522") == "55b09244c9b073ff8b5e8ebb3f3b68d1e1f061c1" then
- ui_print("Patching system image...");
- show_progress(0.900000, 0);
- block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
- else
- (range_sha1("/dev/block/bootdevice/by-name/system", "68,0,32770,32897,32899,33411,65535,65536,65538,66050,98303,98304,98306,98433,98435,98947,131071,131072,131074,131586,163839,163840,163842,163969,163971,164483,196607,196608,196610,197122,229375,229376,229378,229505,229507,230019,262143,262144,262146,262658,294911,294912,294914,295041,295043,295555,327679,327680,327682,328194,360447,360448,360450,360962,393215,393216,393218,393730,425983,425984,425986,426498,458751,458752,458754,459266,467846,491520,491522") == "ec9d1342c8f0cf51febacbcf025f0ff42ecb6946") ||
- abort("system partition has unexpected contents");
- endif;
- ui_print("Patching boot image...");
- show_progress(0.100000, 10);
- apply_patch("EMMC:/dev/block/bootdevice/by-name/boot:18903040:ed80f21ab91d9db8cfa11c99de5f45c402d9e402:18905088:e9ee3fc33dd82ad8aac0e5158bdbcb3c5e79c4ce",
- "-", e9ee3fc33dd82ad8aac0e5158bdbcb3c5e79c4ce, 18905088,
- ed80f21ab91d9db8cfa11c99de5f45c402d9e402, package_extract_file("patch/boot.img.p"));
- ui_print("Writing radio image...");
- ifelse((sha1_check(read_file("EMMC:/dev/block/platform/7824900.sdhci/by-name/aboot:643572:c2a01affa1bb5d923973d99c439aa8a2b88af640")) != ""),(ui_print("/dev/block/platform/7824900.sdhci/by-name/aboot already up to date")),(package_extract_file("emmc_appsboot.mbn", "/dev/block/platform/7824900.sdhci/by-name/aboot")));
- set_progress(1.000000);
Advertisement
Add Comment
Please, Sign In to add comment