1. #!/bin/bash
  2.  
  3. # Written By Brandon Golway (brando56894)
  4.  
  5. clear
  6. echo "This will build and flash the recovery image"
  7. echo "Then your phone will reboot into recovery"
  8. echo
  9. echo "Make sure you have your build environment setup correctly"
  10. echo "And your phone connected via USB with debugging enabled"
  11. echo
  12. read -p "Press Enter to continue."
  13. cd ~/android/system/
  14. make -j`grep 'processor' /proc/cpuinfo | wc -l`recoveryimage
  15. adb push ~/android/system/out/target/product/sholes/recovery.img /sdcard/
  16. adb shell flash_image recovery /sdcard/recovery.img
  17. adb reboot recovery