Smart Systems for Home

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

Fix Xposed Bootloop on Sony Xperia Z3, Z4 & Z5

· 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

If your Sony Xperia Z3, Z4, or Z5 is stuck in a bootloop after installing Xposed, the cause is almost always an incompatible or misconfigured module. The fix is to boot into recovery, disable or remove the problematic module, and if needed, uninstall Xposed entirely. This guide walks you through the exact steps, from safe mode to full removal, without losing your data.

What You'll Need

  • A Sony Xperia Z3, Z4, or Z5 with an unlocked bootloader and a custom recovery (TWRP or similar) already installed.
  • The Xposed Installer APK (official version) and the correct Xposed framework ZIP for your device and Android version (5.0–6.0, depending on your firmware).
  • A USB cable and a computer with ADB and Fastboot tools installed (optional but helpful if recovery is not accessible).
  • Basic knowledge of using volume and power buttons to navigate recovery menus.

Step-by-Step

  1. Force reboot into recovery. Press and hold the Power button and Volume Up simultaneously for about 10–15 seconds. The device will vibrate and reboot. When the Sony logo appears, release the buttons. If you have TWRP, you'll see the recovery menu. If that doesn't work, try Power + Volume Down (some firmware uses that combo). Keep trying until you see recovery.
  2. Once in recovery, go to Advanced > Terminal (in TWRP). If you don't see Terminal, skip to step 4. In the terminal, type the following command and press Enter:
    rm /data/data/de.robv.android.xposed.installer/conf/modules.list
    This removes the list of enabled modules, which is the most common cause of bootloops.
  3. Reboot the system. Go back to the main recovery menu and select Reboot > System. If the device boots normally, you're done. If it still bootloops, proceed to the next step.
  4. If terminal is not available or the above didn't work, boot into Safe Mode. To do this, power off the device completely. Then press and hold the Power button until the Sony logo appears, then immediately press and hold Volume Down. Keep holding Volume Down until the lock screen appears. In Safe Mode, Xposed modules are disabled. Go to the Xposed Installer app, open the Modules tab, and uncheck every module. Then reboot normally.
  5. If Safe Mode doesn't help, you need to remove the Xposed framework ZIP. Boot back into recovery (Power + Volume Up). Go to Install, navigate to your downloaded Xposed framework ZIP (e.g., xposed-v87-sdk23-arm64.zip for Android 6.0 on Z5), and select it. The installer will ask if you want to uninstall – choose Uninstall. If your ZIP doesn't have an uninstall option, download the official Xposed uninstaller ZIP from the Xposed repository (search for “Xposed Uninstaller” on the official XDA thread) and flash that instead.
  6. After flashing the uninstaller, wipe cache and dalvik cache. In recovery, go to Wipe > Advanced Wipe, select Dalvik Cache and Cache, then swipe to wipe. This clears any leftover data that might cause conflicts.
  7. Reboot the system. Select Reboot > System. The device should boot normally without Xposed. If it does, you can reinstall Xposed later using the correct framework for your exact firmware version.

Common Mistakes

  • Using the wrong framework version. The Z3, Z4, and Z5 run Android 5.0 (SDK 21) or 6.0 (SDK 23). Flashing a framework for the wrong SDK will cause a bootloop. Always match the SDK number to your Android version.
  • Enabling too many modules at once. Some modules are incompatible with Sony's stock ROM. Enable one at a time and reboot after each to isolate issues.
  • Not wiping cache after uninstalling. Leftover cache can keep the bootloop alive even after Xposed is removed.
  • Forgetting to back up before flashing. Always make a Nandroid backup in recovery before any Xposed change.

Tips

  • Before installing Xposed, check the XDA forum thread for your exact device model (e.g., D6603 for Z3, E6553 for Z5) to see which framework version is confirmed working.
  • Use the Xposed Installer app's built-in “Disable all modules” toggle (in the Modules tab) if you can boot into Safe Mode – it's faster than terminal commands.
  • Keep a copy of the uninstaller ZIP on your internal storage or SD card at all times, so you can flash it even if you can't access the internet.
  • If you have a locked bootloader, you cannot install Xposed at all – this guide assumes your bootloader is already unlocked.

Troubleshooting

If the above steps don't fix the bootloop, try these in order:

  1. Boot into Safe Mode again and uninstall all Xposed modules via the Xposed Installer app, then reboot. Sometimes the terminal command doesn't work because of file permissions.
  2. Flash the stock kernel. If Xposed modified your kernel, flashing the original kernel for your firmware (via Fastboot) can restore boot. Download the stock kernel FTF for your exact build number and flash only the kernel partition using Flashtool.
  3. Perform a factory reset from recovery. This wipes all user data (apps, photos, etc.) but will almost certainly fix the bootloop. Go to Wipe > Factory Reset in TWRP. Warning: this deletes all personal data, so only do this as a last resort after backing up what you can via ADB.
  4. Reinstall the full stock firmware using Sony's official Xperia Companion or Flashtool. This completely resets the device and removes all modifications. You will need to re-unlock the bootloader afterwards if you want to try Xposed again.

Frequently Asked Questions

Will I lose my data if I fix the bootloop?

No, the steps above (terminal command, Safe Mode, uninstaller) do not wipe user data. Only a factory reset or full firmware reinstall will erase your personal files.

Can I use Xposed on Android 7.0 or higher on these devices?

No, the Z3, Z4, and Z5 officially support up to Android 6.0. Xposed for Android 7.0+ (SDK 24/25) is not compatible with these devices' official firmware. Stick to Android 5.0 or 6.0.

What is the exact command to disable modules from recovery?

In TWRP's terminal, type rm /data/data/de.robv.android.xposed.installer/conf/modules.list and press Enter. This removes the list of enabled modules, effectively disabling them all.

My device is stuck in a bootloop and I can't get into recovery. What now?

Try holding Power + Volume Up for 20 seconds. If that fails, connect to a PC and use Fastboot to boot into recovery manually with the command fastboot boot recovery.img (if you have a recovery image). If that also fails, you may need to use Flashtool to reinstall the stock firmware.

Is there a way to prevent bootloops in the future?

Always install modules one at a time and reboot after each. Keep a Nandroid backup before any Xposed change. Also, only use modules that are explicitly confirmed to work on your device model and Android version.

Does unlocking the bootloader void my warranty?

Yes, unlocking the bootloader on Sony devices voids the warranty and can also permanently disable some camera features (like DRM keys) on certain models. This is a risk you accept when using Xposed.