inline Flashing new ROM on Nexus 5X from Stock

Originally published on May 1st, 2020 (Last updated on May 1st, 2020)

The Nexus 5X I start­ed with was run­ning a stock Android sys­tem with­out any updates made to it. This guide applies to Lin­ux Ubun­tu 17.04

This requires a set­up Android SDK! Step by step:

  1. Copy ROM, GApps and Root to Inter­nal Storage
    • ROM in this exam­ple was Para­noid Android
    • Down­load suit­ing pack­age from Open GApps (Nexus 5X is ARM64 arch!)
    • Down­load Super­SU (option­al). (not done here!)
  2. Unlock Boot­loader:
    • Reboot phone into fast­boot: adb reboot bootloader or Hoold pow­er and Vol­ume Down together.
    • (as root) Check if device is found: fastboot devices
    • (as root) Unlock boot­loader: fastboot oem unlock
    • (as root) Reboot device: fastboot reboot
  3. Install cus­tom Recov­ery (TWRP):
    • Down­load from the offi­cial site
    • Reboot into fast­boot (see above)
    • (as root) Flash new recov­ery: fastboot flash recovery path/to/twrp.img
    • Impor­tant: After the reboot, Android deletes TWRP auto­mat­i­cal­ly! We need to boot into recov­ery at least once, so it stays on the phone after reboots. After issu­ing the next com­mand, hold Pow­er and Vol­ume Down imme­di­at­ly!
    • (as root) Reboot the phone: fastboot reboot
    • After boot­ing into fast­boot again, use Vol­ume Down to flip to Recov­ery” and press Pow­er to select it. TWRP should start.
  4. Flash new stuff
    • Click Wipe” and wipe every­thing except Inter­nal Storage”
    • Select Install” from the main menu
    • If you did wipe the inter­nal stor­age or for­got to put the images on it, you can copy them over via adb: adb push /local/file /sdcard/remote-file.
    • Select the ROM, swipe to flash, fol­low instructions
    • Select GApps, swipe to flash, fol­low instructions
    • (Option­al) Flash root
    • Wipe Dalvik for good mea­sure (should prompt for it)
    • Select Reboot” from the main menu.
  5. Prof­it!

After the reboot, the sys­tem set­up should launch. Check Set­tings” > About Phone” > Para­noid Android Ver­sion” to ver­i­fy every­thing worked.


No com­ment sec­tion here 😄

You can reach me over at @knuth_dev or send me an Email.