dtalley11

run.bat

Aug 24th, 2013
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. @echo off
  2. TITLE 2nd-INIT Prof of Concept for Kyocera Rise
  3. echo after this script is done, your phone will boot into TWRP. Make sure your phone is ready for adb
  4. pause
  5. echo setting up files for temp recovery
  6. echo pushing TWRP zip
  7. adb push TWRP.zip /sdcard/
  8. echo pushing busybox
  9. adb push busybox /sdcard/
  10. echo pushing stage2 script
  11. adb push stage2.sh /sdcard/
  12. echo pushing 2nd-init
  13. adb push 2nd-init /sdcard/
  14. echo mounting root as writable
  15. adb shell su -c "mount -wo remount rootfs /"
  16. echo copying busybox to sbin
  17. adb shell su -c "cat /sdcard/busybox > /sbin/busybox"
  18. echo copying 2nd-init to sbin
  19. adb shell su -c "cat /sdcard/2nd-init > /sbin/2nd-init"
  20. echo making busybox executable
  21. adb shell su -c "chmod 777 /sbin/busybox"
  22. echo making 2nd-init executable
  23. adb shell su -c "chmod 777 /sbin/2nd-init"
  24. echo extracting TWRP to rootfs
  25. adb shell su -c "ln -s /sbin/busybox /sbin/unzip"
  26. adb shell su -c "unzip -q -o /sdcard/TWRP.zip -d /"
  27. echo starting 2nd-init
  28. adb shell su -c "/sbin/2nd-init"
Advertisement
Add Comment
Please, Sign In to add comment