How To Guide [GUIDE][WINDOWS] Bootloader Unlock & Relock, Drivers, Magisk rooting, Firmware and GSI ROM flashing without TWRP

Search This thread

Unihooni

New member
Jan 21, 2022
2
0
Worked exactly as described, thanks guys.
A quick question. Now that Android 12 has been released is this guide and latest Magisk 23 still valid? Unfortunately there is no firmware archive for 1 III I could find (https://xperiastockrom.com/category/firmware)? so you would have to use the latest one from XperiFirm... which is Android 12 only.

That being said in XperiFirm it lists multiple options for XQ-BC52. Is there a difference in the firmware if the version is the same, but the country and/or carrier is different?
 

UsernameNotRecognized

Senior Member
May 17, 2012
230
39
A quick question. Now that Android 12 has been released this is guide an Magisk 23 still valid? Unfortunately there is no firmware archive for 1 III I could find (https://xperiastockrom.com/category/firmware)? so you would have to use the latest one from XperiFirm... which is Android 12 only.

That being said in XperiFirm it lists multiple options for XQ-BC52. Is there a difference in the firmware if the version is the same, but the country and/or carrier is different?
I didn't even think about it and just "did" it. As it works, yes.
As to the differences... Just use the one you already have.
My bet would be that the difference between options for the BC52 has to do with the enabled bands and/or preferred bands.

If you want I can send you the patched magisk Android 11 .img
 

Unihooni

New member
Jan 21, 2022
2
0
I didn't even think about it and just "did" it. As it works, yes.
As to the differences... Just use the one you already have.
My bet would be that the difference between options for the BC52 has to do with the enabled bands and/or preferred bands.

If you want I can send you the patched magisk Android 11 .img
Hmm that (might) work and a thank you in advance. :) Then yet again if something would go wrong in the process. Not having the 61.0.A.23.20 (EU) (last Android 11 version) as XperiFirm backup worries me. Would't it be a good idea to upload at least these "final" versions somewhere for all markets so we all have a fallback to rely on?
 

a lost viking

New member
Mar 8, 2013
4
0
Hi,
I tried to flash my Xperia 1 III with the TW_61.0.A.23.20, but it always stops at a certain point as the following code shows:

- Extracting sparse chunk super.004
- Uploading sparse chunk C:\Users\Desktop\XQ-BC72_Customized TW_61.0.A.23.20\flash_session\super.004
download:04b2ecd5
OKAY.
flash:super
Error, didn't got flash OKAY reply! Got reply: FAILFAILCheck payload hash

=========== FIRMWARES HISTORY LOG =============
NEW_VERSION: erased_user_data:true, variant:user, s1boot_version:1322-1669_X_Boot_SM8350_LA1.0_R_25, cdf_version:Unknown: Jun 11 2021/04:24:12, fs_version:Unknown: Jun 11 2021/04:24:12, sw_version:61.0.A.5.106
NEW_VERSION: erased_user_data:false, variant:user, s1boot_version:1322-1669_X_Boot_SM8350_LA1.0_R_27, cdf_version:Unknown: Jul 8 2021/03:49:52, fs_version:Unknown: Jul 8 2021/03:49:52, sw_version:61.0.A.11.23

=================================================

Set slot 'a' active.

Device is put now out of flash mode.
Sent command: Sync
Sent command: reboot-bootloader.

Anybody knows the reason behind it?
Thanks in advance.
 

a lost viking

New member
Mar 8, 2013
4
0
Hi,
I tried to flash my Xperia 1 III with the TW_61.0.A.23.20, but it always stops at a certain point as the following code shows:

- Extracting sparse chunk super.004
- Uploading sparse chunk C:\Users\Desktop\XQ-BC72_Customized TW_61.0.A.23.20\flash_session\super.004
download:04b2ecd5
OKAY.
flash:super
Error, didn't got flash OKAY reply! Got reply: FAILFAILCheck payload hash

=========== FIRMWARES HISTORY LOG =============
NEW_VERSION: erased_user_data:true, variant:user, s1boot_version:1322-1669_X_Boot_SM8350_LA1.0_R_25, cdf_version:Unknown: Jun 11 2021/04:24:12, fs_version:Unknown: Jun 11 2021/04:24:12, sw_version:61.0.A.5.106
NEW_VERSION: erased_user_data:false, variant:user, s1boot_version:1322-1669_X_Boot_SM8350_LA1.0_R_27, cdf_version:Unknown: Jul 8 2021/03:49:52, fs_version:Unknown: Jul 8 2021/03:49:52, sw_version:61.0.A.11.23

=================================================

Set slot 'a' active.

Device is put now out of flash mode.
Sent command: Sync
Sent command: reboot-bootloader.

Anybody knows the reason behind it?
Thanks in advance.
NVM, solved with companion.
 

Mazellat

Senior Member
Mar 25, 2012
1,815
1,369
31
Mardin
Sony Xperia 1 III
I read all "Introducing this Guide" and it is really clearly, thank you but I want to ask some questions;

1. "
GSI & vbmeta Image (From Google)" which one I will download? Where is the "Starter Pack"?
2. Can we skip GSI step to use stock rom? What is the advantages GSI's for us?
3. When we root device will lose DRM Keys but what about Camera,sound,casting and other apps quality? Is it working like original device?
4. Can we use Xperia Companion or OTA after rooting device?
5. Will we lost root when update our device with Newflasher?

If you answer this question I will thank you for your help :)
 
Last edited:

t3.Joex

New member
Feb 8, 2022
1
0
Thanks for your tutorial, I used your method to root my Xperia 1 iii, everything seems to go well, magisk is also installed, but it doesn't work, is it because of Android12? I tried BC72 HK(12), BC72 CN (11) and BC52(12), but the results are the same. It would be greatly appreciated if you could help me.
 

xbt-

Senior Member
Aug 8, 2013
136
28
Moscow
I've never had a Sony phone, considering it from a Galaxy device. Are all Sony Xperia 1 III devices rootable? Or does it have to be specific models?
 

Motu88

Member
Jul 27, 2013
7
1
Thanks for this guide. I'm about to get started with it, but I have something I want to clarify regarding the GSI GMS vs. AOSP images. My past experience with other Android phones has been with using LineageOS roms (and CyanogenMod before that). What I'd like is to have AOSP with the bare minimum Open GApps pico package. Do I just flash the Open GApps package after flashing the AOSP image like I would if I had installed a custom ROM, or am I on the wrong track?

What Google services are installed if I were to use the GSI GMS image?
 

xbt-

Senior Member
Aug 8, 2013
136
28
Moscow
Thanks for this guide. I'm about to get started with it, but I have something I want to clarify regarding the GSI GMS vs. AOSP images. My past experience with other Android phones has been with using LineageOS roms (and CyanogenMod before that). What I'd like is to have AOSP with the bare minimum Open GApps pico package. Do I just flash the Open GApps package after flashing the AOSP image like I would if I had installed a custom ROM, or am I on the wrong track?

What Google services are installed if I were to use the GSI GMS image?
After flashing LineageOS in TWRP, then install Open gApps - if you want the bare minimum, then install the Pico version, which is just Play store and Google play services.
 

Motu88

Member
Jul 27, 2013
7
1
After flashing LineageOS in TWRP, then install Open gApps - if you want the bare minimum, then install the Pico version, which is just Play store and Google play services.
Sorry if my post was unclear. I'm not trying to install LineageOS (as far as I know there isn't one for this device yet). I'm wanting to know if I can flash the Open GApps pico image after installing the GSI AOSP image in the same manner as if I had installed a custom ROM, because that's a process I'm familiar with.
 

xbt-

Senior Member
Aug 8, 2013
136
28
Moscow
Sorry if my post was unclear. I'm not trying to install LineageOS (as far as I know there isn't one for this device yet). I'm wanting to know if I can flash the Open GApps pico image after installing the GSI AOSP image in the same manner as if I had installed a custom ROM, because that's a process I'm familiar with.
Don't know, will have to wait for another answerer
 

Top Liked Posts

  • There are no posts matching your filters.
  • 16

    Introducing this Guide

    Hello Folks and welcome to My Guide for Your Xperia Smartphone. This Guide will walk with You thru the whole Process of installing Drivers, getting an unlock Key for Your Bootloader, rooting with Magisk and even flashing GSI Custom ROMs up to re-locking Your Bootloader and re-flashing Stock for the total Factory Reset. This Thread/Guide is not meant as Wiki n'or will it teach You about Android. Inform Yourself using Google and be smart and to enjoy the total Freedom of Android... If You can't solve Problems Yourself by communicating and research, don't touch Your Bootloader!

    INDEX:
    1. Requirements
    2. Installing Drivers
    3. Firmware Flashing / NewFlasher
    4. Bootloader Unlocking & Magisk Root
    5. GSI ROM flashing with Fastboot (Optional)
    6. Bootloader Re-Locking
    7. Firmware Restoring after Re-Locking

    1. Requirements:
    • Windows 10/11 for Firmware flashing & downloading
    • Xperia Bootloader Unlock Key (From HERE)
    • Platform Tools alias Fastboot & ADB (From HERE)
    • Fastboot and Flashmode Drivers (From HERE)
    • XperiFirm for Firmware Downloads (From XDA)
    • NewFlasher for Firmware flashing (From XDA)
    • Unsin to extract .sin Files (From XDA)
    • Magisk App (From GitHub)
    • A working Android System for Magisk
    • GSI & vbmeta Image (From Google) (Optional)
    • A Backup of Your Internal Devices Storage (Optional)


    2. Installing Drivers:
    1. Download the Drivers from the Link above and install them with disabled Driver Signature Enforcement. To do so:
    2. Press and hold down the Shift key while you click the “Restart” Option in the Windows Restart/Shutdown/Standby Options to do a advanced Restart.
    3. Select the “Troubleshoot” Option, followed by the advanced Options and Select "Startup Settings"
    4. Click on Restart and select Option "7) Disable driver signature enforcement"
    5. Once back in Windows, Install the Fastboot, Flashmode and Device Drivers
    6. Reboot Windows once more and You're prepared to flash Firmwares and to use Fastboot & ADB


    3. Flashing Firmwares with NewFlasher:
    1. Download XperiFirm from the Link above and extract it somewhere
    2. Download the wanted Firmware for Your Device Model with XperiFirm
    3. Download NewFlasher from XDA and extract it to Your Firmware Folder
    4. Start the NewFlasher Exe and make Your Choices
    5. That's it... You can do that with Locked and Unlocked Bootloaders!


    4. Bootloader Unlocking and Magisk Root:

    Note: Since You are going to unlock Your Bootloader, You may surely want to get Root. So let's start with Magisk or it will take more Time afterwards...

    1. Download UnSin from XDA and extract it somewhere
    2. Download the "Platform Tools" (Fastboot/ADB) from Google and extract it to the root of Your Windows Drive
    3. Download and install the Magisk Manager on Your Xperia Device
    4. Extract the File boot_********.sin (60MB+ File) with the Unsin Exe (Drag and drop the Image on the Exe)
    5. You will get a .img File which You can patch now with the Magisk Manager on Your Xperia
    6. Open the Magisk Manager and Install Magisk by selecting the Image File You just got from UnSin
    7. Copy the magisk_patched.img in /download from Your Device to the Platform Tools Folder
    8. Grab Your Device again, go to "About Phone" in the Settings and tap several Times on the build Version
    9. Go now to the Developer Settings under "System" and enable "OEM-Unlock" and "USB-Debugging"
    10. Use now the Platform Tools with this Commands:
    11. Type now (Step by Step):
      Code:
      cd\
      cd platform-tools
      Note: To use the Platform Tools Folder as environment for Fastboot and ADB. Or hold Shift and Make a right Click in the Platform Tools Folder to open the Command prompt there...

    12. Type now:
      Code:
      adb reboot bootloader
      You will get a prompt on Your Xperia Device. Your Device will Reboot afterwards...

    13. Now Your Bootloader Unlock Code:
      Code:
      fastboot oem unlock 0xYOURKEY

    14. Wait for it... And type now:
      Code:
      fastboot reboot

    15. Wait for Your Device to Wipe and Start. Once in the Android System, turn Your Device off without USB Connected

    16. Press and hold now the Volume UP Button while connecting to USB to enable the fastboot Mode

    17. Continue with flashing the Images for Root (Step by Step):
      (On 2020+ Xperias run: "fastboot reboot fastboot" first after You booted into fastboot)
      Code:
      fastboot flash boot_a magisk_patched.img
      fastboot flash boot_b magisk_patched.img

    18. Wipe and Reboot:
    19. Code:
      fastboot -w
      fastboot reboot
      Note: Unlocking Your Bootloader erases Your unique Device Key FOREVER. That will flag Your Device as "it was unlocked". This can be checked by SONY and (maybe) everyone else who has Your Device in his Hands...
    (SONY knows it anyways since You have to order a Key with Your IMEI).



    5. GSI flashing with Fastboot:

    Note: GSI ROMs can be found around the Web. Like here...
    Not all require the vbmeta change. You can use all GSIs that are made for ARM64 + A/B Devices. Play around. Systems can't damage Your Device since You keep the Stock Vendor & Kernel! You can use any Android Version!

    • Download a GSI "Starter Pack" Zip from Google
    • Extract the system.img and the vbmeta.img to Your Platform-Tools
    • Connect Your Device in Fastboot Mode and use Fastboot with:
      (On 2020+ Xperias run: "fastboot reboot fastboot" first after You booted into fastboot)
      Code:
      fastboot flash system_a system.img
      fastboot flash system_b system.img
      fastboot --disable-verity --disable-verification flash vbmeta_a vbmeta.img
      fastboot --disable-verity --disable-verification flash vbmeta_b vbmeta.img
      fastboot -w (this erases Your Userdata / Settings and Files)
      fastboot reboot


    6. Bootloader Re-Lock:
    • Flash the latest Firmware for Your Device with XperiFirm and Newlfasher
    • Erase all Userdata before You continue (like with fastboot -w)
    • Just go into fastboot mode and type in the command prompt (like before in this Guide):
    Code:
    fastboot oem lock
    • Wait for Your Device and disconnect it from USB
    • Done... Continue with Step 7.
    7. Firmware Restoring after Re-Locking:
    • Download and Install the "Xperia Companion" from SONY
    • Open the Xperia Companion and select Software Repair
    • Select that Your Device can't get recognized (or is a Smartwatch 3 lol)
    • Go to the next Page and select the Xperia Smartphone Option
    • Continue and wait for the Initialization
    • Press and hold Volume DOWN while connecting to USB (You will see the Green Flashmode LED again)
    Continue once Your Device gets recognized and let the Xperia Companion do his work...
    Done. Your Bootloader is locked again and almost all of Your DRMs are restored.



    That helped? Leave a Thanks! <3
    Donations are actually also really welcome!


    BTC: 3A93fjg2KxZJEHUpBExs7rVgivfAUumQoJ
    ETH&ERC20-USDT: 0xD27860248B7E51720DDf9CA5a1f861CA1029c14A
    ERC20: 0xD27860248B7E51720DDf9CA5a1f861CA1029c14A
    2
    Feedback is always welcome! <3
    2
    I could not find the
    • GSI "Starter Pack" (From Google) from this link.

    • Could you please be more specific and tell us which GSI will work (Android 12, 11, or 10, and ARM64+GMS, ARM64, x86_64+GMS, or x86_64.). Thanks.
    Hey, the "Starter Pack" is just another Name for the Google Zip which includes GSI and vbmeta. We are on ARM64 and GMS means GApps are included. Please read a bit about how Treble and GSIs are working and start from there. x86_64 btw. is the Dekstop Platform (Like Intel or AMD PCs). Basic knowledge :)

    Don't want to make this an Info/Wiki Thread or so...
    I want to unlock my bootloader and root my 3 iii but I have read something about needing to back up and restore DRM keys otherweise some camera features and other stuff wont work anymore. Is that something that needs to be done on this phone and also, what exactly is the GSI stuff? It looks like that is an entire rom or something. Do we need to flash/install that? I am fine with the stock firmware. Im out of my element with this Sony stuff.
    That Informations are old and obsolete. Hardware works just fine after unlocking (On all Xperias since 2019), DRMs can be restored like i wrote in the Guide. We are using OLED HDR Displays. So don't care about Bravia or such stuff. Only Netflix and Video Enhancements aside from the Creator Mode are not working if unlocked. But AOSP is here and ROMs are also coming based on SODP and AOSP (With Mainline Kernels (Or GKI)) Please also read about Treble and GSIs before You start! It's a thing since Android 8 on all Android Devices. So it will be good to know! :p GKIs are also coming to all Android Devices soon...
    2
    I flashed the edited boot image to A and B and it wasn't until after this I used "newflash" after that instead of before like another guide I saw here suggests. I don't even know what I'm flashing or what newflash even does. We're getting instructions but not explanations, and I can't even find explanations.
    Newflasher "allows you to flash firmwares acquired through XperiFirm to Sony phones including and newer than the XZ Premium." (From https://github.com/munjeni/newflasher). With XperiFirm you can download stock Sony firmware for various models.
    Considering how badly rooting my Xperia 1 III went last night, I'm a little afraid to try flashing an actual ROM now. I can't find an answer as to what happens when Sony releases an OTA update.
    Sony releases OTA updates that, depending on the update, usually aren't full firmware so it's a smaller package. When you download firmware from XperiFirm, it's the full firmware, so some steps need to be taken so user data isn't overwritten, and since Newflasher flashes the latest boot image, you need to re-root by flashing the Magisk-modified one. This is what the above guide outlines correctly. Following the steps accurately successfully led me to install the firmware without losing any data, and ending with root.
    "Your device can't be checked for corruption. Please lock the bootloader." is seen when rebooting, and it isn't mentioned whether that's okay or not.
    Yep, that's what it says on Sony phones nowadays when you unlock the bootloader. Totally fine. It's an easy way for someone to tell that the bootloader is unlocked. Pretty much all manufacturers, that I'm aware, have some sort of modified splash screen at boot to indicate an unlocked bootloader.
    There has to be a place where I can find some of these answers within a reasonable time frame. 10+ years is a lot to catch up on for me.
    Sorry, but not really. Google and a few hours really is your friend here, and with the 1 III being a new phone, some questions simply don't have answers we want yet.
    There's so much I want to do like have a better method to backup and restore app settings such as OSMAND+ since its built-in backup doesn't work right at all.
    You can try OAndBackupX, or Titanium Backup with the latest fix that popped up a bit ago.
    2
    The downloading and installing/flashing of the GSI file (Step 5) is not necessary what so ever if all you are wanting to do is unlock your bootloader and root the phone.

    And yes, when unlocking your bootloader, select the Xperia 1 II on the sony web site.