Skip to content

Instantly share code, notes, and snippets.

@coaxial
Last active July 17, 2016 01:16
Show Gist options
  • Save coaxial/0925c6f1eba9ed18977f to your computer and use it in GitHub Desktop.
Save coaxial/0925c6f1eba9ed18977f to your computer and use it in GitHub Desktop.
Nexus 5 rooted stock Marshmallow update procedure

How to update a rooted stock Android 6 Nexus 5

To save me from looking this information up everytime, here are the steps to update a rooted, stock Android 6 Nexus 5 phone.

Required files

Backup

  • Reboot phone in recovery mode and make a backup
  • Copy the backup to a computer $ adb pull /sdcard/TWRP

Update

  • Reboot in fastboot mode $ adb reboot bootloader
  • Flash bootloader: $ fastboot flash bootloader bootloader-hammerhead-{version}.img
  • Flash radio: $ fastboot flash radio radio-hammerhead-{version}.img
  • Flash boot: $ fastboot flash boot image-hammerhead-{version}/boot.img
  • Flash system: $ fastbot flash system image-hammerhead-{version}/system.img
  • Flash cache: $ fastboot flash cache image-hammerhead-{version}/cache.img
  • Flash recovery (TWRP has been erased): $ fastboot flash recovery twrp-{version}-hammerhead.img
  • Every step: fastboot -s $PHONE flash bootloader bootloader-hammerhead-$BOOTLOADER_VER.img && fastboot -s $PHONE flash radio radio-hammerhead-$RADIO_VER.img && fastboot -s $PHONE flash boot image-hammerhead-$IMG_VER/boot.img && fastboot -s $PHONE flash system image-hammerhead-$IMG_VER/system.img && fastboot -s $PHONE flash cache image-hammerhead-$IMG_VER/cache.img && fastboot -s $PHONE flash recovery ../twrp-3.0.2-0-hammerhead.img
  • Go to recovery
  • If TWRP offers it, make /system read-only
  • Sideload SuperSU and wipe cache + Dalvik
  • Do not let TWRP install SuperSU
  • Reboot system (may loop a few times)
  • Re-run AdAway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment