• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Search This thread

ttar ttar

Member
Apr 6, 2020
17
1
Does any one know why I got an error message when I tried "fastboot flash cust-unlock unlock_code.bin"?? Need help. Thanks so much in advance!
(I did receive the email from Oneplus for the download link for the approval device unlocking application)


C:\Users\alank\Downloads\Adb\Root\platform-tools_r29.0.6-windows\platform-tools>fastboot flash cust-unlock unlock_code.bin
Sending 'cust-unlock' (0 KB) OKAY [ 0.008s]
Writing 'cust-unlock' FAILED (remote: 'Error - Verify Failed ! (-1)')
fastboot: error: Command failed


UPDATE: Never mind. Guess the first download has some issues. Re-downloading and it works now. Thanks!
C:\Users\alank\Downloads\Adb\Root\platform-tools_r29.0.6-windows\platform-tools>fastboot flash cust-unlock unlock_code(1).bin
Sending 'cust-unlock' (0 KB) OKAY [ 0.009s]
Writing 'cust-unlock' (bootloader) Device is unlocked.
OKAY [ 0.007s]
Finished. Total time: 0.026s
 

Attachments

  • 2021-08-21_16-28-26.jpg
    2021-08-21_16-28-26.jpg
    64.6 KB · Views: 19
Last edited:

AiM2LeaRn

Member
Aug 11, 2021
34
6
once in fastboot make sure your window drivers are working, i had to install them manually AGAIN using the .inf and selected "Android Bootloader Interface"



Capture.PNG
 

edale1

Senior Member
Sep 5, 2016
82
47
once in fastboot make sure your window drivers are working, i had to install them manually AGAIN using the .inf and selected "Android Bootloader Interface"
Erm, yes, I did point out the phone had to be connected and in fastboot mode when you manually installed the fastboot drivers... What exactly was your issue?
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.
The PC is gonna use one of several drivers for the phone, depending on what mode the phone is in. It uses different drivers in fastboot mode than it does in recovery mode, which are different from the drivers when it's running normally.
 

AiM2LeaRn

Member
Aug 11, 2021
34
6
Erm, yes, I did point out the phone had to be connected and in fastboot mode when you manually installed the fastboot drivers... What exactly was your issue?

The fact i had to load the drivers manually AGAIN (as in more than once).. normally windows doesnt forget the drivers once loaded. Just figured it might help someone that had similar issue.
 

edale1

Senior Member
Sep 5, 2016
82
47
The fact i had to load the drivers manually AGAIN (as in more than once).. normally windows doesnt forget the drivers once loaded. Just figured it might help someone that had similar issue.
That probably meant the phone wasn't in fastboot mode when you manually installed the drivers the first time. That, or your PC has more pressing issues than an odd driver reversion.
 

DeadDjembe

Member
Aug 26, 2018
13
1
Thank you for sharing! Very helpful. How did you end up figuring out that it was this specific uninstall out of all 50+ in the debloat script?

I figured it out by trial and error. I was tired of having to reinstall a keyboard every time I ran the debloat script. As the script was running, I repeatedly kept trying to OEM unlock the phone. When I was able to successfully, the script was still running so I noted which app the script was currently removing. I then worked backward manually from that app the next time I needed to restore and OEM unlock - I was lucky because the first package I tried allowed me to unlock!
 

elliwigy

Forum Moderator / Recognized Dev / Dev Relations
Staff member
XDA App Taskforce
I got a tmb n200 but unfortunately within 5min seemed to have bricked it already lmao.. didnt even put a sim in it yet haha.. i basically connected to wifi then selected dsu loader and it loaded but when i reset device it says it is corrupt and will not start lolol
 
  • Wow
Reactions: GOOGLE_USER

summersofar

Member
Sep 13, 2021
26
6
I got a tmb n200 but unfortunately within 5min seemed to have bricked it already lmao.. didnt even put a sim in it yet haha.. i basically connected to wifi then selected dsu loader and it loaded but when i reset device it says it is corrupt and will not start lolol
Yes, that is known to brick. If you did not OEM unlock before DSU your only two options are MSM tool (may not work) or warranty.

If you did OEM unlock you will need to go thru the process of bootloader unlock as described in that thread. Then you can fastbootd the images.
 
  • Like
Reactions: GOOGLE_USER

jilebi

Senior Member
Dec 22, 2011
97
23
I figured it out by trial and error. I was tired of having to reinstall a keyboard every time I ran the debloat script. As the script was running, I repeatedly kept trying to OEM unlock the phone. When I was able to successfully, the script was still running so I noted which app the script was currently removing. I then worked backward manually from that app the next time I needed to restore and OEM unlock - I was lucky because the first package I tried allowed me to unlock!

Very nice way to narrow it down. Nice job!

I agree adding the keyboard was a pain after the debloat script. Your work has helped others avoid that pain point.
 

jilebi

Senior Member
Dec 22, 2011
97
23
I got a tmb n200 but unfortunately within 5min seemed to have bricked it already lmao.. didnt even put a sim in it yet haha.. i basically connected to wifi then selected dsu loader and it loaded but when i reset device it says it is corrupt and will not start lolol
As @summersofar has correctly said above, DSU does not yet work with bootloader locked, which is why you got the brick. Fortunately, since you have the TMobile version, it can be easily fixed - just put the phone in EDL mode by pressing both Vol+ and Vol- at power up, and then use the MSMDownload tool for TMobile version that has been released, to unbrick it and restore to factory.
 

edale1

Senior Member
Sep 5, 2016
82
47
This thread has the MSMDownload Tools for the T-Mobile variant N200, as well as instructions as to its use:
 

elliwigy

Forum Moderator / Recognized Dev / Dev Relations
Staff member
XDA App Taskforce
As @summersofar has correctly said above, DSU does not yet work with bootloader locked, which is why you got the brick. Fortunately, since you have the TMobile version, it can be easily fixed - just put the phone in EDL mode by pressing both Vol+ and Vol- at power up, and then use the MSMDownload tool for TMobile version that has been released, to unbrick it and restore to factory.
i figured as much but thought what the hell.. i thought for some reason itd fail to load and would boot the other slot and continue to boot but apparently this was not the case lmao.. either way, sweet theres a msm tool to restore it.. i got phone into edl mode but didnt have any luck then i read this thread and now i will be good to go..

question, is there a thread talking about the unlock bin? anyone tried to figure out how they are created?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    I got a tmb n200 but unfortunately within 5min seemed to have bricked it already lmao.. didnt even put a sim in it yet haha.. i basically connected to wifi then selected dsu loader and it loaded but when i reset device it says it is corrupt and will not start lolol
    As @summersofar has correctly said above, DSU does not yet work with bootloader locked, which is why you got the brick. Fortunately, since you have the TMobile version, it can be easily fixed - just put the phone in EDL mode by pressing both Vol+ and Vol- at power up, and then use the MSMDownload tool for TMobile version that has been released, to unbrick it and restore to factory.
    2
    This thread has the MSMDownload Tools for the T-Mobile variant N200, as well as instructions as to its use:
    1
    So that one command, with no others needed, will remove the OEM Unlock restriction?

    Can someone verify?
    yes, correct. I've ran it numerous times now to re-enable OEM unlock after MSM restore. Trying to permanently edit init.rc and keep borking my phone :)
    1
    I got a tmb n200 but unfortunately within 5min seemed to have bricked it already lmao.. didnt even put a sim in it yet haha.. i basically connected to wifi then selected dsu loader and it loaded but when i reset device it says it is corrupt and will not start lolol
    Yes, that is known to brick. If you did not OEM unlock before DSU your only two options are MSM tool (may not work) or warranty.

    If you did OEM unlock you will need to go thru the process of bootloader unlock as described in that thread. Then you can fastbootd the images.
  • 8
    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.
    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
    This thread has the MSMDownload Tools for the T-Mobile variant N200, as well as instructions as to its use:
    2
    I got a tmb n200 but unfortunately within 5min seemed to have bricked it already lmao.. didnt even put a sim in it yet haha.. i basically connected to wifi then selected dsu loader and it loaded but when i reset device it says it is corrupt and will not start lolol
    As @summersofar has correctly said above, DSU does not yet work with bootloader locked, which is why you got the brick. Fortunately, since you have the TMobile version, it can be easily fixed - just put the phone in EDL mode by pressing both Vol+ and Vol- at power up, and then use the MSMDownload tool for TMobile version that has been released, to unbrick it and restore to factory.
    2
    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.