daily pastebin goal
66%
SHARE
TWEET

Untitled

a guest Nov 17th, 2018 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/sbin/sh
  2.  
  3. if [ -e /cache/recovery/boot ]
  4. then
  5.  
  6. rm /cache/recovery/boot
  7. touch /cache/recovery/enterrecovery
  8.  
  9. else
  10.  
  11. # trigger blue LED
  12. echo '255' > /sys/devices/i2c-3/3-0040/leds/blue/brightness
  13. # trigger vibration
  14. echo '200' > /sys/class/timed_output/vibrator/enable
  15. # trigger button-backlight
  16. echo '255' > /sys/class/leds/button-backlight/brightness
  17. cat /dev/input/event0 > /dev/keycheck&
  18. sleep 3
  19.  
  20. # trigger blue LED
  21. echo '0' > /sys/devices/i2c-3/3-0040/leds/blue/brightness
  22. # trigger button-backlight
  23. echo '0' > /sys/class/leds/button-backlight/brightness
  24.  
  25. kill -9 $!
  26.  
  27. fi
  28.  
  29.  
  30. if [ -s /dev/keycheck -o -e /cache/recovery/enterrecovery ]
  31. then
  32. # fixing CPU clocks to avoid issues in recovery
  33. echo 1512000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
  34. echo 1512000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
  35. echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  36. echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
  37.  
  38. rm /cache/recovery/enterrecovery
  39.  
  40. # thread for restarting recovery
  41. /sbin/restartrecovery &
  42.  
  43. mount -o remount,rw rootfs /
  44. # shifting to "umount -l /partition" to avoid mounting issues in recovery
  45. umount -l /system
  46. umount -l /data
  47. umount -l /cache
  48. umount -l /sdcard
  49. umount -l /mnt/sdcard
  50. rm -r /sdcard
  51. rm -r /not/sdcard
  52. mkdir /sdcard
  53. mkdir /tmp
  54. rm /etc
  55. mkdir /etc
  56. cp /recovery.fstab /etc/recovery.fstab
  57. mount /dev/block/mmcblk0p15 /sdcard
  58.  
  59. # DooMLoRD - enable USB Mass Storage mode - thanks to Napstar
  60. echo 1 > /sys/devices/virtual/usb_composite/usb_mass_storage/enable
  61.  
  62. /sbin/recovery &
  63. /sbin/adbd_rec recovery
  64. fi
  65.  
  66. #continue booting
  67. /system/bin/chargemon
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top