Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# make a new directory to work in
cd ~/Desktop && mkdir nexus501
# get the OTA
mv *.zip
# get the flashable super su
# get twrp
# get the factory image
mkdir factory_img && cd factory_img
# extract recovery.img, boot.img and system.img
tar xjf *.tgz
cd hammerhead-lrx21o
mv recovery.img ../../
mv boot.img ../../
mv system.img ../../
cd ../../
rm -r factory_img
# flash it
adb devices
adb reboot bootloader
fastboot devices
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash boot boot.img
adb reboot recovery
echo "wait for the android and red triangle"
echo "then press power + volume up and release"
read -p "then pick apply update from ADB [Press any key when ready]"
adb sideload
read -p "pick reboot to bootloader [Press any key when ready]"
fastboot flash recovery openrecovery-twrp-
read -p "pick recovery mode and press the power button [Press any key when ready]"
read -p "you should be in twrp, press advanced -> adb sideload [Press any key when ready]"
read -p "check both options (Wipe Dalvik Cache and Wipe Cache) then swipe the bar [Press any key when ready]"
adb sideload
echo "reboot and you're done"
echo "rm -r ~/Desktop/nexus501 if you're done and want to clean up"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.