Smart Systems for Home

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

How to Unlock the Bootloader on a Sony Xperia Z1 Compact

· 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

Unlocking the bootloader on the Sony Xperia Z1 Compact allows you to install custom recoveries, flash third-party ROMs, and gain root access to the system partition. This process wipes all user data from the device and voids the manufacturer's warranty. You must obtain a unique unlock key from Sony's official developer website before proceeding.

What You'll Need

  • Sony Xperia Z1 Compact (ensure the battery is at least 50% charged).
  • Windows PC (Sony's official drivers and fastboot tools are most reliable on Windows; macOS or Linux users must download platform-tools separately).
  • USB Data Cable (preferably the original cable supplied with the phone).
  • IMEI Number (dial *#06# on the phone keypad to retrieve this).
  • Sony Developer World Account (requires a valid email address).
  • Android SDK Platform-Tools (contains the 'fastboot' executable required to send commands).
  • Sony Xperia USB Drivers (install on the PC to ensure the device is recognized in fastboot mode).

Step-by-Step

  1. Back Up All Data. Unlocking the bootloader performs a factory reset. Connect the phone to a PC and copy all photos, videos, and documents. Use the Xperia Companion software or your Google account to back up contacts and messages.
  2. Enable Developer Options. Go to Settings > About Phone. Scroll down to Build Number and tap it seven times rapidly until a message confirms Developer Mode is enabled. Menu labels may differ slightly depending on the Android version installed.
  3. Enable OEM Unlocking. Go to Settings > Developer Options. Find the toggle labeled OEM Unlocking and switch it to the ON position. If this option is greyed out or missing, the device may be SIM-locked to a carrier that prohibits unlocking.
  4. Get the Unlock Code from Sony. Open a web browser on your PC and navigate to the Sony Developer World 'Unlock Bootloader' page. Select your device model (Xperia Z1 Compact). Enter your email address and the IMEI number (usually 15 digits; do not include the final checksum digit if the dialer shows 16). Sony will email you a unique unlock key.
  5. Install USB Drivers. Download and install the official Sony USB drivers for Mobile Phones on your PC. This ensures the computer can communicate with the Xperia Z1 Compact when it is in fastboot mode.
  6. Download Platform-Tools. Download the Android SDK Platform-Tools package for your operating system. Extract the ZIP file to a folder on your desktop (e.g., named 'platform-tools').
  7. Boot into Fastboot Mode. Power off the Xperia Z1 Compact completely. Press and hold the Volume Up button. While holding the button, plug the USB cable into the phone and then into the PC. Keep holding the Volume Up button until the LED notification light turns solid blue. Release the button once the blue light appears.
  8. Verify Fastboot Connection. Open a command prompt or terminal window on your PC. Navigate to the platform-tools folder. Type the command fastboot devices and press Enter. A serial number followed by 'fastboot' should appear. If no device is listed, reinstall the drivers or try a different USB port.
  9. Unlock the Bootloader. . Note that you must type '0x' before the code provided by Sony. Press Enter.
  10. Confirm the Unlock. The phone screen may display a prompt asking to confirm the unlock. Follow the on-screen instructions (usually by pressing Volume Up to confirm). The device will automatically wipe data and reboot. The first boot may take significantly longer than usual.

Common Mistakes

One frequent error is entering the IMEI number incorrectly on Sony's website. Double-check the number by dialing *#06#; some users confuse the SIM slot number with the device IMEI. Another mistake is forgetting to toggle 'OEM Unlocking' in Developer Options before shutting down the phone. If this setting is disabled, the fastboot unlock command will fail. Users also often fail to install the specific Sony USB drivers; generic Android drivers may work for file transfer but often fail for fastboot commands.

Tips

Place the platform-tools folder directly on the C: drive (e.g., C:\platform-tools) to make navigating to it in the command prompt easier and avoid path length issues. If the unlock key email from Sony is delayed, check your spam or junk folder. Keep a written copy of the unlock key in a safe place; if you ever need to re-lock the bootloader, you will need the same key. Use a USB 2.0 port on the PC rather than a USB 3.0 port if the device is not being detected, as some older phone models have compatibility issues with USB 3.0 controllers.

Troubleshooting

If the command prompt returns 'waiting for device' and hangs, the phone is not in the correct mode or drivers are missing. Check that the LED light is solid blue, not red or green. Open Windows Device Manager and look for a device listed as 'Sony Sa0105' or 'Android Bootloader Interface' under 'Android Device' or 'Other Devices'. If it appears under 'Other Devices' with a yellow warning icon, right-click it and select 'Update Driver' to manually point it to the Sony driver files.

If Sony's website returns an error stating the device cannot be unlocked, the phone may be a carrier-branded model (e.g., from Vodafone or T-Mobile). Carrier-locked bootloaders cannot be unlocked via Sony's official tool, and there is no official workaround for this restriction.

If the unlock command returns 'remote: Command failed', ensure you included the '0x' prefix before the unlock key in the command string. The syntax must be precise.

Frequently Asked Questions

Does unlocking the bootloader void the warranty?

Yes. Sony officially states that unlocking the bootloader will void the warranty. Service centers may refuse to repair the device, even for hardware issues unrelated to software.

Will unlocking the bootloader root my phone?

No. Unlocking the bootloader only allows the boot partitions to be modified. You must still flash a custom recovery or boot image to gain root access.

Can I re-lock the bootloader later?

Yes. You can re-lock the bootloader by booting into fastboot mode and running the command fastboot -i 0x0fce oem lock 0x[YOUR_KEY]. This restores the device to its original locked state, but it does not restore the warranty.

Why is the OEM Unlocking option greyed out?

If the OEM Unlocking toggle is greyed out, the device is likely SIM-locked to a specific carrier. You must contact the carrier to request a SIM unlock, but this does not guarantee the bootloader unlock option will become available.

Do I need to pay for the unlock key?

No. Sony provides the bootloader unlock key for free on their Developer World website. Be wary of third-party websites that charge money for this service.