chenshaoju

OnePlus 5T Official Firmware Update Script

Apr 5th, 2018
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. getprop("ro.display.series") == "OnePlus 5T" || abort("E3004: This package is for \"OnePlus 5T\" devices; this is a \"" + getprop("ro.display.series") + "\".");
  2. show_progress(0.750000, 0);
  3. ui_print("Patching system image unconditionally...");
  4. block_image_update("/dev/block/bootdevice/by-name/system", package_extract_file("system.transfer.list"), "system.new.dat", "system.patch.dat") ||
  5. abort("E1001: Failed to update system image.");
  6. show_progress(0.050000, 10);
  7. show_progress(0.050000, 5);
  8. package_extract_file("boot.img", "/dev/block/bootdevice/by-name/boot");
  9. show_progress(0.200000, 10);
  10. ui_print("Writing static_nvbk image...");
  11. package_extract_file("RADIO/static_nvbk.bin", "/dev/block/bootdevice/by-name/oem_stanvbk");
  12.  
  13. # ---- radio update tasks ----
  14.  
  15. ui_print("Patching firmware images...");
  16. ifelse(msm.boot_update("main"), (
  17. package_extract_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64");
  18. package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlib");
  19. package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hyp");
  20. package_extract_file("firmware-update/pmic.elf", "/dev/block/bootdevice/by-name/pmic");
  21. package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tz");
  22. package_extract_file("firmware-update/devcfg.mbn", "/dev/block/bootdevice/by-name/devcfg");
  23. package_extract_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymaster");
  24. package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xbl");
  25. package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpm");
  26. ), "");
  27. ifelse(msm.boot_update("backup"), (
  28. package_extract_file("firmware-update/cmnlib64.mbn", "/dev/block/bootdevice/by-name/cmnlib64bak");
  29. package_extract_file("firmware-update/cmnlib.mbn", "/dev/block/bootdevice/by-name/cmnlibbak");
  30. package_extract_file("firmware-update/hyp.mbn", "/dev/block/bootdevice/by-name/hypbak");
  31. package_extract_file("firmware-update/tz.mbn", "/dev/block/bootdevice/by-name/tzbak");
  32. package_extract_file("firmware-update/keymaster.mbn", "/dev/block/bootdevice/by-name/keymasterbak");
  33. package_extract_file("firmware-update/xbl.elf", "/dev/block/bootdevice/by-name/xblbak");
  34. package_extract_file("firmware-update/rpm.mbn", "/dev/block/bootdevice/by-name/rpmbak");
  35. ), "");
  36. msm.boot_update("finalize");
  37. package_extract_file("firmware-update/logo.bin", "/dev/block/bootdevice/by-name/LOGO");
  38. package_extract_file("firmware-update/NON-HLOS.bin", "/dev/block/bootdevice/by-name/modem");
  39. package_extract_file("firmware-update/adspso.bin", "/dev/block/bootdevice/by-name/dsp");
  40. package_extract_file("firmware-update/BTFM.bin", "/dev/block/bootdevice/by-name/bluetooth");
  41. set_progress(1.000000);
Add Comment
Please, Sign In to add comment