Titokhan

cm-lettuce-405aaf9dc6-to-79f9ccdc85-signed updater-script

Jun 24th, 2015
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.41 KB | None | 0 0
  1. 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") + "."););
  2. ui_print("Verifying current system...");
  3. getprop("ro.build.fingerprint") == "YU/YUPHORIA/YUPHORIA:5.0.2/LRX22G/YNG1TBS1O3:user/release-keys" ||
  4. getprop("ro.build.fingerprint") == "YU/YUPHORIA/YUPHORIA:5.0.2/LRX22G/YNG1TBS2P2:user/release-keys" ||
  5. 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") + ".");
  6. 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.");
  7.  
  8. # ---- start making changes here ----
  9.  
  10. (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");
  11. 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
  12. ui_print("Patching system image...");
  13. show_progress(0.900000, 0);
  14. block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
  15. else
  16. (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") ||
  17. abort("system partition has unexpected contents");
  18. endif;
  19. ui_print("Patching boot image...");
  20. show_progress(0.100000, 10);
  21. apply_patch("EMMC:/dev/block/bootdevice/by-name/boot:18903040:ed80f21ab91d9db8cfa11c99de5f45c402d9e402:18905088:e9ee3fc33dd82ad8aac0e5158bdbcb3c5e79c4ce",
  22. "-", e9ee3fc33dd82ad8aac0e5158bdbcb3c5e79c4ce, 18905088,
  23. ed80f21ab91d9db8cfa11c99de5f45c402d9e402, package_extract_file("patch/boot.img.p"));
  24. ui_print("Writing radio image...");
  25. 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")));
  26. set_progress(1.000000);
Advertisement
Add Comment
Please, Sign In to add comment