This guide will walk you through unlocking the bootloader on any Sony Xperia device. Often overlooked in the smartphone sphere, Sony has made its mark and amassed a loyal fanbase, helping the company thrive.
Sony’s offerings may not be flashy, but they are known for their excellent build quality. When it comes to custom development, however, Sony hasn’t entirely caught up. Typically, an Android smartphone can be easily rooted by flashing the Magisk ZIP installer via TWRP or by patching and flashing the stock boot image via Fastboot. Unfortunately, these methods don’t usually work for Sony devices.
As for unlocking the bootloader, Sony has taken a unique approach: instead of using the standard fastboot oem unlock or fastboot flashing unlock commands, you will need to generate a specific unlock code for your device to unlock the bootloader.
This guide will show you how to appropriately create and use that unlock code. So, without further ado, let’s dive into unlocking the bootloader on any Sony Xperia device. Please follow along.
Unlocking the bootloader on your Sony Xperia device can yield a wealth of advantages. For instance, you can replace the stock recovery with a custom one like TWRP or obtain system partition access and administrative privileges via rooting with Magisk.
However, be aware of potential risks. Your device’s warranty may become void, and all existing data on your device could be erased. Additionally, the WideVine L1 could be downgraded to L3, leading to the inability to stream videos in HD on platforms like Netflix. If you fully understand and accept these conditions, then let’s proceed with the steps to unlock the bootloader on your Sony Xperia device.
How to Unlock Bootloader on any Sony Xperia Device
The following steps are organized into separate sections for clarity. Please make sure to follow the instructions exactly as outlined. AMS and its team members cannot be held liable for unforeseen events such as a thermonuclear war, a failing alarm, or any damage to your device or data loss that might occur while executing these steps.
Check if the Sony Bootloader can be unlocked.
Note that not all Xperia devices can have their bootloaders unlocked. Although many support this function, there remain a few exceptions. As your initial step, confirming that your specific Sony device supports bootloader unlocking is essential.
Below is a guide on how to do this:
To access the Service menu, open the dialer and type the below code
You can now check the rooting status by going to Service info > Configuration > Rooting Status.
You can unlock your Xperia device’s bootloader if the status says YES next to Bootloader unlock.
The unlocking steps below will not be possible if the answer to the question is No or the status section is blank.
Get the Sony Xperia Unlock Code
To obtain your Xperia device’s unlock code, follow the steps below:
Scroll to the bottom and select your device from the menu on the left.
Input your device’s IMEI ID into the provided field. For devices with dual IMEIs, use the first one.
Agree to the acknowledgments at the end of the page by checking the boxes, then click ‘Submit‘.
You will receive a Bootloader Unlock Code associated with your IMEI ID. Make sure to copy this code and save it in a secure location, such as Notepad.
On the Sony Xperia, enable USB debugging.
The next step is to enable USB Debugging on your Sony device. This is crucial for your PC to recognize your device in ADB Mode. ADB Mode lets us boot your device to Fastboot, allowing us to unlock your Sony Xperia’s bootloader. Here’s how to enable it:
Navigate to Settings > About Phone.
Tap on ‘Build Number’ 7 times. This will enable Developer Options.
Go back to Settings > System > Developer Options.
Here, enable ‘USB Debugging.’
Install ADB & Fastboot
Let’s install the Android SDK Platform Tools on your computer. These tools, officially provided by Google, consist of the ADB and Fastboot binaries we need. I suggest transitioning to this one if you currently use any third-party tools. After you have installed it, extract the program to a location of your convenience on your computer. This will create a ‘platform-tools’ folder.
Boot Sony Xperia to Fastboot
To unlock the bootloader on your Sony Xperia device, you’ll need to boot your device into Fastboot Mode. Follow the steps below to accomplish this:
Connect your Sony Xperia device to your computer using a USB cable. Ensure USB Debugging is enabled.
Navigate to your PC’s ‘platform-tools’ folder, type CMD in the address bar, and press Enter. This action will open the Command Prompt.
adb reboot bootloader
Unlock Xperia Bootloader via Unlock Code
Now, you’re ready to unlock the bootloader on your Sony device. Ensure your device is booted into Fastboot mode and connected to your PC via a USB cable.
Input the following command into the Command Prompt window, replacing ‘CODE‘ with the number you received in step 2:
fastboot oem unlock 0xCODE
Because the code I used was C4AA5DE9F1721681, the above command was transformed into
fastboot oem unlock 0xC4AA5DE9F1721681
That completes the process. You can restart your device to the operating system using the following command. This should happen automatically, but if it doesn’t, you can manually prompt it:
This concludes our guide on unlocking the bootloader on any Sony Xperia device. If you encounter any difficulties or have questions regarding the steps mentioned above, please comment. We will make sure to respond as soon as possible.