Advertisement
Guest User

Untitled

a guest
Aug 30th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.85 KB | None | 0 0
  1. :: Pavelol Splash Flasher
  2. :: File: Splash Flasher By Pavelol.bat
  3. @echo off
  4. color 0b
  5. title Splash Flasher
  6. cls
  7.  
  8. :start
  9. echo -----------------------------------------------------
  10. echo Splash Flasher For The HTC One M8 By Pavelol
  11. echo -----------------------------------------------------
  12. echo 1. I want to flash my image as splash to my device ;)
  13. echo 2. I already have a splash.img i just want to flash it.
  14. echo 3. I want to backup my current splash.
  15. echo 4. I don't know how i got here, i want to quit ;(
  16.  
  17. set /p choice=
  18.  
  19. if '%choice%'=='1' goto begin full process
  20. if '%choice%'=='2' goto push splash
  21. if '%choice%'=='3' goto backup splash
  22. if '%choice%'=='4' goto exit process
  23.  
  24. cls
  25. echo ---------------------------------------
  26. echo Are you drunk? there isn't such choice: %choice%
  27. echo ---------------------------------------
  28. echo.
  29. goto start
  30. pause
  31.  
  32. :begin full process
  33. echo ----------------------------------------------------------------------
  34. echo Place your intended splash to the root of the script folder.
  35. echo Now rename your intended splash to splash :)
  36. echo.
  37. echo (Don't forget! your splash should be formated as BMP and 24 Bit Depth)
  38. echo ----------------------------------------------------------------------
  39. echo.
  40. echo.
  41. echo.
  42. echo -----------------------------------------------------------------------
  43. echo when you finished that, hit any key to start a process which convert
  44. echo your's splash.bmp to a splash.img
  45. echo -----------------------------------------------------------------------
  46. pause
  47.  
  48. tools\nbimg -F splash.bmp -w 1080 -h 1920
  49. REN splash.bmp.nb splash1.img
  50.  
  51. move splash1.img flash
  52.  
  53. xcopy tools\android-info.txt flash
  54.  
  55. tools\7za a -tzip splash.zip .\flash\*
  56. del flash\*.* /q
  57.  
  58. move splash.zip flash
  59.  
  60. cls
  61. echo.
  62. echo.
  63. echo -----------------------------------------------------------------
  64. echo Now i will reboot your phone into fastboot and i will flash it ;)
  65. echo -----------------------------------------------------------------
  66. pause
  67. tools\adb kill-server
  68. tools\adb reboot bootloader
  69.  
  70.  
  71. ping -n 10 127.0.0.1>nul
  72. tools\fastboot oem rebootRUU
  73.  
  74. ping -n 15 127.0.0.1>nul
  75.  
  76. tools\fastboot flash zip flash\splash.zip
  77.  
  78. cls
  79. echo.
  80. echo.
  81. echo ---------------------------------------------------------------------
  82. echo Actually I have done with you...
  83. echo Press any key to reboot the device and to close this annoying window
  84. echo ---------------------------------------------------------------------
  85. pause
  86. tools\fastboot reboot
  87.  
  88. goto end
  89. exit
  90.  
  91. :push splash
  92. echo -----------------------------------------------------------------------
  93. echo Place your intended splash.img to the root of the script folder.
  94. echo Now rename your intended splash to splash :)
  95. echo.
  96. echo.
  97. echo (Don't forget! if you choose this option your splash is already formated
  98. echo as splash.img)
  99. echo -----------------------------------------------------------------------
  100. echo.
  101. echo.
  102. echo.
  103. echo ---------------------------------------------------------------
  104. echo when you finished that, hit any key to flash the splash
  105. echo ---------------------------------------------------------------
  106. pause
  107.  
  108. REN splash.img splash1.img
  109. move splash1.img flash
  110.  
  111. xcopy tools\android-info.txt flash
  112.  
  113. tools\7za a -tzip splash.zip .\flash\*
  114. del flash\*.* /q
  115.  
  116. move splash.zip flash
  117.  
  118. tools\adb kill-server
  119. tools\adb reboot bootloader
  120.  
  121.  
  122. ping -n 10 127.0.0.1>nul
  123. tools\fastboot oem rebootRUU
  124.  
  125. ping -n 15 127.0.0.1>nul
  126.  
  127. tools\fastboot flash zip flash\splash.zip
  128.  
  129. echo.
  130. echo.
  131. cls
  132. echo ---------------------------------------------------------------------
  133. echo Actually I have done with you...
  134. echo Press any key to reboot the device and to close this annoying window
  135. echo ---------------------------------------------------------------------
  136. pause
  137.  
  138. tools\fastboot reboot
  139.  
  140. goto end
  141. exit
  142.  
  143. :backup splash
  144.  
  145. tools\adb wait-for-device
  146. tools\adb shell dd if=/dev/block/mmcblk0p12 of=/mnt/sdcard/backup.img
  147. tools\adb pull /sdcard/backup.img backup
  148. tools\adb shell rm /sdcard/backup.img
  149. tools\ffmpeg -f rawvideo -pix_fmt rgb565 -s 1080x1920 -i backup\backup.img -f image2 backup\backup.png
  150. cls
  151. echo ---------------------------------------------------------------------
  152. echo Actually I have done with you...
  153. echo Press any key to exit
  154. echo ---------------------------------------------------------------------
  155. pause
  156. cls
  157. goto start
  158.  
  159. :exit process
  160. goto end
  161. :end
  162. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement