[Tutorial] Xperia Z & ZL Bootloader Unlocking/Relocking

Search This thread

lindahl85

Senior Member
Feb 9, 2011
1,125
156
Vetlanda
I am new to Sony phones but experienced on HTC. Does Sony use S-ON/S-OFF like HTC does or is a rooted Xperia Z simply just s-off? I´m thinking of getting one onstead of my One X :)
 

schaggo

Senior Member
Jan 16, 2008
2,623
826
Zürich
AW: [Tutorial] Xperia Z & ZL Bootloader Unlocking

Mixed thing, I believe, as sony uses different concepts. S-ON/S-OFF prevents flashing stuff using a custom recovery, correct?

Edit:
I can give you information which I know from the Xperia T, a device which applies the same concepts as the Z. Everything which applies to the T will eventually, most likely, also apply to the Z once the exploits to obtain root are found.
Ok, so, a locked bootloader prevents you running custom kernels and an custom recoveries "natively", meaning on a locked device you cannot natively boot a custom recovery. It's comparable to S-ON I believe. On the T devs managed to circumvent this by obtaining root on a locked device and then used root acces to modify the chargemon script which is run upon booting the device to make it load a custom recovery additionally to it's intended function. The recovery is not flashed on a separate partition but deposited on /system as an archive. The script simply unpacks and loads it. Because the recovery runs with root permissions, you can then use it to flash stuff despite having a locked bootloader.

On an unlocked device, you can flash any compatible kernel and recovery and also natively boot them. An unlocked bootloader means full and unlimited access to the device.
 
Last edited:

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,709
Pune
Mixed thing, I believe, as sony uses different concepts. S-ON/S-OFF prevents flashing stuff using a custom recovery, correct?

yes... with S-OFF u can flash radio and kernel in recovery...


on Xperia devices with unlocked bootloaders u can flash kernel in recovery... we never really tried flashing RADIO image (baseband) but i guess it should work...
 

chrisftlse

Senior Member
Mar 17, 2010
868
186
Toulouse
Huawei P30 Pro
New on Sony Devices

I have read within the 1st thread :

First, you should confirm that it is possible to unlock the boot loader of your phone by checking the service menu. In your phone, open the dialler and enter *#*#7378423#*#* to access the service menu.

In your phone, tap Service info > Configuration > Rooting Status. If Bootloader unlock allowed says Yes, then you can continue with the next step. If it says No, or if the status is missing, your device cannot be unlocked.

I am in the case which says NO !

So, and if I well understood, it will not be possible to Unlock Bootloader so :
- Impossible to have Root ?
- Impossible to flash Custom ROM (when they will come) ?
- Locked, Locked for ever or possible (on day) by using another way ?

Sorry for noob question, but I am new on Sony devices (used to play with the HTC before (DHD, HD2, then Evo3D).
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,709
Pune
I have read within the 1st thread :

First, you should confirm that it is possible to unlock the boot loader of your phone by checking the service menu. In your phone, open the dialler and enter *#*#7378423#*#* to access the service menu.

In your phone, tap Service info > Configuration > Rooting Status. If Bootloader unlock allowed says Yes, then you can continue with the next step. If it says No, or if the status is missing, your device cannot be unlocked.

I am in the case which says NO !

So, and if I well understood, it will not be possible to Unlock Bootloader so :
- Impossible to have Root ?
- Impossible to flash Custom ROM (when they will come) ?
- Locked, Locked for ever or possible (on day) by using another way ?

Sorry for noob question, but I am new on Sony devices (used to play with the HTC before (DHD, HD2, then Evo3D).

(1) not impossible... but u will have to wait for a new exploit or an exploit which works...

(2) depends on (1) [they will start arriving soon... CM10.1 is close to release...

(3) LOCKED for every possible... unless there is some way to unlock bootloader (test-point way in 2011 devices but was later not available for 2012 devices, etc)
 
  • Like
Reactions: chrisftlse

schaggo

Senior Member
Jan 16, 2008
2,623
826
Zürich
AW: [Tutorial] Xperia Z & ZL Bootloader Unlocking

A couple small ammendments:
(1) not impossible... but u will have to wait for a new exploit or an exploit which works...
DoomLoRD means it's not possible at this time. But it's usually just a matter of time until a hole is found where root can be introduced through.

(2) depends on (1) they will start arriving soon... CM10.1 is close to release...
You won't be able to run AOSP, CM and AOKP as these depend on a custom kernel which you cannot run with a locked bootloader. But modified, slimmed down ROMs based on stock Sony firmware respectively stock Sony kernel, this will be possible as soon as root is established without unlock.

(3) LOCKED for every possible... unless there is some way to unlock bootloader (test-point way in 2011 devices but was later not available for 2012 devices, etc)
Recognized Elite Developer legend Entropy512 said, bootloader security on Sony devices is quite tight, meaning devices which are not officially unlockable might never be unlocked. Never say never, of course, but quite unlikely in the long run and ranging from very unlikely to definitely not in the next couple weeks.
 
Last edited:
  • Like
Reactions: dzieciol
unless there is some way to unlock bootloader (test-point way in 2011 devices but was later not available for 2012 devices, etc)

I really like unlocking the bootloader using test point method, I tried it on my 2011 device. It is a tedious process but you will not lose your DRM keys which is essential for Bravia Engine and gracenote on Walkman (I really like this feature).

I have used Xperia S, One X and Samsung Galaxy S3 so I have some knowledge on how unlocking bootloader is different from these three OEMs.

  1. On Samsung you get your device bootloader unlocked already out of the box which is good.
  • On HTC however, you can unlock the bootloader when you opt to but it is like a partial unlock, why? There is S-off. It's like a lock within a lock (reference to INCEPTION is intentional LOL) Which is nuts because you can't just flash any ROM there is, you need to worry about the compatibility of CID and Hboot and other stuff.
  • On Sony Xperia you get the device out of the box with locked bootloader. You can unlock the bootloader by will, and that's it. flash anything you want.

I like how Samsung implement this, no hassle but you get a phone that is not premium to hold, it's plastic all over. And also a lot of people are complaining about sudden death bug, where in your phone just dies without apparent known reason. In HTC you can get an awesome feel, i really love holding the HTC One X but you can get lack of software update, seriously. Poor, really poor software updates from HTC. Developers come in to rescue to provide latest android build but here comes S-off problems, seriously HTC? On Sony however, you get usual updates, really good ones, they often keep there words. You get really premium builds, the device looks and feels good and developer and community friendly. Awesome!

All of these are of course my opinion but trust me on this. LOL:highfive:
 
Last edited:
  • Like
Reactions: dzieciol

nexx67

Senior Member
Sep 10, 2008
86
19
Toulouse
Hi guys,

I just received my xperia z and I unlocked the bootloader and rooted the device. Only after that I read this thread and I was a bit disappointed by loosing BE2 !

But I made some tests and the music ID (not trackID) still works (download completed OK) and the bravia engine seems to be OK (there is a difference with ON/OFF), do you think this is possible ??? A way to double check if DRM are still present on my device ?
 

DooMLoRD

Inactive Recognized Developer
Jul 27, 2010
13,187
39,709
Pune
Hi guys,

I just received my xperia z and I unlocked the bootloader and rooted the device. Only after that I read this thread and I was a bit disappointed by loosing BE2 !

But I made some tests and the music ID (not trackID) still works (download completed OK) and the bravia engine seems to be OK (there is a difference with ON/OFF), do you think this is possible ??? A way to double check if DRM are still present on my device ?

if u unlock bootloader DRM is surely lost...


also u should have read the thread first... i had clearly mentioned:
Warning!

This procedure will wipe the /data partition of your phone, so you will loose all ur stored data, settings. SDCARD will BE WIPED!!!

For Xperia™ devices released 2013 or later (for example Xperia™ Z and Xperia™ ZL), the SD card of your device will be formatted and you will lose all content (for example photos, music, videos) when you unlock the boot loader.

DRM keys WILL be lost forever

I'd add what losing DRM keys means, e.g. no more Music ID/Gracenote within the Walkman app plus probably most importantly, as asked all the time and all over the place in the T/mint forums: loss of Bravia Engine.


older Xperia devices sometimes got issues after unlock of bootloader (BRICK after FOTA update) - you have been warned
 

schaggo

Senior Member
Jan 16, 2008
2,623
826
Zürich
Hey doom, seems Sony has changed with the Z. I'm still not sure how reliable those feedbacks are by certain users, but those reports (as the one right above this post) suggest BE2 sticks after unlocking and music id/cover download within Walkman app also continues to work. I'll keep an eye on topics covering that.
 
  • Like
Reactions: DooMLoRD

huball

Senior Member
Nov 29, 2006
72
15
Warsaw
Did anyone ever tried to find the localization of the DRM keys on older Xperias? Maybe there's a way to backup them, when/if the root for locked BL will be available?
 

GSeeker

Senior Member
Aug 12, 2008
366
103
Guangzhou
Hey doom, seems Sony has changed with the Z. I'm still not sure how reliable those feedbacks are by certain users, but those reports (as the one right above this post) suggest BE2 sticks after unlocking and music id/cover download within Walkman app also continues to work. I'll keep an eye on topics covering that.

yes i can confirm that after bootloader unlock BE2 continue working in video playback but not anymore for still pictures, and yes TrackID and covers download in Walkman are both WORKING.
 
  • Like
Reactions: DooMLoRD

Top Liked Posts

  • There are no posts matching your filters.
  • 148
    Quick tutorial for unlocking & relocking the bootloader of the Xperia Z & ZL.


    this is the official way to unlock bootloader




    if you want to keep ur DRM keys, first root device and then check this out




    Warning!

    This procedure will wipe the /data partition of your phone, so you will loose all ur stored data, settings. SDCARD will BE WIPED!!!

    For Xperia™ devices released 2013 or later (for example Xperia™ Z and Xperia™ ZL), the SD card of your device will be formatted and you will lose all content (for example photos, music, videos) when you unlock the boot loader.

    DRM keys WILL be lost forever

    I'd add what losing DRM keys means, e.g. no more Music ID/Gracenote within the Walkman app plus probably most importantly, as asked all the time and all over the place in the T/mint forums: loss of Bravia Engine.


    older Xperia devices sometimes got issues after unlock of bootloader (BRICK after FOTA update) - you have been warned



    why to unlock bootloader?

    1. u can flash custom ROMs/Kernels
    2. u dont need to worry if the new firmware can be rooted or not as with unlocked bootloader u can always ROOT ur device
    3. Sony gives sneak-peaks/preview builds of latest OS which requires unlocked bootloaders, as they did with Xperia 2011/2012 line, so who knows may be Sony may give early builds of next android OS ;)



    Most of this is taken from lollylost100's his tutorial from ARC thread (all credits for that concise tutorial go to him, i have elaborated on a few things and added device specific changes)


    btw i dont have this device, most of this testing was done remotely on a users phone... so thanks a lot to him for helping out!!!


    [ before we begin unlocking bootloader ]

    • get the IMEI code for ur device: type *#06# in phone dialer to find it out, note only the digits (no dashes)
    • download the fastboot package
    • IMPORTANT: if you are using Windows 8 you will need to enable few things to allow driver installation
    • download the latest FlashTool Xperia Driver Pack and install fastboot drivers (common) & adb drivers for this device from the list!
    • make sure u have a windows PC with USB cable to connect the phone
    • power down ur phone and keeping the Volume Up button pressed connect the USB cable to PC this will trigger FASTBOOT mode and windows will start driver installation, which should be automatically done
    • once drivers are installed just disconnect cable and power on device


    [ how to unlock ] (official way)

    1. Go to: http://unlockbootloader.sonymobile.com/ and read everything!
    2. At the bottom click 'Start Unlocking the Bootloader'
      First, you should confirm that it is possible to unlock the boot loader of your phone by checking the service menu. In your phone, open the dialler and enter *#*#7378423#*#* to access the service menu.

      In your phone, tap Service info > Configuration > Rooting Status. If Bootloader unlock allowed says Yes, then you can continue with the next step. If it says No, or if the status is missing, your device cannot be unlocked.
    3. after u have verified that u can unlock bootloader, scroll to the bottom of the page and click "Continue"
    4. you will get numerous prompts, read all info and if u agree click on "Accept"/"OK"/"Proceed"
    5. finally u will get a "Create Unlock request" page, enter your IMEI (sometimes the last digit needs to be removed for this to work), name and email address
    6. You should now receive your unique unlock key via EMAIL, SAVE THIS KEY SAFELY
    7. Extract fastboot_with_Android_USB_file.rar and open fastboot folder
    8. Hold SHIFT and right click on the background of the folder
    9. Select 'Open command window here'
    10. Connect your phone in fastboot mode (turn phone off, hold Volume UP button and plug in USB Cable) [make sure drivers are installed as explained above)
    11. In the cmd windows type in fastboot.exe -i 0x0fce getvar version
    12. If a value is returned (it will return 0.5), it means the phone is correctly connected
    13. Type in fastboot.exe -i 0x0fce oem unlock 0xKEY and replace KEY with the key which u received earlier.
    14. You're device should now be bootloader unlocked


    If this tutorial is too much for you then itskapil wrote a step-by-step guide (and recorded a video also):
    -Instructions: http://www.theandroidsoul.com/how-to-unlock-bootloader-xperia-arc-play-neo-pro/
    -Video: http://www.youtube.com/watch?v=LRH3pC7MhEA
    (the above videos and some steps are for Xperia 2011 devices, but most the steps are same for Xperia Z)




    Relock procedure is posted here
    72
    Maybe i've some other drivers installed... but when i boot my XZ in fastboot (holding vol+ and plugging usb) nothing happens (i only hear windows sound of some peripherial attached).
    So probably i didn't installed the right drivers.
    Is there any way to move from where I'm stucked?
    Thanks for helping.

    EDIT

    I can see the S1Boot Fastboot driver (whit the yellow tringle) in Resources Manager but cannot update the driver even pointing to the USB_DRIVERS folder.
    Any suggestion? (I'm running WIN8 64bit)


    You may need to set the drivers up using testmode in win8 x64 I have them working on mine fine

    Press windowsKey + R
    type/paste
    Code:
    shutdown -o -r -t 0
    into the box, this will restart your machine in the advanced startup menu.

    when it restarts choose "disable driver signing" Then install the driver manually using the "have disk" option. when you reboot again the driver should be working.


    you can also permanently turn off driver signing if you want and run in test mode with the following

    Code:
    bcdedit -set loadoptions DISABLE_INTEGRITY_CHECKS
    bcdedit -set TESTSIGNING ON

    to disable all that you set the ENABLE and OFF

    Code:
    bcdedit -set loadoptions ENABLE_INTEGRITY_CHECKS
    bcdedit -set TESTSIGNING OFF
    39
    Relocking bootloader

    With the latest release of Flashtool it is now possible to relock bootloader.

    Download the latest flashtool from:
    http://xdaforums.com/showthread.php?t=2162907



    Important

    DO NOT USE ANY FTF TO RELOCK BOOTLOADER! THOSE OLD FTFs DO NOT WORK FOR THE 2013 DEVICES!!!


    before u relock bootloader u have to be on pure stock kernel (flash only the kernel.sin using flashtool), else the device WILL NOT BOOT after relock



    Steps:

    1. now start Flashtool and click on BLU button
    2. u will be asked to connect device in flashmode
    3. once u connect the device u will get a prompt to "Relock"
    4. click on it and when prompted disconnect the device
    6
    Re: [Tutorial] Xperia Z Bootloader Unlocking

    @DooMLoRD

    Now Xperia Z cannot ROOT, very afflictive!:(

    I did not follow what you mean...

    Sent from my LT30p using xda app-developers app
    6
    I really suggest to author of this topic to ADD INFO ON HOW TO BACKUP TA if you ever want to go back to LOCKED BOOTLOADER.

    Not, like me, having read this topic, I just unlocked everything without backing up DRM keys and what not. So, thanks f****g alot ^^

    The reason why that info is not included is that it's still experimental... And playing with the phones TA area is VERY RISKY... The device can be hard bricked... What would u prefer? A bricked device or lost DRM?

    Sent from my LT30p using xda app-developers app