Install Xperia Z3 Android 7.0 Nougat AOSP ROM
In this article
This guide walks you through installing an Android 7.0 Nougat AOSP (Android Open Source Project) ROM on a Sony Xperia Z3. This replaces the stock Sony firmware with a clean, near-stock Android experience. You will need an unlocked bootloader, a custom recovery, and a compatible AOSP ROM package. The process wipes all data on your phone, so back up everything important first.
What You'll Need
- An Xperia Z3 (model D6603, D6653, D6643, etc.) with an unlocked bootloader. Unlocking the bootloader voids your warranty and wipes your data.
- A Windows, macOS, or Linux computer with a USB cable.
- ADB and Fastboot tools installed on your computer. You can get these from the official Android developer site.
- A custom recovery such as TWRP (Team Win Recovery Project) installed on your phone. If you don't have it, you'll install it during this guide.
- The AOSP 7.0 ROM ZIP file for the Xperia Z3. Search for "AOSP 7.0 Xperia Z3" on XDA Developers forum – look for an official or well-maintained build. Download it to your computer.
- Google Apps (GApps) package for Android 7.0 (ARM64, nano or pico variant) if you want the Play Store and Google services. Optional but recommended.
- Your phone battery charged to at least 70%.
Step-by-Step
- Back up your data. This process wipes your phone. Sync contacts, photos, and files to cloud or computer. Copy any files you want to keep to your PC.
- Unlock the bootloader. Go to Sony's official bootloader unlock page, enter your device's IMEI (dial *#06# to find it), and follow their instructions. This requires accepting Sony's terms and will wipe your phone. Once done, your phone will show an unlock warning at boot.
- Install ADB and Fastboot on your computer. If you haven't already, download the platform-tools ZIP from the Android developer site, extract it to a folder, and open a command prompt/terminal in that folder.
- 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 enable "USB debugging" and "OEM unlocking" (if present).
- Connect your phone to your computer via USB. Accept the debugging prompt on your phone if it appears.
- Install a custom recovery (TWRP). Download the TWRP image file for the Xperia Z3 (e.g., twrp-3.x.x-z3.img). In your command prompt, run:
adb reboot bootloaderto enter fastboot mode. Then run:fastboot flash recovery twrp-3.x.x-z3.img. After flashing, run:fastboot reboot. - Boot into TWRP recovery. Immediately after the reboot, press and hold the Volume Down key repeatedly until TWRP loads. (If you miss it, just reboot and try again.)
- Copy the ROM and GApps to your phone. With TWRP open, go to Mount and ensure "System" and "Data" are not checked (you want them unmounted). Then go to Advanced > ADB Sideload, and on your computer run:
adb sideload aosp-7.0-z3.zip. This transfers the ROM. Repeat the same for the GApps ZIP if you have one. - Wipe the device. In TWRP, go to Wipe > Format Data and type "yes" to confirm. This removes encryption and all data. Then go to Wipe > Advanced Wipe and select Dalvik/ART Cache, System, Data, and Cache (not Internal Storage unless you want to wipe your files). Swipe to wipe.
- Install the ROM. Go back to TWRP's main menu, tap Install, select the AOSP ROM ZIP (it should be in your Internal Storage or wherever you sideloaded it), and swipe to flash.
- Install GApps (optional). After the ROM finishes, tap Install again and select the GApps ZIP, then swipe to flash.
- Reboot. Tap Reboot > System. The first boot may take up to 10 minutes. Be patient.
- Set up your phone. Once booted, go through the Android setup wizard. Sign in to your Google account if you installed GApps.
Common Mistakes
- Not unlocking the bootloader first. If you skip this, the ROM won't flash or the phone may bootloop.
- Using the wrong TWRP or ROM version. Make sure the files are specifically for the Xperia Z3 (not Z3 Compact or Z3+). Check the model number.
- Forgetting to wipe data. Flashing over the old system without wiping causes crashes and bootloops.
- Booting straight to system after flashing. Some builds require a reboot to recovery after flashing the ROM before booting. If you bootloop, go back to recovery, wipe again, and try.
- Skipping GApps. If you don't flash GApps, you won't have the Play Store. You can flash it later.
Tips
- Keep the ROM and GApps ZIPs on your computer and also on your phone's internal storage (if you have space) so you can reflash without a computer.
- Use a high-quality USB cable and a USB port directly on your computer to avoid connection drops during sideload.
- Take a full backup in TWRP before wiping (Backup > System, Data, Boot) so you can restore your stock setup if something goes wrong.
- After first boot, let the phone sit for a few minutes to settle before using it heavily.
- Check XDA forums for known bugs specific to the build you installed.
Troubleshooting
If your phone won't boot (bootloop) or gets stuck on the Sony logo:
- Force restart by holding Power + Volume Up for 10 seconds.
- Boot into TWRP (Volume Down during reboot).
- Wipe Dalvik/ART Cache and Cache again, then reboot.
- If that fails, go to Wipe > Advanced Wipe and wipe System, Data, Dalvik, and Cache, then reflash the ROM and GApps.
- If still stuck, you may have a bad download. Redownload the ROM and check its MD5 checksum if provided.
If TWRP doesn't load:
Reinstall TWRP via fastboot. Make sure you're using the correct command: fastboot flash recovery twrp.img (not "boot").
If ADB sideload fails with an error:
Check that USB debugging is enabled and you've accepted the RSA prompt. Restart ADB server with adb kill-server then adb start-server. Try a different USB port.
If the phone shows "Couldn't connect to the internet" during setup:
This is common with AOSP builds. Skip the network setup and connect later. You can also try toggling Wi-Fi off/on.
If the camera or other sensors don't work:
This is a known limitation of some AOSP builds. Check the XDA thread for your specific ROM – there may be a fix or a note that it's a known bug.
Frequently Asked Questions
Will this void my warranty?
Yes, unlocking the bootloader and installing a custom ROM voids Sony's warranty. This is permanent for the bootloader unlock status.
Can I go back to stock Sony firmware?
Yes. You can use Sony's Flashtool or Xperia Companion to restore the official firmware, but your bootloader will remain unlocked (unless you relock it via fastboot, which is possible but not always recommended).
Do I need to install GApps?
No, but without GApps you won't have the Google Play Store or Google services. Some apps require them. You can flash GApps later via TWRP.
Will my apps and data be lost?
Yes, the installation wipes all user data. Back up everything before starting.
Is this ROM stable for daily use?
Stability varies by build. Some AOSP builds are quite stable, others have bugs like camera issues or battery drain. Read user feedback on the XDA thread before installing.
Can I install this on an Xperia Z3 Compact?
No. The Z3 Compact is a different device (model D5803/D5833) with different hardware. Do not flash Z3 ROMs on it – you'll brick it.