Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- TITLE 2nd-INIT Prof of Concept for Kyocera Rise
- echo after this script is done, your phone will boot into TWRP. Make sure your phone is ready for adb
- pause
- echo setting up files for temp recovery
- echo pushing TWRP zip
- adb push TWRP.zip /sdcard/
- echo pushing busybox
- adb push busybox /sdcard/
- echo pushing stage2 script
- adb push stage2.sh /sdcard/
- echo pushing 2nd-init
- adb push 2nd-init /sdcard/
- echo mounting root as writable
- adb shell su -c "mount -wo remount rootfs /"
- echo copying busybox to sbin
- adb shell su -c "cat /sdcard/busybox > /sbin/busybox"
- echo copying 2nd-init to sbin
- adb shell su -c "cat /sdcard/2nd-init > /sbin/2nd-init"
- echo making busybox executable
- adb shell su -c "chmod 777 /sbin/busybox"
- echo making 2nd-init executable
- adb shell su -c "chmod 777 /sbin/2nd-init"
- echo extracting TWRP to rootfs
- adb shell su -c "ln -s /sbin/busybox /sbin/unzip"
- adb shell su -c "unzip -q -o /sdcard/TWRP.zip -d /"
- echo starting 2nd-init
- #adb shell su -c "/sbin/2nd-init"
Advertisement
Add Comment
Please, Sign In to add comment