Advertisement
Guest User

8953_fastboot_all_images.bat

a guest
Feb 18th, 2021
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. adb reboot bootloader
  3. for /f "tokens=2 delims=: " %%a in ('fastboot.exe getvar build_id 2^>^&1 ^| findstr build_id') do set build_id=%%a
  4. if "%build_id%"=="" (goto :Old_Way) else (goto :Check_Device)
  5.  
  6. :Check_Device
  7. set expected=BARDOCK
  8. for /f "tokens=2 delims=: " %%a in ('fastboot.exe getvar device 2^>^&1 ^| findstr device') do set device=%%a
  9. if "%device%"=="%expected%" (goto :Flash) else (goto :Error)
  10. :Old_Way
  11. set expected=MSM8953
  12. for /f "tokens=2 delims=: " %%a in ('fastboot.exe getvar product 2^>^&1 ^| findstr product') do set product=%%a
  13. if "%product%"=="%expected%" (goto :Flash) else (goto :Error)  
  14.  
  15. :Flash
  16. echo for not erase modemst1 and modemst2
  17. rem fastboot flash partition gpt_both0.bin
  18. fastboot flash tz tz.mbn
  19. fastboot flash sbl1 sbl1.mbn
  20. fastboot flash rpm rpm.mbn
  21. fastboot flash aboot emmc_appsboot.mbn
  22. fastboot flash devcfg devcfg.mbn
  23. fastboot flash lksecapp lksecapp.mbn
  24. fastboot flash keymaster keymaster.mbn
  25. fastboot flash cmnlib cmnlib.mbn
  26. fastboot flash cmnlib64 cmnlib64.mbn
  27.  
  28. fastboot flash tzbak tz.mbn
  29. fastboot flash sbl1bak sbl1.mbn
  30. fastboot flash rpmbak rpm.mbn
  31. fastboot flash abootbak emmc_appsboot.mbn
  32. fastboot flash devcfgbak devcfg.mbn
  33. fastboot flash lksecappbak lksecapp.mbn
  34. fastboot flash keymasterbak keymaster.mbn
  35. fastboot flash cmnlibbak cmnlib.mbn
  36. fastboot flash cmnlib64bak cmnlib64.mbn
  37.  
  38. rem fastboot flash fsg fs_image.tar.gz.mbn.img
  39. rem fastboot flash modemst1 dummy.bin
  40. rem fastboot flash modemst2 dummy.bin
  41. rem fastboot flash persist persist.img
  42.  
  43. fastboot erase misc
  44. fastboot erase boot
  45. fastboot flash modem NON-HLOS.bin
  46. fastboot flash system system.img
  47. fastboot flash cache cache.img
  48. fastboot flash userdata userdata.img
  49. fastboot flash recovery recovery.img
  50. rem fastboot flash sec sec.dat
  51. fastboot flash dsp adspso.bin
  52. fastboot flash mdtp mdtp.img
  53. fastboot erase splash
  54. fastboot flash splash splash.img
  55. fastboot erase DDR
  56. fastboot flash boot boot.img
  57.  
  58. fastboot reboot
  59. pause
  60. exit
  61.  
  62. :Error
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement