Skip to content

Instantly share code, notes, and snippets.

@rhyttr
Last active October 19, 2024 04:37
Show Gist options
  • Save rhyttr/931f5f14f40793a45170809bec6ca62a to your computer and use it in GitHub Desktop.
Save rhyttr/931f5f14f40793a45170809bec6ca62a to your computer and use it in GitHub Desktop.
Android 6.0.1 (Build M4B30Z) Root for Nexus 5
# Download latest Android image, "hammerhead" for Nexus 5 (GSM/LTE)
https://developers.google.com/android/nexus/images#hammerhead
# Download latest TWRP
https://dl.twrp.me/hammerhead/
# Download latest SuperSu
https://download.chainfire.eu/supersu
Enable USB debugging.
Reboot into bootloader (power off, volume down + power on or sudo adb reboot-bootloader)
# Wait for boot loader to start
# Install factory ROM:
unzip hammerhead-m4b30z-factory-625c027b.zip
cd hammerhead-m4b30z
unzip image-hammerhead-m4b30z.zip
fastboot flash bootloader bootloader-hammerhead-hhz20h.img
fastboot reboot-bootloader #or power off/start bootloader
fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.30.img
fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash system system.img
# add params -S 256M if remaining memory is not enough . eg: sudo fastboot flash -S 256M system system.img
fastboot flash recovery recovery.img
fastboot reboot
# Wait boot to finish for application upgrade.
adb push SR1-SuperSU-v2.82-SR1-20170608224931.zip /sdcard/
adb reboot-bootloader
# [Wait for bootloader to start]
adb start-server
fastboot flash recovery twrp-3.1.1-0-hammerhead.img
fastboot reboot-bootloader
# on the screen, Navigate into Recovery mode (Reboot) -> Install -> zip, select SR3-SuperSU-v2.79-SR3-20170114223742.zip -> Swipe to confirm Flash
# Reboot System
@maizy
Copy link

maizy commented Mar 2, 2019

If your phone have locked bootloader. Also fastboot oem unlock needed before flashing bootloader.

@MuteObserver
Copy link

MuteObserver commented Mar 8, 2021

Appreciate you placing this up. - Helpful shortcut for me, here!
Cheers; stay healthy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment