I finally got my cursed purchase of a cheap OnePlus N100 from Amazon to boot Ubuntu Touch, and I wanted to share the process I needed to go through to get it to work so that others might have faster success where it took me ages.
I bought this phone from Amazon thinking N100 is well supported by Ubuntu Touch so it was a safe bet. Little did I know, the Metro version is a cursed bastard of a phone and by "Unlocked" they mean carrier unlocked so you can activate on other carriers, but the bootloaders on these damn things are locked and unlocking them is cursed. The boot loader was still locked and the "OEM Unlock" option was greyed out. It had MetroPCS unlocking software on it, but that unlocking software just threw an error when I tried to run it and would not function. I tried updating the OS a few times.. nothing. I tried downgrading and nothing. I tried my real phone's sim card to get it mobile data access, but nothing. I tried getting support from the Metro people a few times but they were ultimately useless. By the time I had given up on them, my return window was closed so I was on my own.
Phase 1: Unlocking the Bootloader (Possibly optional):
I tried the oneplus/t-mobile unlock site
https://www.oneplus.com/us/unlock_token but it responded with
"IMEI number has been applied, please check your application records."
which apparently means that someone else generated an unlock code already but since it wasn't me I didn't have it and couldn't get it. I ended up engaging OnePlus support through their "Send us an Email" form on their web site and they came through for me.
https://oneplus.custhelp.com/app/ask?&country=us
I had to give them the serial number, imei number and pcba number, and I included the output of "fastboot oem get_unlock_data". Within a few hours I had an unlock code. Lets go OnePlus! Nice job!
Through this whole ordeal, I had been reflashing to OnePlus_Nord_N100_Metro-by-T-Mobile_OxygenOS_10.5.8 using EDL mode to see if I could OEM Unlock from a fresh state, but it wouldn't work. I tried updating to the latest OS and it still wouldn't work. Once I got the unlock code in email and unlocked using "fastboot flash unlock <filename.bin>" I booted up and finally got the OEM Unlocking option to be not greyed out and rebooted into fastboot mode and disabled the bootloader lock "fastboot oem unlock" which factory reset, booted up went through the startup questions again, enabled adb and started the UBports Installer and SUCCESS! Except no.
After this, I could get to the UBports fastboot/recovery program, but the machine would not boot. It simply stayed at the "this device is unlocked and can't be trusted" google message and never went past that. As it turns out, I may have been moments from having a working install at this point but I didn't know what to do so there were many many more hours of work ahead of me. I assumed that my problem was that I was running Metro firmware with OxygenOS 10.5.8, not one of the two supported firmwares (Global 10.5.3 or EU 10.5.2) Onward to phase 2.
Crossflashing to other firmwares:
For those who don't know, if you hold down both volume buttons at boot and go into EDM mode for 10 seconds where you can run the MSMDownloadTool and push a very complete set of ROM data to the phone. You can find various versions of this to unbrick OnePlus phones this way but the N100 has (at least) 3 versions of the phone which won't install each other's firmware. Each phone has a project code associated with it and the MDM tool will only flash firmware that matches that project code. The MetroPCS phone's code is 20880. The uk model is 20883. The Global model is 20881. The interesting thing is there is python software (oppo_decrypt) out there that lets you extract the firmware bundle in the .ops file, change the settings.xml and generate a new .ops file with the same firmware but with different project codes. You can get MSMDownloadTool to upload a different model's firmware to a BE2015 Metro N100 by extracting that phone's .ops file and then changing these settings in the settings.xml to match this phone:
Project="20880"
Version="bengal_14_O.04_201221"
ModelVerifyPrjName="6ccf5913"
ModelVerifyRandom="0S5ul8diroerEa2h"
ModelVerifyHashToken="61D90BD1E63098DEF7424C5FF14EBF097AE1802709F585F05670B2B7B02B31E7"
I'm not sure if all of them need to be changed, but those are the only changes I made and the new .ops file worked. I changed the settings.xml, ran "python3 oppo_decrypt\opscrypto.py encrypt <directory>" and it generated a new .ops file based on the contents of the extract folder and poof! I had a MSM download tool that would crossflash my stupid cursed Metro N100 to be a normal N100. Unfortunately, this didn't solve my problem at all. Interestingly though, this may have let me unlock the firmware without talking to OnePlus support, since the non-metro firmwares don't have the same OEM unlocking restriction. I'm unfamiliar with all the details of how that bootloader unlocking works though so I don't know, I may have still needed to get a .bin file from OnePlus. This may have been a complete waste of time, but I'm putting it here since I find it interesting that it was even possible and it was part of my process for getting to the end.
As I said though, it didn't work. I ran through the same process of enabling oem unlocking, unlocking the bootloader which kicked off a factory reset, enabling adb again, and running through the UBports installer, getting SUCCESS, but no I was stuck at the same place where it would boot and hang. I could get into the UBPorts fastboot/recovery tool and I could enable adb, open an adb shell and mount the /system partition and I messed around on the command line and found out the data partition was completely empty. This is where the real OS is supposed to live but nothing was there. After some AFK time thinking I realized that it might just be something dumb like a partition size mismatch and I re-ran the UBPorts installer with the phone in the UBPorts fastboot mode and unselected the option to redo partitioning. IT WORKED! I get the cool UBPorts robot telling me it's installing updates and my new Ubuntu Touch device was soon up and running.
Now.. I suspect I could have done that about 2 days of work earlier when I first got the UBports recovery installed, but I can't go back in time to know. I'm documenting all of this just in case it helps someone else on their journey though this messed up process of cracking these things open and making them do what we want.