Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Install Custom ROM on Nexus 5: Newb-Friendly Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Installing a custom ROM on your Nexus 5 replaces the stock Android system with a community-built version, giving you newer Android versions, better performance, or extra features long after official support ended. This guide walks you through the entire process, from unlocking the bootloader to flashing the ROM. It assumes you have a Windows, Mac, or Linux computer and a USB cable. You will lose all data on the phone, so back up anything important first.

What You'll Need

  • Nexus 5 (make sure it's the D820 or D821 model)
  • USB data cable (the one that came with the phone works)
  • A computer with internet access
  • Backup of your phone's data (photos, contacts, etc.)
  • Battery charged to at least 70%
  • Patience – this takes about 30-60 minutes

Step-by-Step

  1. Back up your data. Unlocking the bootloader wipes your phone completely. Copy photos, videos, and documents to your computer. Use Google's built-in backup for contacts and app data (Settings > Backup & reset).
  2. Enable Developer Options and USB debugging. On your phone, go to Settings > About phone and tap “Build number” seven times. Then go to Settings > Developer options and turn on “USB debugging” and “OEM unlocking” (if available).
  3. Install ADB and Fastboot on your computer. Download the official Google USB driver (Windows) and the platform-tools package from the Android developer site. Extract the platform-tools to a folder like C:\platform-tools on Windows or ~/platform-tools on Mac/Linux. Add that folder to your system PATH or just open a terminal/command prompt in that folder.
  4. Connect your phone and test the connection. Plug the phone into your computer with the USB cable. On the phone, accept the “Allow USB debugging” prompt. In your terminal, run adb devices. You should see your device listed as “device”. If it says “unauthorized”, re-check the phone and accept the prompt.
  5. Unlock the bootloader. In the terminal, run adb reboot bootloader. The phone will restart into the bootloader (a screen with an Android robot). Then run fastboot oem unlock. On the phone, use the volume keys to select “Yes” and press power to confirm. This wipes your phone and unlocks the bootloader. After it finishes, the phone will reboot. Set it up briefly (skip Google sign-in if you want) and re-enable USB debugging.
  6. Download a custom ROM and recovery. Choose a ROM that supports the Nexus 5, like LineageOS (official up to Android 8.1) or a community build of a newer Android version. Also download TWRP (Team Win Recovery Project) recovery image for hammerhead (the Nexus 5's codename). Make sure you get the correct files – check the ROM's official page for the exact download links.
  7. Flash TWRP recovery. Boot into the bootloader again (adb reboot bootloader). Then run fastboot flash recovery twrp-3.x.x-x-hammerhead.img (replace with the actual filename). After flashing, use the volume keys to select “Recovery mode” and press power. This boots into TWRP.
  8. Copy the ROM and GApps to your phone. While in TWRP, go to “Mount” and make sure “System” is not checked (leave it unchecked). Then go to “Advanced” > “ADB Sideload” and swipe to start sideload. On your computer, run adb sideload rom.zip (replace with the ROM filename). Do the same for GApps (Google Apps) if the ROM doesn't include them. Alternatively, you can use TWRP's file manager to copy from a USB OTG drive, but sideload is easiest.
  9. Wipe existing data. In TWRP, go to “Wipe” > “Advanced Wipe” and select Dalvik/ART Cache, System, Data, and Cache. Swipe to wipe. Do NOT wipe Internal Storage unless you want to completely clean the phone (you'll lose the ROM you just copied).
  10. Install the ROM. Go to “Install” in TWRP, select the ROM zip you copied, and swipe to flash. Wait for it to finish. Then flash the GApps zip the same way.
  11. Reboot and set up. Go to “Reboot” > “System”. The first boot can take 5-10 minutes. Once it boots, go through the setup wizard. You're done!

Common Mistakes

  • Downloading the wrong ROM or recovery for your exact model – always check the codename “hammerhead”.
  • Forgetting to unlock the bootloader before flashing – you'll get errors.
  • Not wiping data before flashing – causes boot loops or crashes.
  • Using a bad USB cable or port – use the original cable and a direct USB port on your computer.
  • Flashing a ROM that is too new for the hardware – some Android 10+ builds may be unstable on the Nexus 5.

Tips

  • Always read the ROM's official XDA thread or website for specific instructions – some ROMs require a specific firmware version.
  • Keep a backup of your stock ROM (you can make one in TWRP before wiping) so you can restore if needed.
  • After flashing, consider installing a custom kernel for better battery life, but only if you're comfortable.
  • Make sure you have the latest platform-tools – older versions may not support the Nexus 5 properly.

Troubleshooting

If your phone won't boot after flashing, try these in order:

  1. Boot into recovery. Hold power + volume down for a few seconds to get to bootloader, then select Recovery. If TWRP loads, you can reflash or wipe.
  2. Wipe cache and Dalvik. In TWRP, go to Wipe > Advanced Wipe and select Dalvik/ART Cache and Cache, then wipe. Reboot.
  3. Re-flash the ROM. If wiping doesn't help, go back to Wipe > Advanced Wipe and wipe System, Data, Cache, and Dalvik. Then reinstall the ROM and GApps from scratch.
  4. Check your downloads. Re-download the ROM and GApps – a corrupted download can cause boot loops. Verify the MD5 checksum if provided.
  5. Restore your backup. If you made a TWRP backup of your stock ROM, restore it via Restore in TWRP. If not, you can reflash the stock factory image using fastboot (search for “Nexus 5 factory image” on Google).

Frequently Asked Questions

Will I lose my data?

Yes, unlocking the bootloader and wiping will erase everything. Back up first.

Can I go back to stock Android?

Yes. Download the official factory image from Google's developers site and flash it with fastboot. That will restore the original system.

Do I need to root my phone?

No. Custom ROMs run without root. Rooting is a separate step you can skip.

Will my apps work?

Most apps will work, but some banking or payment apps may detect the custom ROM and refuse to run. You can try hiding root if you root, but it's not guaranteed.

What is GApps?

GApps is the package that installs Google Play Store and other Google apps. Some ROMs include it, but most require you to flash it separately.

How long does the first boot take?

It can take up to 10 minutes. If it takes longer than 15 minutes, something is wrong – try reflashing.