Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OLD base:
- if range_sha1("/dev/block/mmcblk0p25", "52,0,32770,32905,32907,33390,65535,65536,65538,98304,98306,98441,98443,98926,131071,131072,131074,163840,163842,163977,163979,164462,196603,196608,196610,229376,229378,229513,229515,229998,239416,262144,262146,294912,294914,295049,295051,327680,327682,360448,360450,393216,393218,425984,425986,458752,458754,491520,491522,524288,524290,524773,524799") == "09ac92e7f3673e420ecaf9b413490118ea1e3d99" then
- if range_sha1("/dev/block/mmcblk0p25", "76,32770,32905,32907,33390,65535,65536,65538,66050,97792,98304,98306,98441,98443,98926,131071,131072,131074,131586,163328,163840,163842,163977,163979,164462,196603,196608,196610,197122,228864,229376,229378,229513,229515,229998,239416,239928,261632,262144,262146,262658,294400,294912,294914,295049,295051,295563,327168,327680,327682,328194,359936,360448,360450,360962,392704,393216,393218,393730,425472,425984,425986,426498,458240,458752,458754,459266,491008,491520,491522,492034,523776,524288,524290,524773,524799,524800") == "56a9d23bbdaf41a82223663ea660ff04f3f23a33" then
- NEW base:
- if range_sha1("/dev/block/mmcblk0p25", "54,0,32767,32768,32770,32905,32907,33390,65535,65536,65538,98304,98306,98441,98443,98926,131071,131072,131074,163840,163842,163977,163979,164462,196607,196608,196610,229376,229378,229513,229515,229998,245782,262144,262146,294912,294914,295049,295051,327680,327682,360448,360450,393216,393218,425984,425986,458752,458754,491520,491522,524288,524290,524773,524799") == "3b8e2590071586192596cfc726646dcd09b3a886" then
- if range_sha1("/dev/block/mmcblk0p25", "78,32767,32768,32770,32905,32907,33390,65535,65536,65538,66050,97792,98304,98306,98441,98443,98926,131071,131072,131074,131586,163328,163840,163842,163977,163979,164462,196607,196608,196610,197122,228864,229376,229378,229513,229515,229998,245782,246294,261632,262144,262146,262658,294400,294912,294914,295049,295051,295563,327168,327680,327682,328194,359936,360448,360450,360962,392704,393216,393218,393730,425472,425984,425986,426498,458240,458752,458754,459266,491008,491520,491522,492034,523776,524288,524290,524773,524799,524800") == "d830e6c83cb5e117b4ef973795b2ff4c02cb3adc" then
- OLD script:
- assert(getprop("ro.product.device") == "SGH-I727" || getprop("ro.build.product") == "SGH-I727" || getprop("ro.product.device") == "skyrocket" || getprop("ro.build.product") == "skyrocket" || abort("This package is for device: SGH-I727,skyrocket; this device is " + getprop("ro.product.device") + "."););
- ui_print("************************************************");
- ui_print("************************************************");
- ui_print(" / ]/ | \| \ | | |/ ___/ | | |");
- ui_print(" / /| o | _ | \| | ( \_ | || | |");
- ui_print(" / / | | | | D | ~ |\__ || ||_ _|");
- ui_print("/ \_| _ | | | |___, |/ \ || || |");
- ui_print("\ | | | | | | |\ || || | |");
- ui_print(" \____|__|__|__|__|_____|____/ \___|____|__|__|");
- ui_print("************************************************");
- ui_print("************************************************");
- ifelse(is_mounted("/system"), unmount("/system"));
- 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);
- mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system", "");
- ui_print("Running backup tool...");
- run_program("/tmp/install/bin/backuptool.sh", "backup");
- unmount("/system");
- show_progress(0.750000, 0);
- ui_print("Patching system image unconditionally...");
- block_image_update("/dev/block/mmcblk0p25", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
- ui_print("Verifying the updated system image...");
- if range_sha1("/dev/block/mmcblk0p25", "52,0,32770,32905,32907,33390,65535,65536,65538,98304,98306,98441,98443,98926,131071,131072,131074,163840,163842,163977,163979,164462,196603,196608,196610,229376,229378,229513,229515,229998,239416,262144,262146,294912,294914,295049,295051,327680,327682,360448,360450,393216,393218,425984,425986,458752,458754,491520,491522,524288,524290,524773,524799") == "09ac92e7f3673e420ecaf9b413490118ea1e3d99" then
- if range_sha1("/dev/block/mmcblk0p25", "76,32770,32905,32907,33390,65535,65536,65538,66050,97792,98304,98306,98441,98443,98926,131071,131072,131074,131586,163328,163840,163842,163977,163979,164462,196603,196608,196610,197122,228864,229376,229378,229513,229515,229998,239416,239928,261632,262144,262146,262658,294400,294912,294914,295049,295051,295563,327168,327680,327682,328194,359936,360448,360450,360962,392704,393216,393218,393730,425472,425984,425986,426498,458240,458752,458754,459266,491008,491520,491522,492034,523776,524288,524290,524773,524799,524800") == "56a9d23bbdaf41a82223663ea660ff04f3f23a33" then
- ui_print("Verified the updated system image.");
- else
- abort("system partition has unexpected non-zero contents after OTA update");
- endif;
- else
- abort("system partition has unexpected contents after OTA update");
- endif;
- show_progress(0.020000, 10);
- mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system", "");
- ui_print("Restoring system...");
- run_program("/tmp/install/bin/backuptool.sh", "restore");
- unmount("/system");
- ui_print("Flashing SuperSU...");
- mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system", "");
- package_extract_dir("supersu", "/tmp/supersu");
- run_program("/sbin/busybox", "unzip", "/tmp/supersu/supersu.zip", "META-INF/com/google/android/*", "-d", "/tmp/supersu");
- run_program("/sbin/busybox", "sh", "/tmp/supersu/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/supersu/supersu.zip");
- unmount("/system");
- show_progress(0.050000, 5);
- package_extract_file("boot.img", "/dev/block/mmcblk0p8");
- show_progress(0.200000, 10);
- NEW script:
- assert(getprop("ro.product.device") == "SGH-I727" || getprop("ro.build.product") == "SGH-I727" || getprop("ro.product.device") == "skyrocket" || getprop("ro.build.product") == "skyrocket" || abort("This package is for device: SGH-I727,skyrocket; this device is " + getprop("ro.product.device") + "."););
- ui_print("Target: samsung/SGH-I727/SGH-I727:4.1.2/JZO54K/I727UCMC1:user/release-keys");
- ui_print("************************************************");
- ui_print("************************************************");
- ui_print(" / ]/ | \| \ | | |/ ___/ | | |");
- ui_print(" / /| o | _ | \| | ( \_ | || | |");
- ui_print(" / / | | | | D | ~ |\__ || ||_ _|");
- ui_print("/ \_| _ | | | |___, |/ \ || || |");
- ui_print("\ | | | | | | |\ || || | |");
- ui_print(" \____|__|__|__|__|_____|____/ \___|____|__|__|");
- ui_print("************************************************");
- ui_print("************************************************");
- ifelse(is_mounted("/system"), unmount("/system"));
- 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);
- mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system", "");
- ui_print("Running backup tool...");
- run_program("/tmp/install/bin/backuptool.sh", "backup");
- unmount("/system");
- show_progress(0.750000, 0);
- ui_print("Patching system image unconditionally...");
- block_image_update("/dev/block/mmcblk0p25", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat");
- ui_print("Verifying the updated system image...");
- if range_sha1("/dev/block/mmcblk0p25", "54,0,32767,32768,32770,32905,32907,33390,65535,65536,65538,98304,98306,98441,98443,98926,131071,131072,131074,163840,163842,163977,163979,164462,196607,196608,196610,229376,229378,229513,229515,229998,245782,262144,262146,294912,294914,295049,295051,327680,327682,360448,360450,393216,393218,425984,425986,458752,458754,491520,491522,524288,524290,524773,524799") == "3b8e2590071586192596cfc726646dcd09b3a886" then
- if range_sha1("/dev/block/mmcblk0p25", "78,32767,32768,32770,32905,32907,33390,65535,65536,65538,66050,97792,98304,98306,98441,98443,98926,131071,131072,131074,131586,163328,163840,163842,163977,163979,164462,196607,196608,196610,197122,228864,229376,229378,229513,229515,229998,245782,246294,261632,262144,262146,262658,294400,294912,294914,295049,295051,295563,327168,327680,327682,328194,359936,360448,360450,360962,392704,393216,393218,393730,425472,425984,425986,426498,458240,458752,458754,459266,491008,491520,491522,492034,523776,524288,524290,524773,524799,524800") == "d830e6c83cb5e117b4ef973795b2ff4c02cb3adc" then
- ui_print("Verified the updated system image.");
- else
- abort("system partition has unexpected non-zero contents after OTA update");
- endif;
- else
- abort("system partition has unexpected contents after OTA update");
- endif;
- show_progress(0.020000, 10);
- mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system", "");
- ui_print("Restoring system...");
- run_program("/tmp/install/bin/backuptool.sh", "restore");
- unmount("/system");
- ui_print("Flashing SuperSU...");
- mount("ext4", "EMMC", "/dev/block/mmcblk0p25", "/system", "");
- package_extract_dir("supersu", "/tmp/supersu");
- run_program("/sbin/busybox", "unzip", "/tmp/supersu/supersu.zip", "META-INF/com/google/android/*", "-d", "/tmp/supersu");
- run_program("/sbin/busybox", "sh", "/tmp/supersu/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/supersu/supersu.zip");
- unmount("/system");
- show_progress(0.050000, 5);
- package_extract_file("boot.img", "/dev/block/mmcblk0p8");
- show_progress(0.200000, 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement