Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- assert(getprop("ro.product.device") == "YUREKA" || getprop("ro.build.product") == "YUREKA" || abort("This package is for device: YUREKA; this device is " + getprop("ro.product.device") + "."););
- ui_print("Verifying current system...");
- getprop("ro.build.fingerprint") == "YU/YUREKA/YUREKA:5.0.2/LRX22G/YNG1TAS1K0:user/release-keys" ||
- getprop("ro.build.fingerprint") == "YU/YUREKA/YUREKA:5.0.2/LRX22G/YNG1TAS34J:user/release-keys" ||
- abort("Package expects build fingerprint of YU/YUREKA/YUREKA:5.0.2/LRX22G/YNG1TAS1K0:user/release-keys or YU/YUREKA/YUREKA:5.0.2/LRX22G/YNG1TAS34J:user/release-keys; this device has " + getprop("ro.build.fingerprint") + ".");
- apply_patch_check("EMMC:/dev/block/bootdevice/by-name/boot:16930816:e28dfc6e0fb57fc2a4d670ae97b1b93f439d9db5:16949248:175e731e42a687813b135083f3f3b8e1da3463a3") || abort("\"EMMC:/dev/block/bootdevice/by-name/boot:16930816:e28dfc6e0fb57fc2a4d670ae97b1b93f439d9db5:16949248:175e731e42a687813b135083f3f3b8e1da3463a3\" has unexpected contents.");
- # ---- start making changes here ----
- (range_sha1("/dev/block/bootdevice/by-name/system", "2,0,1") == "f1a4eb3c662886cde4675d2968cd48c5ecdfdffa") || 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", "46,0,32770,32849,32851,33331,65535,65536,65538,66018,98303,98304,98306,98385,98387,98867,131071,131072,131074,131554,163839,163840,163842,163921,163923,164403,196607,196608,196610,197090,229374,229376,229378,229457,229459,229939,262143,262144,262146,262626,272218,294912,294914,294993,294995,295475,307199") == "41c9e82da94760bc9876941e1f5e89f66d6e449b" 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", "46,0,32770,32849,32851,33331,65535,65536,65538,66018,98303,98304,98306,98385,98387,98867,131071,131072,131074,131554,163839,163840,163842,163921,163923,164403,196607,196608,196610,197090,229375,229376,229378,229457,229459,229939,262143,262144,262146,262626,271938,294912,294914,294993,294995,295475,307199") == "517d5322358e97bf93d02d4043776100e2d513c8") ||
- 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:16930816:e28dfc6e0fb57fc2a4d670ae97b1b93f439d9db5:16949248:175e731e42a687813b135083f3f3b8e1da3463a3",
- "-", 175e731e42a687813b135083f3f3b8e1da3463a3, 16949248,
- e28dfc6e0fb57fc2a4d670ae97b1b93f439d9db5, 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:3964464:84add82197c126957557e47616ed81b57625f57d")) != ""),(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