Unlock Bootloader of Sony Xperia Z

Bought a shiny new Xperia Z and now looking to root it or try custom ROMs and modifications on it? If the answer is yes, then sooner or later you’ll run into the word bootloader, which needs to be unlocked before one can make any modification to the device’s software. But what exactly is a bootloader and why must it be unlocked?

When you turn on your phone, the operating system (also called firmware) is loaded into memory from storage and then booted up, and the bootloader is the piece of code that starts this sequence of loading the OS up. By default, the bootloader is locked and allows only the official OS/firmware to be booted up on a device, which prevents one from running a custom ROM (or kernel).

That is where bootloader unlocking comes in, as by unlocking the bootloader the phone is then free to boot up into unofficial software, a custom ROM (or kernel) in this case. Most Android devices come with a locked bootloader, and while some manufacturers choose not to let users unlock the bootloader so as to not ruin the experience, most devices can be unlocked if a user chooses to.

We’ve made a step-by-step guide to help you unlock the bootloader on your Sony Xperia Z, so that you can get down to rooting or install custom ROMs on it. It’s quite a simple procedure if you read the guide carefully, and you’ll be able to get the bootloader unlocked in less than an hour.

However, a few words of caution before you proceed:

  1. Unlocking the bootloader will void the warranty of your phone, so you’ll be unable to send it in to Sony for repairs.
  2. All the data on your phone will be wiped, including personal content on the internal storage such photos, music, videos and other files. You can take a backup of everything though and restore it later on.
  3. Accepting official over-the-air software upgrades from Sony might cause issues, so you’ll have to refrain from installing any official updates after unlocking the bootloader.

Now, make sure you read the three points given above, then continue reading below for instructions on how you can unlock the bootloader on your Xperia Z.


The procedure described below is only for the Sony Xperia Z. Do not try it on any other device.


The methods and procedures discussed here are considered risky, so try them out at your own risk, and make sure to read each step carefully before attempting anything. We will not be held responsible if anything goes wrong.


  1. First, we have to make sure that your device’s bootloader can be unlocked, as some units may come without an unlockable bootloader. To do that, open the phone app and dial *#*#7378423#*#* to open the service menu. Then, go into Service info » Configuration » Rooting Status. Here, if it says Yes in front of Bootloader unlock allowed, then your phone’s bootloader can be unlocked. If it says No or if you don’t see the status, then you’ll unfortunately be unable to unlock the bootloader.
  2. You’ll need to install the Android SDK and make a few other changes to install the drivers for the phone on your computer. To do that, perform the following steps:
    1. Install the Android SDK using the guide → here.
    2. Download and unzip this file (use a program like WinZip or WinRAR for extraction) to obtain a file named android_winusb.inf.
    3. Copy this android_winusb.inf file to the extras » google » usb_driver folder where you installed the Android SDK. Replace the existing file when asked to do so.
  3. Unlocking the bootloader causes all the data on the device to get wiped, including everything on your internal storage such as photos, music, videos, etc. First, backup installed apps and other data such as contacts, messages, bookmarks, etc, by referring to our Android Backup Guide for help. Then, copy everything from the SD card to your computer, which will also include the apps and data you backed up.
  4. Check the IMEI number of your device by entering *#06# on the phone’s dialer, or from the Settings » About phone » Status menu. Note down this number somewhere as it is needed during the procedure. You can also find this number on the box your phone came in.

How to Unlock Bootloader on Sony Xperia Z

  1. Go to the official Sony Unlock Bootloader website → here. Read everything there if you want to, then press the “Start unlocking the boot loader button” at the bottom of the page. Remember to keep this page open till the end of the procedure.
  2. Click the “Continue” button at the bottom. Then, click the “Yes, I’m sure” button the next page. Accept all the conditions on the “Legal terms” page, then click the “I accept” button.
  3. Now, on the “Create unlock boot loader key request” page, enter your name, the first 14 characters of the IMEI number, and your email address. Then click on the Submit button to get the unlock key in your email.
  4. Check your email for a mail from Sony, which has your “unlock boot loader key.” Keep your email open so you can check this key when needed in further steps.
    This is just an example, your unlock key will be different.
  5. Now, turn off your Xperia Z. Then, while holding down the “Volume UP” button, plug in the USB cable to your phone (make sure it is connected to the computer before connecting to phone). This will start the device in FASTBOOT mode and a device installation screen will pop up on your computer.
  6. In the driver installation menu, select the “Browse my computer for driver software,” followed by “Let me pick from a list of device drivers” option. Then click on “Have Disk”, browse to the Android SDK » extras » google » usb_driver folder, and select the android_winusb.inf file. Then, select “Android Bootloader Interface” from the list and finish the driver installation by following the onscreen instructions on your computer.
  7. Once driver installation is complete, open the Android SDK » platform-tools folder. Here, press and hold down the SHIFT button on your keyboard, then right-click on an empty part of the screen. Then, click on the “Open command window here” option in the right-click menu to open a command prompt window.
  8. Now, to unlock the bootloader, enter the following commands in the command prompt window.
    1. Type in fastboot.exe -i 0x0fce getvar version and press Enter. If a value is returned as a response, such as 0.3 or 0.5, then the device is properly connected and you can go to the next step.
    2. Then, type in fastboot.exe -i 0x0fce oem unlock 0xKEY in the command prompt and press Enter, replacing KEY with the unlock key you received in your email. For example: fastboot.exe -i 0x0fce oem unlock 0x5C11517BFD2E7197.
    3. After a few seconds, you will get a “FINISHED” message in the command prompt once the bootloader has been unlocked. You can type fastboot -i 0x0fce reboot to reboot the phone back into Android and disconnect it from the computer. Since the phone’s data was wiped during unlocking, you’ll have to set everything up again.
  9. You can now close the Sony bootloader unlock page and the command prompt as well.

The bootloader on your Xperia Z is now unlocked and you’ll be able to root it, install custom ROMs and kernels and make other modifications whenever needed. Do let us know if you run into any issues during the procedure, we’ll be sure to help you out.