How To Guide WARNING: Read BEFORE Locking Bootloader

Search This thread
DO NOT LOCK THE BOOTLOADER WHILE ROOTED!

When locking the bootloader while rooted, the boot image will fail verification and the system will fail to boot. You cannot flash a stock boot image with a locked bootloader.

Locking the bootloader will not fix most issues. It will allow you to use apps that check for an unlocked bootloader without the need for any additional modification. That is the ONLY benefit.

If you still want to lock your bootloader, make sure you can say yes to each of the following:

1. Have you restored the stock boot.img / vendor_boot.img and the phone functions normally?
Follow the instructions in the thread above.
Use only the boot and vendor_boot images.
Do NOT flash any images that end with "-magisk.img"
2. Have you made a backup of everything you do not want to lose when wiping the phone?
The sdcard is part of the internal storage and is cleared by a factory reset
Copy everything you want to keep to a computer or USB-C storage device
Apps and settings can be backed up by enabling the Google Backup option
  • Open Settings
  • Select Google
  • Select Backup
  • Select Back up now
  • Wait for the backup to complete
3. Have you flashed raw firmware and made sure the phone and updates function normally?
Follow the instructions in the thread above.
If you perform a wipe, you may skip step 4.
4. Have you performed a factory reset and made sure the phone functions normally?
  • Open Settings
  • Select System
  • Select Reset options
  • Select Erase all data (factory reset)
  • Follow the instructions

Once you have verified all of the above requirements, you are now ready to lock the bootloader.
From the bootloader (volume up + power):
Code:
fastboot oem asus-csc_lk
 
Last edited:

falhumai96

Member
Jun 26, 2017
27
7
I don't want to spread false information here, but here is a question post I created recently with two replies showing me contacting the help center (two different agents) confirming that I can use the app more than once to unlock the device's bootloader: https://forum.xda-developers.com/t/...nlock-relock-for-asus-rog-phone-5-5s.4367047/ . @Andrologic also confirms the case there for global (EU) version. I have a feeling that for the Tencent version it is because the sellers lock it on a wrong official ROM, or wrong ROM in general, e.g. global ROM, and therefore it confuses the unlock app. I am surprised the device did not even get hard bricked from locking on not the original ROM. By the way, I have contacted the help center of the US store, but I have a feeling it should work on the global (EU) version as well.
 
I don't want to spread false information here, but here is a question post I created recently with two replies showing me contacting the help center (two different agents) confirming that I can use the app more than once to unlock the device's bootloader: https://forum.xda-developers.com/t/...nlock-relock-for-asus-rog-phone-5-5s.4367047/ . @Andrologic also confirms the case there for global (EU) version. I have a feeling that for the Tencent version it is because the sellers lock it on a wrong official ROM, or wrong ROM in general, e.g. global ROM, and therefore it confuses the unlock app. I am surprised the device did not even get hard bricked from locking on not the original ROM. By the way, I have contacted the help center of the US store, but I have a feeling it should work on the global (EU) version as well.

Based on new information, it does seem possible to repair the issues caused by converting.

That said, this guide is still quite relevant. After all, most of the issues people were having were caused by unlocking the bootloader, converting, rooting, and locking the bootloader. The warning for possibility of not being able to unlock have been removed, but the info about restoring to stock before locking has been left.
 
Last edited:
  • Like
Reactions: falhumai96

chairman011

Senior Member
Nov 11, 2012
228
64
houston
ASUS ROG Phone 5
I send mine in for a motherboard repair I was rooted and everything I unrooted installed stock firmware and locked the bootloader again once I got the phone back I unlocked the bootloader once again and I am rooted again
 
  • Like
Reactions: falhumai96

falhumai96

Member
Jun 26, 2017
27
7
I send mine in for a motherboard repair I was rooted and everything I unrooted installed stock firmware and locked the bootloader again once I got the phone back I unlocked the bootloader once again and I am rooted again
@chairman011 what variant of the phone it is (e.g. CN or WW or US, ...etc.)? Also, when they returned it to you and you were able to unlock it again, was it on the original firmware (or any version in its lineage (i.e. not a ROM that's not original))?
 

falhumai96

Member
Jun 26, 2017
27
7
If by using ASUS unlock utility one was able to oneself unlock the boot-loader once, then is it safe to say that (after relocking it) it'd be possible to unlock it again?
Some people have reported that you can't unlock the bootloader again after relocking, using the official "Unlock Device App", but I suspect it is an OS mismatch. This issue has only been observed on Tencent (CN) version with global ROM. Have anyone been able to unlock->relock->unlock on the same version of the phone, but not relocking while on the global ROM (i.e. relocking while on stock CN ROM)?

I am surprised the phone did not hard brick. Usually, and this is a general case in almost all Android phones with bootloader unlock capability, when you relock on a different ROM your phone hard bricks. Always restore to original ROM before relocking. Can people with Tencent (CN) phones with global ROM and locked bootloader flash the original CN ROM without unlocking the bootloader? If so, can you test the "Unlock Device App" to see if it works while on the CN (official) ROM? I gotta a feeling it might work in that situation.
 
Some people have reported that you can't unlock the bootloader again after relocking, using the official "Unlock Device App", but I suspect it is an OS mismatch. This issue has only been observed on Tencent (CN) version with global ROM. Have anyone been able to unlock->relock->unlock on the same version of the phone, but not relocking while on the global ROM (i.e. relocking while on stock CN ROM)?

I am surprised the phone did not hard brick. Usually, and this is a general case in almost all Android phones with bootloader unlock capability, when you relock on a different ROM your phone hard bricks. Always restore to original ROM before relocking. Can people with Tencent (CN) phones with global ROM and locked bootloader flash the original CN ROM without unlocking the bootloader? If so, can you test the "Unlock Device App" to see if it works while on the CN (official) ROM? I gotta a feeling it might work in that situation.

It's an identification mismatch. It's similar to when you throw your SIM card in a different phone and your carrier lists you as having a different phone. Based on the information that has been discovered, it would appear that CN to WW conversions were wiping out the stuff that makes your device your device.
 

mhrs.11

New member
Jun 7, 2021
1
0
It's an identification mismatch. It's similar to when you throw your SIM card in a different phone and your carrier lists you as having a different phone. Based on the information that has been discovered, it would appear that CN to WW conversions were wiping out the stuff that makes your device your device.
So, basically the bootloader unlock for tencent devices will always locked unless asus uodate their unlock app or has their been another way around it yet?
 

0v3rkill

Member
Aug 22, 2022
20
1
Hi there, can you guys help me? I'm one of those unlucky ones who got my phone corrupted and won't boot anymore due to the boot loader. is there a way to fix this?? I've got an ROG phone 5s 16/512 on android12.

Hope you guys can help me! I know you guys have amazing brain cells than me when it comes to these things lol

Oh! and my rog is not the china version thanks :)
 

Attachments

  • 20220822_223411.jpg
    20220822_223411.jpg
    1 MB · Views: 53
  • 20220822_223527.jpg
    20220822_223527.jpg
    1.3 MB · Views: 56

Andrologic

Senior Member
Apr 29, 2016
343
1
131
Huawei Nexus 6P
Huawei Mate 20 X
Hi there, can you guys help me? I'm one of those unlucky ones who got my phone corrupted and won't boot anymore due to the boot loader. is there a way to fix this?? I've got an ROG phone 5s 16/512 on android12.

Hope you guys can help me! I know you guys have amazing brain cells than me when it comes to these things lol

Oh! and my rog is not the china version thanks :)

TYou should be able to RAW flash yourself out of it if a factory reset doesn't work. This does happen when re-locking the WW.
 

Andrologic

Senior Member
Apr 29, 2016
343
1
131
Huawei Nexus 6P
Huawei Mate 20 X
Hi there mate, thanks heaps for taking time.on my post. how do i do that? can you send me a link of the step by step guide? again thanks 😊

Below post from the help guide (credits to the contributors) has links to RAW firmware packages. You just need any one of the WW packages. Download it and with your device in bootloader mode, run one of the .bat flash scripts that you'll find in the RAW package. The version doesn't matter, you can simply update to the latest firmware once you're back up.


 

0v3rkill

Member
Aug 22, 2022
20
1
Below post from the help guide (credits to the contributors) has links to RAW firmware packages. You just need any one of the WW packages. Download it and with your device in bootloader mode, run one of the .bat flash scripts that you'll find in the RAW package. The version doesn't matter, you can simply update to the latest firmware once you're back up.


Hi there, I did follow and did the raw setup it did got me through the boot loop. However, its stuck on the system start up updating screen and stays in 0%.
 

Attachments

  • 20220823_133701.jpg
    20220823_133701.jpg
    1.1 MB · Views: 25

0v3rkill

Member
Aug 22, 2022
20
1
Darn i thought im already dead! i didn't even know how i fixed it hahahaha! but its working now successfully downgraded to android 11 because its the only firmware i found and managed to make it work again combination of alot of research in google and here xda. working 100% imei two of them, finger print and sn are all intact. thanks guys
 
  • Like
Reactions: Andrologic
For these few reasons I have to give up root & lock the boot-loader: 1. Financial apps stop working from time to time causing much grief; 2. I've used root functionality precisely for nothing for a year I've had it; 3. It was getting all too complicated to keep up with it all.

(The original intention for unlocking/rooting was to get some sort of unofficial VoLTE and VoWiFi for the mobile operator of my choice; however, it didn't help. Then a newer firmware implemented VoLTE and VoWiFi! So my impatience, admittedly couldn't be known at that point in time, backfired.)

I've nothing to preserve on the phone, due to having a Moto G 5G backup phone. I only had it working with adb & fastboot in my Linux laptop (up to date Fedora 36). I had no working Windows laptop then. But I do now. However, adb on Windows says the device is "unauthorised" (as expected); fastboot in it doesn't list the device. So I might be limited to my Linux laptop only. The phone was previously working on the last A11 WW firmware fine.

I've tried to follow the steps from the original post of this thread. First one worked with vendor_boot, dtbo & boot images (used only 18.0840.2202.231 versions of them). Second N/A. With third step, flash_raw_and_wipe_data.sh fails by core dumping.

Right now, the phone boots to fastbootd & not further. Any help is much appreciated.
(I think I'm inching towards fully bricking this phone. I'm not there yet, but getting closer :). It'd be nice to get it working again without root & with locked boot loader. Any help is much appreciated.)
 
This is where I'm at while executing step 3 of the initial guide in this post:
When powered on, in the usual boot loader unlocked warning page, it prompts for power key to be pressed to continue.
(Here if power switch is not pressed within 30 odd seconds, phone powers down automatically.)
Once power key is pressed, it lands in boot loader. Selecting Start, it goes back to boot loader. I think this is called a boot loop.
While in boot loader, selecting "Recovery mode", it progresses to "Android Recovery". Here selecting "Enter fastboot" appears to take it furthest in the booting process of landing at "Android Fastboot".
(The version info showed in Fastboot -- 18.0840.2202.231-0 -- matches with the last A11 update I downloaded from Asus website & had it installed late March this year.)
I don't think it can boot any further at the state that it's in now.
I think this is where it needs a raw firmware to be flashed. This step keeps core-dumping in my Linux laptop when trying to use WW_ZS673KS_18.0840.2106.83_M3.13.24.40-ASUS_1.1.92_Phone-user.raw file that was linked in the original post. This version appears to be quite old. Could the version mismatch between what the phone was running recently (18.0840.2202.231) and the raw file (18.0840.2106.83) cause the core-dump issue? IOW, would somebody have a link for 18.0840.2202.231 raw file please?
I couldn't use my work Windows laptop due to an issue I cannot overcome (installation of driver needed for the phone is somehow blocked in it). So, soon I'll try it from a personal Windows laptop of my neighbor. Let's see if it can progress any further with the help of Windows platform.
In the meantime, I can appreciate to be informed about any tips and tricks such as if this is something that the phone cannot be recovered from. Or even somebody highly skilled would like to help me to achieve a fully functional phone (with bootloader locked please) for a fair compensation. Please let me know. Thanks for any guidance.
 
Last edited:

Andrologic

Senior Member
Apr 29, 2016
343
1
131
Huawei Nexus 6P
Huawei Mate 20 X
This is where I'm at while executing step 3 of the initial guide in this post:
When powered on, in the usual boot loader unlocked warning page, it prompts for power key to be pressed to continue.
(Here if power switch is not pressed within 30 odd seconds, phone powers down automatically.)
Once power key is pressed, it lands in boot loader. Selecting Start, it goes back to boot loader. I think this is called a boot loop.
While in boot loader, selecting "Recovery mode", it progresses to "Android Recovery". Here selecting "Enter fastboot" appears to take it furthest in the booting process of landing at "Android Fastboot".
(The version info showed in Fastboot -- 18.0840.2202.231-0 -- matches with the last A11 update I downloaded from Asus website & had it installed late March this year.)
I don't think it can boot any further at the state that it's in now.
I think this is where it needs a raw firmware to be flashed. This step keeps core-dumping in my Linux laptop when trying to use WW_ZS673KS_18.0840.2106.83_M3.13.24.40-ASUS_1.1.92_Phone-user.raw file that was linked in the original post. This version appears to be quite old. Could the version mismatch between what the phone was running recently (18.0840.2202.231) and the raw file (18.0840.2106.83) cause the core-dump issue? IOW, would somebody have a link for 18.0840.2202.231 raw file please?
I couldn't use my work Windows laptop due to an issue I cannot overcome (installation of driver needed for the phone is somehow blocked in it). So, soon I'll try it from a personal Windows laptop of my neighbor. Let's see if it can progress any further with the help of Windows platform.
In the meantime, I can appreciate to be informed about any tips and tricks such as if this is something that the phone cannot be recovered from. Or even somebody highly skilled would like to help me to achieve a fully functional phone (with bootloader locked please) for a fair compensation. Please let me know. Thanks for any guidance.

Confirm that you can send fastboot commands to the device. It's a prerequisite for flashing the original boot img back or doing a RAW flash if boot looped. That's the very first step you need sorted and confirmed. Sounds like you may not be in the right Fastboot mode. The RAW version doesn't matter too much as long as it's in line with your device version, you just need it to get back up and can upgrade normally to other versions.
 
  • Like
Reactions: nexusnerdgeek

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    DO NOT LOCK THE BOOTLOADER WHILE ROOTED!

    When locking the bootloader while rooted, the boot image will fail verification and the system will fail to boot. You cannot flash a stock boot image with a locked bootloader.

    Locking the bootloader will not fix most issues. It will allow you to use apps that check for an unlocked bootloader without the need for any additional modification. That is the ONLY benefit.

    If you still want to lock your bootloader, make sure you can say yes to each of the following:

    1. Have you restored the stock boot.img / vendor_boot.img and the phone functions normally?
    Follow the instructions in the thread above.
    Use only the boot and vendor_boot images.
    Do NOT flash any images that end with "-magisk.img"
    2. Have you made a backup of everything you do not want to lose when wiping the phone?
    The sdcard is part of the internal storage and is cleared by a factory reset
    Copy everything you want to keep to a computer or USB-C storage device
    Apps and settings can be backed up by enabling the Google Backup option
    • Open Settings
    • Select Google
    • Select Backup
    • Select Back up now
    • Wait for the backup to complete
    3. Have you flashed raw firmware and made sure the phone and updates function normally?
    Follow the instructions in the thread above.
    If you perform a wipe, you may skip step 4.
    4. Have you performed a factory reset and made sure the phone functions normally?
    • Open Settings
    • Select System
    • Select Reset options
    • Select Erase all data (factory reset)
    • Follow the instructions

    Once you have verified all of the above requirements, you are now ready to lock the bootloader.
    From the bootloader (volume up + power):
    Code:
    fastboot oem asus-csc_lk
    2
    If by using ASUS unlock utility one was able to oneself unlock the boot-loader once, then is it safe to say that (after relocking it) it'd be possible to unlock it again?
    Some people have reported that you can't unlock the bootloader again after relocking, using the official "Unlock Device App", but I suspect it is an OS mismatch. This issue has only been observed on Tencent (CN) version with global ROM. Have anyone been able to unlock->relock->unlock on the same version of the phone, but not relocking while on the global ROM (i.e. relocking while on stock CN ROM)?

    I am surprised the phone did not hard brick. Usually, and this is a general case in almost all Android phones with bootloader unlock capability, when you relock on a different ROM your phone hard bricks. Always restore to original ROM before relocking. Can people with Tencent (CN) phones with global ROM and locked bootloader flash the original CN ROM without unlocking the bootloader? If so, can you test the "Unlock Device App" to see if it works while on the CN (official) ROM? I gotta a feeling it might work in that situation.
    1
    I don't want to spread false information here, but here is a question post I created recently with two replies showing me contacting the help center (two different agents) confirming that I can use the app more than once to unlock the device's bootloader: https://forum.xda-developers.com/t/...nlock-relock-for-asus-rog-phone-5-5s.4367047/ . @Andrologic also confirms the case there for global (EU) version. I have a feeling that for the Tencent version it is because the sellers lock it on a wrong official ROM, or wrong ROM in general, e.g. global ROM, and therefore it confuses the unlock app. I am surprised the device did not even get hard bricked from locking on not the original ROM. By the way, I have contacted the help center of the US store, but I have a feeling it should work on the global (EU) version as well.

    Based on new information, it does seem possible to repair the issues caused by converting.

    That said, this guide is still quite relevant. After all, most of the issues people were having were caused by unlocking the bootloader, converting, rooting, and locking the bootloader. The warning for possibility of not being able to unlock have been removed, but the info about restoring to stock before locking has been left.
    1
    I send mine in for a motherboard repair I was rooted and everything I unrooted installed stock firmware and locked the bootloader again once I got the phone back I unlocked the bootloader once again and I am rooted again
    1
    Darn i thought im already dead! i didn't even know how i fixed it hahahaha! but its working now successfully downgraded to android 11 because its the only firmware i found and managed to make it work again combination of alot of research in google and here xda. working 100% imei two of them, finger print and sn are all intact. thanks guys