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

Search This thread

jaungster

Member
Aug 10, 2013
19
1
Xperia 1 III XQ-BC62
Build 61.1.A.2.2.11
Android 12s - Rooted With SaftyNet Pass
After some hair pulling I got the fastboot drivers installed, bootloader unlocked and the rest was easy. I am old school, was just in the habit of pressing shift-right click for CMD or going to the file address bar and right clicking and typing CMD for the prompt for said file. It seems CMD is broken or blocked by windows, I'm calling it broken. I could plug the device to the usb then adb reboot bootloader, device go's to fastboot then connection is lost. If I tried to power off device, Vol-up the plug usb in for fastboot no devices found or waiting on device.
For some time I have had a unknown device in my device manager. This device is my usb wireless headset. I was getting Windows errors for USB drivers and so on. Logitech, HyperX, Corsair several brands have had this error. The headset works, so I just turned of error reporting for it. Somewhere I read that this was a problem with the USB stack when updating or upgrading form a previous version of Windows 10. I was able to transfer files to the PC and back so I ruled the USB stack out. Then I thought what if it's CMD line itself. I tried Power Shell and it worked.
Power down device, Vol-up plugin usb (use Sony cable) then in Power Shell fastboot devices. You will see the SN. of the device. Then go to Device Manager and install fastboot driver. Browse to where the driver is on your PC. Then preform the fastboot oem unlock 0xWhatEverCodeIs. From there I fastboot flashed the Magisk.img "a" then "b" as separate commands. Next was the wipe, fastboot -w then fastboot reboot. When the device reboots it boots in recovery stating the data is corrupted. Vol-Dwn + power to reinstall factory reset. Android will then boot. You will need to do the Google set up. When done open Magisk, top left should say Installed 24.3 (24300) and yes for Ramdisk. Open settings scroll down to Magisk and turn on Zygisk. I wanted to keep SafetyNet. In order to do this there are modules you will need from this cool tool.
https://github.com/Fox2Code/FoxMagiskModuleManager/releases
I downloaded the zip to my device documents folder. Open Magisk up go to modules bottom right, install from storage. You will then open Fox's Modules app up and look for "MagiskHide Props Config" install it, then look for "Universal SaftyNet Fix V2.2.0" and install it. once installed you can go back in to Magisk click on settings and set Hide Magisk app. Note, this is not the same operation as the Hide Props Config, two different things. Thats it set up Super User as you wish. You can get a SaftyNet check app from the Play Store.
Note: Whats posted here my not work for other android 12 Builds. USE AT YOUR OWN RISK.

See V0latyle post here:​


Hey there. I'm running android 12, and I'm having the same issues that you had when trying to unlock my bootloader.

When I hold vol up and plug my phone into my computer for fastboot mode, no device is recognized when typing fastboot devices. When rebooting into fastboot mode using adb reboot bootloader, when entering the unlock code, I get the waiting on any device code.

Anyone seem to figure this out? Using both powershell, cmd prompt, and admin cmd prompt seem to not work. Is it an android 12 thing?
 

Attachments

  • Capture.PNG
    Capture.PNG
    24.2 KB · Views: 42

UsernameNotRecognized

Senior Member
May 17, 2012
258
42
Hey there. I'm running android 12, and I'm having the same issues that you had when trying to unlock my bootloader.

When I hold vol up and plug my phone into my computer for fastboot mode, no device is recognized when typing fastboot devices. When rebooting into fastboot mode using adb reboot bootloader, when entering the unlock code, I get the waiting on any device code.

Anyone seem to figure this out? Using both powershell, cmd prompt, and admin cmd prompt seem to not work. Is it an android 12 thing?
Is the phone also saying FASTBOOTD at the very top? Me thinks you're in bootloader, not fastboot.
 

jaungster

Member
Aug 10, 2013
19
1
Is the phone also saying FASTBOOTD at the very top? Me thinks you're in bootloader, not fastboot.
I forgot to mention, the phone vibrates as though it's turning on when I do the adb bootloader command. The screen never turns on though, however the notification light does turn blue.

Bootloader unlock and USB debugging are both enabled. The phone is also set to file transfer USB mode.
 

UsernameNotRecognized

Senior Member
May 17, 2012
258
42
I forgot to mention, the phone vibrates as though it's turning on when I do the adb bootloader command. The screen never turns on though, however the notification light does turn blue.

Bootloader unlock and USB debugging are both enabled. The phone is also set to file transfer USB mode.
Yeah that's not fastboot. To enter fastboot you need to unlug, then turn the phone on and hold volume down.
If you hold volume down with plug you get what you see now, that's bootloader.
 

jaungster

Member
Aug 10, 2013
19
1
Yeah that's not fastboot. To enter fastboot you need to unlug, then turn the phone on and hold volume down.
If you hold volume down with plug you get what you see now, that's bootloader.
Yup. Figured out I didn't have the drivers properly installed. Got that finally working and we were good to go. Root is easy and possible on A12 as long as all the new drivers are installed.
 

jaungster

Member
Aug 10, 2013
19
1
Hello all. I've been browsing the forums to see if there's a guide for updating once rooted. I have everything set up the way I want, but i'm experiencing the .128 cell service connectivity issues. I'm wanting to update to .129, but I'm unsure the proper steps.

Do I need to do everything in the OP's guide on page 1, but without the bootloader unlock stuff (his guide steps 8-14)? Also, will I lose app data and stuff?

  1. Download UnSin from the link above and extract it somewhere
  2. Download the "Platform Tools" from Google and extract it to the root of Your main Windows Drive
  3. Download and install the Magisk Manager on Your Android 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 Android Device
  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. (15)Wait for Your Device to Wipe and Start. Once in the Android System, turn Your Device off without USB Connected
  9. (16) Press and hold now the VolumeUp (+) Button while connecting to USB to enable the fastboot Mode

  10. (17) Continue with flashing the Images for Root (Step by Step):
    Code:
    fastboot flash boot_a magisk_patched.img
    fastboot flash boot_b magisk_patched.img
  11. (18) Wipe and Reboot:
  12. (19) Code:
    fastboot -w
    fastboot reboot
    Note: Your are unlocked and rooted now! Enjoy Your Unleashed Device :)
 
  • Like
Reactions: atomicvon

Shefczenko

Senior Member
Mar 15, 2012
50
12
25
Brandýs nad Labem
Little question, when rooted an system update does not show in the OTA updater so if I update it using Xperia companion won't the phone soft brick? Just update and root again?
 

jaungster

Member
Aug 10, 2013
19
1
Little question, when rooted an system update does not show in the OTA updater so if I update it using Xperia companion won't the phone soft brick? Just update and root again?
That's what I'm asking. OTA breaks upon bootloader unlock. I'm unsure of the steps to update with magisk, whether it's use newsflasher, or patch the newest firmware like the original installation.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20

    Introducing this Guide

    Hello there 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 at all. Inform Yourself using Google to enjoy the total Freedom and Customization of Android... If You can't solve Problems Yourself, by communicating and research, don't touch Your Bootloader!

    IMPORTANT:
    2020+ Xperias are using fastbootd, and equivalent to fastboot which runs in Userspace (Same as Recoveries).
    You can access Your Recovery on Your Xperia by holding VolumeDown (-) & the Powerbutton (Your Device needs to be turned off before ofc). Release the Powerbutton after the Display turned on and hold VolumeDown (-) until You see the Recovery Screen. From there, You can enter fastbootd and fastboot. Labled as "Fastboot" for fastbootd and "Bootloader" which is the old fastboot. You can flash Kernels, Recoveries and other stuff from fastboot. Everything else like System Images (GSIs for example), Product Images, System_ext Images and any Userspace stuff has to be flashed from fastbootd. 2019 Xperias are still using fastboot only...
    Fastboot and Fastbootd has nothing to do with SONYs Flashmode on Xperias!


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

    1. Requirements:
    • Read! Inform Yourself about the Tools You use...
    • Xperia Basics:
      Your Device is turned Off...
      Blue LED=Fastboot (Hold VolumeUp (+) & Connect to USB)
      Green LED=Flashmode (Hold VoumeDown (-) & Connect to USB)
    • Windows 10/11 for Firmware flashing & downloading
    • Xperia Bootloader Unlock Key (From HERE)
    • Platform Tools alias ADB and Fastboot (From HERE)
    • Fastboot and Flashmode Drivers (From HERE and HERE)
    • EMMA for Firmware Updates (From HERE)
    • XperiFirm for Firmware Downloads (From XDA)
    • Unsin to extract the Kernel .sin from XperiFirm (From XDA)
    • Magisk Manager to patch the extracted Kernel .sin (From GitHub)
    • A working Android System for the Magisk Kernel patching
    • GSI & vbmeta Image (From Google) (Optional)
    • A Backup of Your Internal Devices Storage (Optional)


    2. Installing Drivers:
    1. Download the Drivers from the Links above and extract them
    2. Install the downloaded and extracted Drivers by right clicking on the ***.inf Files "Install"


    3. Flashing Firmwares with EMMA:
    1. Download EMMA and install it
    2. Start EMMA and connect Your Device to USB (Flashmode)

    3.1. Downloading Firmwares with XperiFirm:
    1. Download and extract XperiFirm from the link above
    2. Run XperiFirm and Download the right Firmware for Your Device


    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 the link above and extract it somewhere
    2. Download the "Platform Tools" from Google and extract it to the root of Your main Windows Drive
    3. Download and install the Magisk Manager on Your Android 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 Android Device
    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 (In Powershell):
    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 VolumeUp (+) Button while connecting to USB to enable the fastboot Mode

    17. Continue with flashing the Images for Root (Step by Step):
      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: Your are unlocked and rooted now! Enjoy Your Unleashed Device :)



    5. GSI flashing with Fastboot:

    Note: GSI ROMs can be found around the Web. Like here...
    Not all GSIs 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! Don't forget to make backups if needed. You are going to Format Your Device!

    • Download a GSI 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
      [Optional] fastboot --disable-verity --disable-verification flash vbmeta_a vbmeta.img
      [Optional] fastboot --disable-verity --disable-verification flash vbmeta_b vbmeta.img
      fastboot -w (This does Format Your Device and is needed everytime You change the GSI!)
      fastboot reboot


    6. Bootloader Re-Lock:
    • Flash the latest Firmware for Your Device with EMMA
    • Erase all Userdata before You continue (like with fastboot -w or via Recovery)
    • 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.