How To Guide The Quest for a Bootloader Unlock (partial guide, T-Mobile variant, may work for MetroPCS/Metro variant)

Search This thread

elliwigy

Retired Forum Moderator / Recognized Developer
XDA App Taskforce
Yes, I rebooted with adb command "adb reboot fastboot".. it says fastbootd tho, I'm assuming that's where I need to be

Yes, bought straight from T-Mobile..build number DE18CB

No emu's or anything.. after disconnecting my device, "fastboot devices" shows nothing
thats bcuz u need to do adb reboot bootloader.. fastbootd is for gsi stuff only

to add, it will say Fastboot Mode and at the top have big green letters saying START like pictures on the first page
 
Last edited:

elliwigy

Retired Forum Moderator / Recognized Developer
XDA App Taskforce
Hmmm... Perhaps an out of date fastboot.exe?

You can use the command
Code:
fastboot --version
to check the location your running fastboot.exe from, to ensure you're running it from the install you want it to run from.
his fastboot exe is working its just that his device is in fastbootd instead of fastboot

i just checked and seems thats the only step missing lol.. it assumes you know how to get into "fastboot" mode I guess.. either way, fastbootd is used to flash gsi and stuff as its fastboot loaded in userspace to handle the dynamic partitions aka super but doesnt allow regular fastboot commands
 
Last edited:
After unlocking BootLoader, I tried this but no success in Network-Unlock

Code:
C:\adb>adb shell pm uninstall --user 0 com.qualcomm.qti.remoteSimlockAuth
Success


C:\adb>adb shell pm uninstall --user 0 com.qualcomm.qti.remoteSimlockAuth
Failure [not installed for 0]


C:\adb>adb shell pm uninstall --user 0 com.qualcomm.qti.uim
Success


C:\adb>
 

bleezycheesy

New member
Jan 13, 2022
4
1
Still learning lol. Thank you for all the serious devs that can help enthusiasts like me. You're all gods in my book 🦾🦾 thanks for the knowledge. In retrospect, you're all making me lazy copying and pasting 😜😁jk. Love y'all
 
OK, this process has been hell, but I'm gonna try and consolidate everything I've worked out so far in one place. This all applies only to the T-Mobile variant (ie. it comes preloaded with all the T-Mobile bloatware) of the N200 on the T-Mobile network; and a Windows PC, where a PC is used (though I imagine the Mac/Linux commands are quite similar). This is more to gather the info in one place than to provide step-by-step instructions.

SIM/NETWORK UNLOCK

Before you can unlock the bootloader, the N200 needs to be SIM unlocked. The option to Enable OEM Unlock won't even show up in the developers options until then. A temporary SIM unlock won't work, it needs to be a permanent SIM unlock.

If your N200 is the T-Mobile variant, you can get it SIM unlocked free here (be sure to read the first post thoroughly to be sure you qualify):
@mobbdeep had my SIM unlocked within 24 hours of sending him the required info.
You MUST have an active T-Mobile network (not Sprint or Metro) SIM card in the N200 for at least 3 full days before sending your SIM Unlock request in.

---
*edit-
An alternate is to use this debloat script:
Which should unlock the OEM Unlock option in the developer options.
This should work with non-T-Mobile variants of the N200 as well.
Thanks to @PopCaps1996 for pointing this option out.
---
*edit2-
Thanks to user @DeadDjembe we now know the specific command from the debloat script which enables OEM Unlocking.
Code:
adb shell pm uninstall --user 0 com.qualcomm.qti.uim
Running this ADB command on a stock T-Mobile variant N200 should enable the greyed-out Allow OEM Unlock option in the developers settings, without needing to run the full debloat script.
---

Once your N200 is SIM Unlocked, the Enable OEM Unlock option will show up in the developers options.

USB DRIVERS

You may need to use the Google USB Driver from Android Studio to allow your PC to recognize your phone when it's in fastboot mode.
Android Studio won't install the USB Drivers by default, you'll need to install them through the SDK Manager (Android Studio -> Projects -> More Actions -> SDK Manager -> SDK Tools -> Google USB Driver checkbox -> Apply)
You'll need to manually install the drivers through the device manager while the phone is in fastboot mode and connected to the PC (right-click -> Update Drivers -> Browse Computer -> Let Me Pick -> Have Disk).
The drivers should be located at:
C:\Users\[username]\AppData\Local\Android\Sdk\extras\google\usb_driver\android_winusb.inf
You'll want the 'Android Bootloader Interface' driver.

UNLOCK CODE/TOKEN

Once you can access your phone in fastboot mode, you can try:
'fastboot oem unlock'
But, you'll just get a message asking for an unlock token. Doesn't hurt to try, just in case, though.

What you need to do now, is type:
'fastboot oem get_unlock_code'
This will display both the phone's serial number, plus a 64 digit unlock code. (you might not be able to select the code to copy it, but a ctrl-a / ctrl-c should work, then just paste it in notepad)

Now, on your phone (still in fastboot mode) hit up/down on the volume buttons, until you see "Show Barcode", then tap the power button to select it.
This will bring up a barcode, as well as listing you devices IMEI number. (there are other ways to get the IMEI, but this is quick, and you're already right there)
Copy the IMEI down.

Now go to:
https://www.oneplus.com/unlock_token
You'll need to create an account.

In that form, you'll need to select the phone's model, and then enter the serial number, 64 digit unlock code (no spaces), the IMEI, and your email, as well as checking a box that you acknowledge that you void the warranty by bootloader unlocking the phone.

If all goes well, It should take about a week from submission for them to send you the unlock token.

------

I've just sent in my info an hour or two ago, and am now waiting for my unlock token.
I'll update this with what you need to do with the token once I've gotten mine and figure it out myself, lol.

------

Exactly 7 days (nearly to the minute) after sending the request in, I received the unlock code. So here's the update:

APPLYING THE UNLOCK CODE

You can use this URL to check the status of your Unlock Coed request:

Once your Status is listed as "Finished", there will be a download button at the lower right corner.

Download the "unlock_code.bin" file to your PC.

Place 'unlock_code.bin' in:
C:\Users\[user name]\AppData\Local\Android\Sdk\platform-tools\
Or where ever you have your fastboot.exe file.
If you don't know where it is, the command:
Code:
fastboot --version
will give your it's location.

Now in command line, navigate to the folder "fastboot.exe" and "unlock_code.bin" are located in. Get your phone connected via USB, and in fastboot mode, and use the following command:
Code:
fastboot flash cust-unlock unlock_code.bin
(Thanks to @lentm for posting this command)
After checking the output, to be sure it worked, use this command:
Code:
fastboot oem unlock
Follow the on-screen instructions on your phone to finish the bootloader unlock.

how to relock bootloader?

C:\adb>fastboot oem lock
FAILED (remote: 'Please flash unlock token first.')
fastboot: error: Command failed

C:\adb>fastboot flash cust-unlock unlock_code.bin
Sending 'cust-unlock' (0 KB) OKAY [ 0.006s]
Writing 'cust-unlock' FAILED (remote: 'Please turn on OEM unlocking in Settings - Developer option')
fastboot: error: Command failed

and OEM unlocking is disabled in settings-app
tried "pm uninstall --user 0 com.qualcomm.qti.remoteSimlockAuth" but no sucess ?

how to relock bootloader?
 
Last edited:

edale1

Senior Member
Sep 5, 2016
140
80
how to relock bootloader?
I do believe the only way to relock the bootloader, after it's been unlocked, is by using the MSMDownload tools to completely factory reset the device. This will only work for T-Mobile and MetroPCS devices.

MSMDownload Tools: https://forum.xda-developers.com/t/...l-to-restore-your-device-to-oxygenos.4324431/

This will 100% wipe your phone and reset everything, including relocking the bootloader (the same bootloader unlock token should allow you to unlock the bootloader again). I believe this will also SIM lock you again, if you've SIM unlocked your device.
 
  • Like
Reactions: GloriamSemper
OK, this process has been hell, but I'm gonna try and consolidate everything I've worked out so far in one place. This all applies only to the T-Mobile variant (ie. it comes preloaded with all the T-Mobile bloatware) of the N200 on the T-Mobile network; and a Windows PC, where a PC is used (though I imagine the Mac/Linux commands are quite similar). This is more to gather the info in one place than to provide step-by-step instructions.

SIM/NETWORK UNLOCK

Before you can unlock the bootloader, the N200 needs to be SIM unlocked. The option to Enable OEM Unlock won't even show up in the developers options until then. A temporary SIM unlock won't work, it needs to be a permanent SIM unlock.

If your N200 is the T-Mobile variant, you can get it SIM unlocked free here (be sure to read the first post thoroughly to be sure you qualify):
@mobbdeep had my SIM unlocked within 24 hours of sending him the required info.
You MUST have an active T-Mobile network (not Sprint or Metro) SIM card in the N200 for at least 3 full days before sending your SIM Unlock request in.

---
*edit-
An alternate is to use this debloat script:
Which should unlock the OEM Unlock option in the developer options.
This should work with non-T-Mobile variants of the N200 as well.
Thanks to @PopCaps1996 for pointing this option out.
---
*edit2-
Thanks to user @DeadDjembe we now know the specific command from the debloat script which enables OEM Unlocking.
Code:
adb shell pm uninstall --user 0 com.qualcomm.qti.uim
Running this ADB command on a stock T-Mobile variant N200 should enable the greyed-out Allow OEM Unlock option in the developers settings, without needing to run the full debloat script.
---

Once your N200 is SIM Unlocked, the Enable OEM Unlock option will show up in the developers options.

USB DRIVERS

You may need to use the Google USB Driver from Android Studio to allow your PC to recognize your phone when it's in fastboot mode.
Android Studio won't install the USB Drivers by default, you'll need to install them through the SDK Manager (Android Studio -> Projects -> More Actions -> SDK Manager -> SDK Tools -> Google USB Driver checkbox -> Apply)
You'll need to manually install the drivers through the device manager while the phone is in fastboot mode and connected to the PC (right-click -> Update Drivers -> Browse Computer -> Let Me Pick -> Have Disk).
The drivers should be located at:
C:\Users\[username]\AppData\Local\Android\Sdk\extras\google\usb_driver\android_winusb.inf
You'll want the 'Android Bootloader Interface' driver.

UNLOCK CODE/TOKEN

Once you can access your phone in fastboot mode, you can try:
'fastboot oem unlock'
But, you'll just get a message asking for an unlock token. Doesn't hurt to try, just in case, though.

What you need to do now, is type:
'fastboot oem get_unlock_code'
This will display both the phone's serial number, plus a 64 digit unlock code. (you might not be able to select the code to copy it, but a ctrl-a / ctrl-c should work, then just paste it in notepad)

Now, on your phone (still in fastboot mode) hit up/down on the volume buttons, until you see "Show Barcode", then tap the power button to select it.
This will bring up a barcode, as well as listing you devices IMEI number. (there are other ways to get the IMEI, but this is quick, and you're already right there)
Copy the IMEI down.

Now go to:
https://www.oneplus.com/unlock_token
You'll need to create an account.

In that form, you'll need to select the phone's model, and then enter the serial number, 64 digit unlock code (no spaces), the IMEI, and your email, as well as checking a box that you acknowledge that you void the warranty by bootloader unlocking the phone.

If all goes well, It should take about a week from submission for them to send you the unlock token.

------

I've just sent in my info an hour or two ago, and am now waiting for my unlock token.
I'll update this with what you need to do with the token once I've gotten mine and figure it out myself, lol.

------

Exactly 7 days (nearly to the minute) after sending the request in, I received the unlock code. So here's the update:

APPLYING THE UNLOCK CODE

You can use this URL to check the status of your Unlock Coed request:

Once your Status is listed as "Finished", there will be a download button at the lower right corner.

Download the "unlock_code.bin" file to your PC.

Place 'unlock_code.bin' in:
C:\Users\[user name]\AppData\Local\Android\Sdk\platform-tools\
Or where ever you have your fastboot.exe file.
If you don't know where it is, the command:
Code:
fastboot --version
will give your it's location.

Now in command line, navigate to the folder "fastboot.exe" and "unlock_code.bin" are located in. Get your phone connected via USB, and in fastboot mode, and use the following command:
Code:
fastboot flash cust-unlock unlock_code.bin
(Thanks to @lentm for posting this command)
After checking the output, to be sure it worked, use this command:
Code:
fastboot oem unlock
Follow the on-screen instructions on your phone to finish the bootloader unlock.
You are awesome! Thank you for your guide, it helped me 100% today after I received my bootloader unlock key from OnePlus (yep, exactly 7 days after requested).
 

HTCore

Senior Member
Dec 12, 2004
402
77
LA
Thank you so much for your thorough guide!
I just got my token today (exactly after 7 days!!)but in the meantime my phone is about to restart to update my phone to A12 (T-mobile variant). So at his stage, should I reboot directly fastboot and do the procedure to unlock the bootloader and restart? Or I can do it after updating my phone to A12?
 

Tyreethetruth

Member
Jul 30, 2017
32
3
Thank you so much for your thorough guide!
I just got my token today (exactly after 7 days!!)but in the meantime my phone is about to restart to update my phone to A12 (T-mobile variant). So at his stage, should I reboot directly fastboot and do the procedure to unlock the bootloader and restart? Or I can do it after updating my phone to A12?
Update first then unlock it
 
  • Like
Reactions: HTCore

PsYk0n4uT

Senior Member
Issue. I've got the n20 5g...... Used th debloat script and got oem unlock. Got the unlock code but can't request on the site due to serial number only having 7 digits.
Not sure what to do now. I gave tried searching these forums and apparently I'm not the only one who has had this issue but nobody has posted any updates whether they got it resolved or not
 

Mosher2000

New member
Nov 3, 2016
4
0
Dothan
Issue. I've got the n20 5g...... Used th debloat script and got oem unlock. Got the unlock code but can't request on the site due to serial number only having 7 digits.
Not sure what to do now. I gave tried searching these forums and apparently I'm not the only one who has had this issue but nobody has posted any updates whether they got it resolved or not
Yeah I've got the same problem I've tried customer support but no luck so far
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    OK, this process has been hell, but I'm gonna try and consolidate everything I've worked out so far in one place. This all applies only to the T-Mobile variant (ie. it comes preloaded with all the T-Mobile bloatware) of the N200 on the T-Mobile network; and a Windows PC, where a PC is used (though I imagine the Mac/Linux commands are quite similar). This is more to gather the info in one place than to provide step-by-step instructions.

    SIM/NETWORK UNLOCK

    Before you can unlock the bootloader, the N200 needs to be SIM unlocked. The option to Enable OEM Unlock won't even show up in the developers options until then. A temporary SIM unlock won't work, it needs to be a permanent SIM unlock.

    If your N200 is the T-Mobile variant, you can get it SIM unlocked free here (be sure to read the first post thoroughly to be sure you qualify):
    @mobbdeep had my SIM unlocked within 24 hours of sending him the required info.
    You MUST have an active T-Mobile network (not Sprint or Metro) SIM card in the N200 for at least 3 full days before sending your SIM Unlock request in.

    ---
    *edit-
    An alternate is to use this debloat script:
    Which should unlock the OEM Unlock option in the developer options.
    This should work with non-T-Mobile variants of the N200 as well.
    Thanks to @PopCaps1996 for pointing this option out.
    ---
    *edit2-
    Thanks to user @DeadDjembe we now know the specific command from the debloat script which enables OEM Unlocking.
    Code:
    adb shell pm uninstall --user 0 com.qualcomm.qti.uim
    Running this ADB command on a stock T-Mobile variant N200 should enable the greyed-out Allow OEM Unlock option in the developers settings, without needing to run the full debloat script.
    ---

    Once your N200 is SIM Unlocked, the Enable OEM Unlock option will show up in the developers options.

    USB DRIVERS

    You may need to use the Google USB Driver from Android Studio to allow your PC to recognize your phone when it's in fastboot mode.
    Android Studio won't install the USB Drivers by default, you'll need to install them through the SDK Manager (Android Studio -> Projects -> More Actions -> SDK Manager -> SDK Tools -> Google USB Driver checkbox -> Apply)
    You'll need to manually install the drivers through the device manager while the phone is in fastboot mode and connected to the PC (right-click -> Update Drivers -> Browse Computer -> Let Me Pick -> Have Disk).
    The drivers should be located at:
    C:\Users\[username]\AppData\Local\Android\Sdk\extras\google\usb_driver\android_winusb.inf
    You'll want the 'Android Bootloader Interface' driver.

    UNLOCK CODE/TOKEN

    Once you can access your phone in fastboot mode, you can try:
    'fastboot oem unlock'
    But, you'll just get a message asking for an unlock token. Doesn't hurt to try, just in case, though.

    What you need to do now, is type:
    'fastboot oem get_unlock_code'
    This will display both the phone's serial number, plus a 64 digit unlock code. (you might not be able to select the code to copy it, but a ctrl-a / ctrl-c should work, then just paste it in notepad)

    Now, on your phone (still in fastboot mode) hit up/down on the volume buttons, until you see "Show Barcode", then tap the power button to select it.
    This will bring up a barcode, as well as listing you devices IMEI number. (there are other ways to get the IMEI, but this is quick, and you're already right there)
    Copy the IMEI down.

    Now go to:
    https://www.oneplus.com/unlock_token
    You'll need to create an account.

    In that form, you'll need to select the phone's model, and then enter the serial number, 64 digit unlock code (no spaces), the IMEI, and your email, as well as checking a box that you acknowledge that you void the warranty by bootloader unlocking the phone.

    If all goes well, It should take about a week from submission for them to send you the unlock token.

    ------

    I've just sent in my info an hour or two ago, and am now waiting for my unlock token.
    I'll update this with what you need to do with the token once I've gotten mine and figure it out myself, lol.

    ------

    Exactly 7 days (nearly to the minute) after sending the request in, I received the unlock code. So here's the update:

    APPLYING THE UNLOCK CODE

    You can use this URL to check the status of your Unlock Coed request:

    Once your Status is listed as "Finished", there will be a download button at the lower right corner.

    Download the "unlock_code.bin" file to your PC.

    Place 'unlock_code.bin' in:
    C:\Users\[user name]\AppData\Local\Android\Sdk\platform-tools\
    Or where ever you have your fastboot.exe file.
    If you don't know where it is, the command:
    Code:
    fastboot --version
    will give your it's location.

    Now in command line, navigate to the folder "fastboot.exe" and "unlock_code.bin" are located in. Get your phone connected via USB, and in fastboot mode, and use the following command:
    Code:
    fastboot flash cust-unlock unlock_code.bin
    (Thanks to @lentm for posting this command)
    After checking the output, to be sure it worked, use this command:
    Code:
    fastboot oem unlock
    Follow the on-screen instructions on your phone to finish the bootloader unlock.
    3
    Yep. Is there a way to add it back if it fails?
    I'd imagine a factory restore (via booting to the recovery partition) would re-install that no problem. Also wipe your data, but that's gonna happen when you get to the bootloader unlock anyways.

    As to specifically reinstalling just that? I honestly have no clue how to go about that, I'm not knowledgeable enough about Android's inner workings to even guess. I rarely ADB for anything but the rooting process when I get a new phone. There's a reason I said this guide was more for collecting the info in one place than providing a step-by-step guide, lol. I'm just trying to help everyone else, considering I spent days digging up all the info to try and get my bootloader unlocked.
    2
    you do NOT need to carrier unlocked for bootloader unlock use this...... debloat script oneplus through ADB an once finished OEM UNLOCK will be ungrayed. then you can request a unlock token from oneplus then wait 7 days then flash an unlock bootloader.
    im still carrier locked
    2
    you do NOT need to carrier unlocked for bootloader unlock use this...... debloat script oneplus through ADB an once finished OEM UNLOCK will be ungrayed. then you can request a unlock token from oneplus then wait 7 days then flash an unlock bootloader.
    im still carrier locked
    OK, that's neat.

    I can't personally test it, as I'm already SIM unlocked; but all comments in the thread seem to indicate it working.

    It'd be quite interesting if someone could narrow down exactly which of the removed apps enables the OEM Unlock option (as an uninformed guess: adb shell pm uninstall --user 0 com.qualcomm.qti.remoteSimlockAuth).

    I'd need to research what all those different apps do, but at a glance I see at least 2 or 3 on that list I'd want to keep. At any rate, I'd rather wait until after I get TWRP Recovery on my phone (once we get a release for the N200) before debloating it, just to be safe. I'm far more knowledgeable about computers than phones, which gives me just enough knowledge to seriously screw up my phone by doing the wrong thing, lol.
    2
    Yes, but to my knowledge unlocking the bootloader is the only part of the entire process of installing a custom recovery and rooting that wipes the device. So it's best to get that out of the way ASAP, before the phone's loaded with stuff you don't want to lose.