How to Root and Unlock Bootloader of Sony Xperia Z (Video)
The new top-of-the-line Android smartphone from Sony with HD screen and packed with ultimate durability against every hazard can now be rooted and unlocked. Root access gains full control over the device and unlocking the boot loader allows custom ROMs and kernels to be flashed.
Warning: The procedure will wipe out all data inside the device including the SD card. Make sure to backup everything on your phone.
Steps for Unlocking the Boot Loader
1. Create a backup of all files, contacts and SMS on your device.
2. Determine first, it your phone is viable for unlocking its boot loader. Go to the phone dialer and type *--7378423--.
3. Go to the "Service info - Configuration." Check if the "boot loader unlocked allowed" is noted "Yes". Otherwise, you cannot proceed.
4. Then go to "Settings - Developer options - Enable the developer options - Enable USB debugging".
5. Write down the IMEI code. Go back to the phone dialer and type in *#06#.
6. Download and install ADB in Fastboot package. Make sure that you install it to your main drive. The directory should be like this: "Computer - Local Disk (C:) - adb"
7. Read this Sony unlocking the boot loader page. Carefully read everything particularly Sony's pointers regarding the device once it is unlocked.
8. Once you understand everything, click "Start unlocking the boot loader". Proceed to "Continue". And click "Yes, I'm sure" button.
9. The page will take you to Legal Terms, check both boxes and then "I accept".
10. Type down the IMEI code, your name, and your email address on the next page. Sometimes, the entire IMEI code is not recognised, try to leave out the last digit as an alternative. Send your working email then an unlock code will be sent to you.
11. Open the command window. Type "cmd" at the search bar of the Start button on your computer.
12. Type cd and then cd adb. The command will take you to the adb files inside your main drive.
13. Connect your device to the computer and then reboot it to boot loader mode. Type on the command prompt, adb reboot-bootloader. You should a sound from the device and a blue light is present as well.
14. Type the following in the command window: fastboot.exe -i 0x0fce getvar version
A 0.5 response means that the device is properly connected.
15. Next type in this command: fastboot.exe -i 0x0fce oem unlock 0xKEY
Replace the word "KEY" of the command with the key unlocker sent to your email.
16. A "Finished" text is displayed indicating that your device is now unlocked.
Root Access Procedure
1. Download two files needed for rooting by going to the developer's page.
2. Assuming that the device is still connected and the command window is still active, type in: fastboot flash boot (name of the image file). The easiest way is, simply drag the Z_DoomLord AutoRoot image file you have downloaded to the command window, and then enter.
3. After the flash, type in: fastboot reboot. The device will turn on displaying activities and the red Android logo.
4. Once it is finished, disconnect the USB cable and perform a hard power off. Press Power key and Volume up key for 15 seconds and let go after 3 vibrations. Press again both keys to get a blue light on your device. This may not work on the first try.
5. Go back to the command window and type in: fastboot flash boot (name of the image file). Same goes by dragging the file to image file Z_DoomLord_Insecure to the command window.
6. Next is type in: fastboot reboot. After that, the Sony logo should display which means everything has been wiped out and the device is rooted.
For complete details and comments, visit this YouTube page and developer's original thread.