Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add OnePlusN200TMO support #395

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

SirRGB
Copy link
Contributor

@SirRGB SirRGB commented Dec 18, 2023

* fixes openandroidinstaller-dev#320

Signed-off-by: SirRGB <sirrgb@proton.me>
@SirRGB
Copy link
Contributor Author

SirRGB commented Dec 18, 2023

The guide also includes the fastboot oem unlock btw, so we can either rely on the user and not run the oem unlock command in oai or we automate the process as much as we can.

adb shell pm uninstall --user 0 com.qualcomm.qti.uim

fastboot oem get_unlock_code

get imei
https://stackoverflow.com/questions/71790363/how-to-obtain-imei-via-adb

(requires account/user interaction, so we cant automate that, ~1w wait time)
https://www.oneplus.com/unlock_token

fastboot flash cust-unlock unlock_code.bin

All of this isnt implemented yet.

@SirRGB SirRGB mentioned this pull request Dec 20, 2023
2 tasks
@tsterbak
Copy link
Member

Great you found that! :)

Getting unlock codes in implemented (even with frontend) for Sony and some Motorola devices.
Here it seems a bit more involved...
What exact steps would need to be implemented to make it as smooth as possible for the user? Do you think it can reasonably be done?

@MagicLike MagicLike added enhancement New feature or request device Request to add or improve a specific device. labels Dec 21, 2023
@sounddrill31
Copy link

Great you found that! :)

Getting unlock codes in implemented (even with frontend) for Sony and some Motorola devices. Here it seems a bit more involved... What exact steps would need to be implemented to make it as smooth as possible for the user? Do you think it can reasonably be done?

(Actual users would hate this but it might work if we pull it off well)

What if we embed a web browser in the program to handle this?

@SirRGB
Copy link
Contributor Author

SirRGB commented Dec 27, 2023

https://xdaforums.com/t/the-quest-for-a-bootloader-unlock-partial-guide-t-mobile-variant-may-work-for-metropcs-metro-variant.4313525/

We can uninstall the app automatically as I said.

adb shell pm uninstall --user 0 com.qualcomm.qti.uim

Then the device has to reboot into bootloader mode. We receive the unlock code, imei and serial number in the following commands, which should be parsed and temporarily saved (I think these commands are universal, but I only tested on my Moto G5).

fastboot oem get_unlock_code

fastboot getvar imei

fastboot getvar serialno

After that we should output all of these cleanly, so that the user can create an account here.

https://www.oneplus.com/unlock_token

We cant speed up the unlock process, which takes ~7d and we cant expect the user to keep this app opened for that time, so we might have to implement the same procedure as the bootloader unlock/custom recovery checkboxes to skip forward. The progress of the unlock code generation can be checked here and you can download the unlock_code.bin once finished.

https://www.oneplus.com/unlock_token?type=2

Lastly we can flash cust-unlock and start normal unlocking and flashing procedure after that. We should ask for the file path of unlock_code.bin to automate that.

fastboot flash cust-unlock $somePath/unlock_code.bin

Using this procedure the user has to input the required info to create the account (which will be described in the app), download the unlock_code.bin, select the file and then just go through the normal process.
I think you noticed that I didnt contribute actual code yet, since Im not into python, but Im planning to learn. For now I need some help to implement that ig...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
device Request to add or improve a specific device. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants