Smart Systems for Home

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

How to Install Android 9 Pie on Moto G5 Plus

· 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

Yes, you can install Android 9 Pie on your Moto G5 Plus, but the official update was never released by Motorola. The only reliable way is to flash a custom ROM like LineageOS 16.0, which is based on Android 9. This guide walks you through the entire process, from unlocking the bootloader to flashing the ROM. You'll need a computer, a USB cable, and about 30–45 minutes. This will wipe your phone completely, so back up everything first.

What You'll Need

  • A Moto G5 Plus (XT1680, XT1681, XT1682, XT1683, XT1684, XT1685, XT1686, XT1687)
  • A Windows, macOS, or Linux computer
  • A USB cable that supports data transfer
  • Your phone charged to at least 70%
  • Unlocked bootloader (see Step 1)
  • Custom recovery like TWRP (see Step 2)
  • LineageOS 16.0 ROM for the Moto G5 Plus (download from the official LineageOS website)
  • Optional: Google Apps (GApps) package for Android 9 (download from Open GApps or LineageOS's official add-on page)
  • ADB and Fastboot tools installed on your computer (download from the Android developer website)

Step-by-Step

  1. Back up your data. This process wipes everything. Copy photos, contacts, messages, and any other important files to your computer or cloud storage.
  2. Unlock the bootloader. Go to Motorola's official bootloader unlock website, create an account, and follow their instructions to get an unlock code. This will void your warranty and erase your device. The process involves enabling Developer Options (tap “Build number” 7 times in Settings > About phone), enabling “OEM unlocking” in Developer Options, then using Fastboot commands on your computer.
  3. Install TWRP custom recovery. Download the TWRP image file for the Moto G5 Plus (codename: potter) from the official TWRP website. Boot your phone into fastboot mode (power off, then hold Volume Down + Power), connect it to your computer, and run the command: fastboot flash recovery twrp.img. Then reboot into recovery by holding Volume Up + Power.
  4. Download the ROM and GApps. On your computer, download the LineageOS 16.0 ROM zip file for “potter” from the official LineageOS downloads page. Also download a compatible GApps package (choose “ARM64” and “Android 9.0” – the “nano” or “pico” variant is recommended for minimal bloat).
  5. Transfer files to your phone. With your phone in TWRP recovery, connect it to your computer via USB. TWRP should show a “Mount” option – tap it and enable “MTP” to see your phone's storage on the computer. Copy the ROM and GApps zip files to the phone's internal storage.
  6. Wipe your phone. In TWRP, tap “Wipe” and then “Format data”. Type “yes” to confirm. Then go back to the main menu, tap “Wipe”, and do a “Swipe to Factory Reset”. This clears all old data and system files.
  7. Install the ROM. In TWRP, tap “Install”, select the LineageOS zip file, and swipe to confirm the flash. Wait for it to finish – this can take a few minutes.
  8. Install GApps (optional). After the ROM finishes, tap “Install” again and select the GApps zip file. Swipe to flash it. Do not reboot in between.
  9. Reboot and set up. Once both zips are flashed, tap “Wipe cache/dalvik” (optional but recommended), then tap “Reboot System”. The first boot may take 5–10 minutes. You'll then see the Android 9 setup wizard.

Common Mistakes

  • Skipping the bootloader unlock. If you don't unlock the bootloader first, flashing TWRP will fail or you'll get a “boot verification failed” error.
  • Using the wrong TWRP or ROM version. Make sure you download files for the exact model “potter”. Using a different model's file can brick your phone.
  • Not formatting data. A simple factory reset may not be enough if you're coming from stock Android – you need to format data to remove encryption.
  • Flashing GApps for the wrong Android version. Android 9 GApps must be used – don't use Android 10 or 11 packages.
  • Rebooting between ROM and GApps flashes. You must flash both zips in the same recovery session, otherwise the system may not boot properly.

Tips

  • Keep your phone plugged into a charger during the entire process to avoid a sudden shutdown.
  • After unlocking the bootloader, your phone will show a warning message at every boot – this is normal and cannot be removed.
  • If you want to go back to stock Android later, download the stock firmware from the Motorola support site and flash it using fastboot.
  • Use a USB port directly on your computer, not a hub, to avoid connection drops.
  • After installing, check for updates in Settings > System > Updater to get security patches.

Troubleshooting

If the phone boots into a bootloop (stuck on the logo): Go back to TWRP, format data again, and reflash the ROM and GApps. If it still loops, try flashing without GApps first – if that boots, the GApps package was likely incompatible.

If TWRP doesn't stick after flashing: Some devices have a recovery partition that gets overwritten by the system. After flashing TWRP, boot directly into recovery (Volume Up + Power) without letting the system boot first.

If fastboot doesn't recognize your phone: Install the proper USB drivers for the Moto G5 Plus. On Windows, use the driver installer from Motorola's website. On Linux, you may need to add a udev rule.

If the ROM won't install and shows an error: Check the error message in TWRP – it often says “Error 7” if the device model doesn't match. Make sure you downloaded the correct ROM for “potter”.

If the phone hangs on the boot animation for more than 15 minutes: Force reboot by holding the power button for 10 seconds. If it still doesn't boot, wipe and reflash, and consider using a different GApps variant (e.g., “pico” instead of “nano”).

Frequently Asked Questions

Will I lose my data?

Yes, the process wipes your phone completely. Back up everything before you start.

Is it safe to do this?

There is a risk of bricking your phone if you follow the steps incorrectly, but if you use the correct files and follow the guide, it's generally safe. It voids your warranty.

Will I still get OTA updates?

You'll get updates through the LineageOS updater app, not from Motorola. These are usually monthly security patches.

Can I go back to stock Android after installing this?

Yes, you can flash the stock firmware using fastboot. Download the correct firmware for your model from Motorola's support site and follow their flashing instructions.

Does Google Pay or banking apps work?

They may not work because the bootloader is unlocked and SafetyNet might fail. You can try hiding root with Magisk, but it's not guaranteed.

Will the camera quality be the same as stock?

The camera quality may be slightly different because custom ROMs use generic camera drivers. Some users report good results with GCam mods, but it's not identical to the stock Motorola camera.