daily pastebin goal
48%
SHARE
TWEET

flashall.bat-3.dat

a guest Nov 14th, 2017 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @ECHO OFF
  2. echo BY INSTALLING THE SOFTWARE, YOU ARE AGREEING TO BE BOUND BY THE BlackBerry
  3. echo Solution License Agreement which can be reviewed at www.blackberry.com/leg-
  4. echo al/bbsla. IF YOU HAVE ANY QUESTIONS OR CONCERNS ABOUT THE TERMS OF THIS AG-
  5. echo REEMENT, PLEASE CONTACT blackberry AT LEGALinfo@BLACKBERRY.COM. PLEASE READ
  6. echo THIS DOCUMENT CAREFULLY BEFORE INSTALLING OR USING THE SOFTWARE.
  7. echo ***************************************************************************
  8. echo.
  9. set BIN=.\host\windows-x86\bin
  10. set IMG=.\img
  11. set FASTBOOT=fastboot.exe
  12.  
  13. echo Note:If device is not in fastboot mode
  14. echo Please switch to fastboot mode by holding the power and volume down key for 30s
  15. for /f "tokens=1 delims=" %%i in ('%BIN%\fastboot.exe getvar device 2^>^&1 ^| findstr device ') do (set var1=%%i)
  16. set devname=%var1:device:=%
  17. set devname=%devname: =%
  18. if "%devname%" == "" (
  19.     echo Failed to detect the device name
  20.     GOTO End
  21. )
  22. for /f "tokens=1 delims=" %%i in ('%BIN%\fastboot.exe getvar hlos-sig-tag 2^>^&1 ^| findstr hlos-sig-tag ') do (set var1=%%i)
  23. set devname=%var1:hlos-sig-tag:=%
  24. set devname=%devname: =%
  25. set devname_sig=%devname%
  26. if "%devname%" == "" set devname=common
  27. for /f "tokens=1 delims=" %%i in ('%BIN%\fastboot.exe getvar variant 2^>^&1 ^| findstr variant ') do (set var2=%%i)
  28. set dev_variant=%var2:variant:=%
  29. set dev_variant=%dev_variant: =%
  30. if "%dev_variant%" == "" (
  31.     echo Failed to detect the device variant
  32.     GOTO End
  33. )
  34. if %dev_variant% == "dscn" set dev_variant=china
  35. if %dev_variant% == "cn" set dev_variant=china
  36. if %dev_variant% == "indonesia" set dev_variant=india
  37. set DCFG=devcfg
  38. if %dev_variant% == "china" set DCFG=devcfg_cn
  39. set /P answer=This script will wipe off all user data. Do you want to continue? [y/n]:
  40. if "%answer%" == "n" ( GOTO End
  41. ) else if "%answer%" == "y" ( GOTO COMMANDS
  42. ) else ( GOTO Error
  43. )
  44. :COMMANDS
  45. %BIN%\fastboot.exe oem securewipe
  46. ECHO "It may take 5 to 15 minutes to securely wipe the device"
  47. ping -n 5 127.0.0.1 > nul
  48. %BIN%\%FASTBOOT% flash tz %IMG%\tz.mbn
  49. %BIN%\%FASTBOOT% flash devcfg %IMG%\%DCFG%.mbn
  50. %BIN%\%FASTBOOT% flash rpm %IMG%\rpm.mbn
  51. %BIN%\%FASTBOOT% flash sbl1 %IMG%\sbl1_signed.mbn
  52. %BIN%\%FASTBOOT% flash aboot %IMG%\emmc_appsboot.mbn
  53. %BIN%\%FASTBOOT% flash bootsig %IMG%\boot.img%devname_sig%.sig
  54. %BIN%\%FASTBOOT% flash recoverysig %IMG%\recovery.img%devname_sig%.sig
  55. %BIN%\%FASTBOOT% flash boot %IMG%\boot.img
  56. %BIN%\%FASTBOOT% flash recovery %IMG%\recovery.img
  57. %BIN%\%FASTBOOT% flash cache %IMG%\cache.img
  58. %BIN%\%FASTBOOT% flash userdata %IMG%\userdata.img
  59. %BIN%\%FASTBOOT% flash modem %IMG%\NON-HLOS-%dev_variant%.bin
  60. %BIN%\%FASTBOOT% flash dsp %IMG%\adspso.bin
  61. %BIN%\%FASTBOOT% flash system %IMG%\system.img
  62. %BIN%\%FASTBOOT% flash oem %IMG%\oem_%devname%.img
  63. %BIN%\%FASTBOOT% reboot
  64. GOTO End
  65. :Error
  66. ECHO Please enter y or n! Bye bye!!
  67. :End
  68. echo Press any key to close this window
  69. pause >nul
RAW Paste Data
Top