yashsingh1/xdaforums huggingface dataset:
[OnePlus Nord N200 5G] EnumC:
I built the twrp image on stock firmware. If you can, please provide the twrp recovery log and logcat using the instructions below after attempting to mount the partitions:

To pull twrp.log, run `adb pull /tmp/recovery.log`

You may also try `adb pull /data/recovery/recovery.log`.

To pull logcat, run `adb logcat -d > logcat.txt`

All displayed mounting points can be mounted on my end. You can also check this by running df -h in shell.

You may find a list of working and non-working features in the OP. If you need to access internal data, you must flash a forcedecrypt zip that you can find elsewhere on the xda forum since decryption is not currently working for build 0.2.0.

You can also find the sources used to build the image if you would like to fork the build yourself, create a PR, or you may also start from a different device tree.
[OnePlus Nord N200 5G] DLBtapS:
I think I am on "A". I will try that. Here are my commands so far. please feel free to add your comments/concerns.

Thank You for the input, more to follow.
[OnePlus Nord N200 5G] DLBtapS:
**Unlock bootLoader**

adb devices Make sure connect "device"

adb reboot bootloader

fastboot devices Make Sure connected

fastboot oem unlock Unlock

**Root**

Put into fastboot

adb devices Make sure connect

adb reboot bootloader

fastboot boot twrp-3.5.2-11-2-dre8t.img

fastboot getvar current-slot

fastboot flash boot_a twrp-3.5.2-11-2-dre8t.img

manual set "recovery mode"

Navigate to root

Select /sdcard-1

Install Magisk-v23.0
[OnePlus Nord N200 5G] EnumC:
Most of your questions are already answered in the OP and my previous replies. Please let me know if that helped answer your question.
[OnePlus Nord N200 5G] mthous01:
I'm wondering if I can get the kernel to build, we could possibly disable dm-verity. Would that help?
[OnePlus Nord N200 5G] EnumC:
You would have to disable both dm-verity and forceencrypt. I haven't tested any scripts on my end, but scripts such as this one should do the trick. If you build the kernel with dm-verity disabled, then you just have to edit the fstab to disable forceencrypt.
[OnePlus Nord N200 5G] DLBtapS:
Before I tried to reboot into the B partition, I installed the magisk apk and selected "complete install" now I am rooted. Thanks a bunch for all the support!
[OnePlus Nord N200 5G] Winnower Amber:
Open magisk, then allow it to set itself up.
[OnePlus Nord N200 5G] Winnower Amber:
So essentially what You mean is that, I am able to flash stock boot.img (recovery) within twrp and avoid all the stuff that has to specifically do with msm tools my device back to factory?
[OnePlus Nord N200 5G] T3CHN0T33N:
Flashed the recovery and it became un-rooted (not too surprising) but more importantly, the recovery could not touch anything. (encrypted) I tried to find a forceencrypt disabler, but to use them I need to sideload it after decryption. And since the recovery could not decrypt anything, I'm kinda stuck...
[OnePlus Nord N200 5G] Link575:
I mean he has stated that it can be used to flash things and that it can't wipe. If it can't wipe you can only "dirty" flash things not actually restore anything back to factory settings.
[OnePlus Nord N200 5G] T3CHN0T33N:
I know, this is why I see no way to sideload via TWRP...
[OnePlus Nord N200 5G] Link575:
Well you can still flash things, Magisk, magisk modules. You just can't reverse anything. Still works fine for half the job.
[OnePlus Nord N200 5G] mingkee:
Can you wipe in fastbootd?
[OnePlus Nord N200 5G] Link575:
That I do not know. I do know that I tried to Factory reset through the settings menu and that just rebooted the phone for me. I had to use the MSMtool to start from scratch.
[OnePlus Nord N200 5G] mingkee:
In fastbootd, use it

fastboot -w
[OnePlus Nord N200 5G] mr_reaper:
found this dont know if its helpful

fastboot boot twrp.img

Open a terminal (on a computer) and type adb shell

your window should have only a ~#

Type this command in

HTML:

dd if=**boot.img path** of=/sdcard/boot.img

Replace the **boot.img path** with whatever path you found your boot.img in when locating it

This should pull the boot.img to your /sdcard (storage) directory

To transfer to computer, just use your favorite file transfer method!
[OnePlus Nord N200 5G] mr_reaper:
Also found this on em verity and encryption, haven't tried it tho

Since Magisk app v8.0.0 the advanced settings/install options for dm-verity and forced encryption won't be available on most modern devices (see Advanced Settings/Install Options for details). The tools are still there and may be accessed through various means.

Keeping dm-verity and forced encryption:

If your device supports it, the app will auto-detect if your device is encrypted and if it’s recommended to keep dm-verity enabled and the “Preserve forced encryption” and “Preserve dm-verity” will then be enabled by default. If these options aren’t enabled, you can keep dm-verity and forced encryption by checking the options for this before installing a new version of Magisk through the app.

If you install through recovery (either for the first time or as an update) run one or both of the following commands in a terminal emulator or in your recovery's terminal before installing:

echo KEEPVERITY=true>>/cache/.magisk

echo KEEPFORCEENCRYPT=true>>/cache/.magisk

If you can't access /data (TWRP can't decrypt, etc) you can instead use either /data/.magisk or/system/.magisk, but please note that using /system/.magisk isn't systemless.

Some devices need to keep dm-verity enabled to work properly. One example is some Huawei devices that might otherwise experience weird behaviour or bootloops.

Disabling dm-verity and forced encryption:

If you on the other hand want to disable either dm-verity or forced encryption, you can go about it the same way as described above. If you're using the .magisk file method, just change KEEPVERITY and/or KEEPFORCEENCRYPT in the commands to false:

echo KEEPVERITY=false>>/data/.magisk

echo KEEPFORCEENCRYPT=false>>/data/.magisk

If you can't access /data (TWRP can't decrypt, etc) you can instead use either /cache/.magisk or/system/.magisk, but please note that using /system/.magisk isn't systemless.

If disabling verity through Magisk doesn't help, you can try the following command (provided that your device has a vbmeta.img):

fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
[OnePlus Nord N200 5G] Jaybone073:
I would like to know a way to do this, too. Can you push the full OTA zip to revert back to stock?
[OnePlus Nord N200 5G] Winnower Amber:
So this is the official way to decrypt the partition
[OnePlus Nord N200 5G] kdm6389:
Does this work on "OnePlus Nord N200 5G by Metro"? My boot loader is unlocked. But SIM is locked.
[OnePlus Nord N200 5G] Travisholt92:
Ayee soo I'm working on fixing up your twrp. Can you inform me how you linked the kernel modules into the build? I got it "booting" (stays at bootloader is unlocked and can't be trusted screen but with adb recovery commands working. I found a big reason you couldn't get decryption working. Wrong sysfs location listed in the fstab. I'll send a pull request 😎 also most of your "inclusion of fbe" is already included in device/qcom/twrp-common 👍
[OnePlus Nord N200 5G] Travisholt92:
I have an updated kernel image from the T-Mobile variant that I'm looking to make available to everybody but I could definitely use a tad bit of guidance if possible
[OnePlus Nord N200 5G] AiM2LeaRn:
anyone have any idea how to restore the stock recovery for the tmobile version?
[OnePlus Nord N200 5G] atsalchenberg:
Reflash the original boot-b image in regular fastboot
[OnePlus Nord N200 5G] 78t140@broadstripe.net:
Worked like a charm 😂
[OnePlus Nord N200 5G] edale1:
Is this still being worked on? What exactly still needs to be figured out to get TWRP fully functional?
[OnePlus Nord N200 5G] AiM2LeaRn:
to be honest with you i notice most of the more recent one plus 8 devices use some kind of custom recovery (non-twrp) and the roms are sideloaded via adb or fastboot. TWRP still has some nice features though, i like the simplicity of EDL/Fast boot that EnumC integrated.
[OnePlus Nord N200 5G] Travisholt92:
yes it is, i just got decryption of userdata working :) then fixed touchscreen on screen off, then fixed mtp/adb functionality on boot, fixed fastbootd, fixed flashing stock OTAs, tested flashing a stock OTA (from internal storage) and it worked with no issues. no red error messages at all. Only thing i have left to fix (before i apply for Official) is to fix booting the OS when building from source. THAT IS IT!. I will have a thread up soon with the usable (fastboot boot twrp.img ONLY, no fastboot flash boot, your device wont be able to boot any OS). but it at least can flash zip files, use SD card, use USB OTG.
[OnePlus Nord N200 5G] Travisholt92:
And I can now boot the ROM. I'll have an updated TWRP thread posted later today, after thorough testing I will apply for official maintainer.

I will start work on LineageOS soon now that TWRP is nearly polished.

On a not so high note, my home internet just got disconnected a few hours ago due to a missed payment (T-Mobile at Home).

This is going to significantly hinder my ability to continue with bringup as I haven't had an active SIM card in months and my main source of internet connectivity just got axed until my tax refund rolls in.

Yaaaaaay. 😮‍💨
[OnePlus Nord N200 5G] Travisholt92:
N200 - Google Drive

drive.google.com

These builds have an issue with being able to charge while in recovery (battery stats are not updated in recovery), and when the device dies, it will only charge via EDL mode) I do not recommend using these builds at this time for that reason. For temporary usage just to achieve a specific task and restore the previous boot image afterwards would be fine. If you need magisk, you need to use the magisk app to modify your stock boot image, and disable verity and verification (fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img) which requires having the stock vbmeta.img

Here are my latest TWRP and OrangeFox recovery builds for N200.

DO NOT FASTBOOT FLASH THESE

You'll have a bad experience and probably won't be able to boot back into your stock ROM until you switch back to a proper boot.img.

Fastboot boot the image then go to advanced settings and "install this TWRP/OrangeFox" (depending on which you're on)

I'm running 11.0.5.0.DE17AA N/A firmware (on my T-Mobile branded variant)

You must remove your lockscreen security (you can re-enable it when you're done in twrp).

If you don't remove your password,pin,pattern,fingerprint you're not going to be able to access your data within recovery.

I'll upload my device tree later today and get threads made.

For me, I can daily driver this to achieve anything I need custom recovery.

The build flags I set should support metro, T-Mobile, and unbranded/NA variant.

I have flashed the latest NA build from the OnePlus website with this project and it switched me from slot A to slot B in the process without an issue

If you encounter issues (aside from decryption because your have a password set), I'll do my best to resolve them
[OnePlus Nord N200 5G] Travisholt92:
Decryption does work with Android 12 (including GSI) this is NOT a device specific bug. You may be able to find a flashable patch to disable force encryption to allow you to mount userdata in recovery
[OnePlus Nord N200 5G] Link575:
Hey I'm having issues getting your TWRP to flash. I'm fastboot booting it but despite picking the TWRP version it shows up as OrangeFox and there's not advanced settings. Any idea what I'm doing wrong?

Edit: NVM I see now install this.... but it seems the TWRP is OrangeFox.
[OnePlus Nord N200 5G] Travisholt92:
Hey I'm having issues getting your TWRP to flash. I'm fastboot booting it but despite picking the TWRP version it shows up as OrangeFox and there's not advanced settings. Any idea what I'm doing wrong?

Yeah I had a derp. I'll get that fixed
[OnePlus Nord N200 5G] Link575:
Np and thanks for your work. Curious, will we be able to wipe the phone so no more dirty flashing? Or it's just for flashing only.
[OnePlus Nord N200 5G] Travisholt92:
I'm not sure I haven't tested a factory reset with it yet to be honest
[OnePlus Nord N200 5G] Link575:
Alright guess I'll try it out when it's up then. For now I went with your OrangeFox build which is working great. Thanks
[OnePlus Nord N200 5G] Travisholt92:
┤Mod Edit├┤Quote removed as post was removed├

you can look at my GitHub trees here:

GitHub - Travisholt92/twrp_n200

Contribute to Travisholt92/twrp_n200 development by creating an account on GitHub.

github.com

You're right I totally copy and pasted EnumC's work without working decryption and when I compiled it decryption magically worked. That user messed up by wiping the Super partition partition within TWRP. Because of this I will be disabling the ability to wipe the super partition and probably more.

Stick to your GSI's while I do ACTUAL dev work.
[OnePlus Nord N200 5G] Travisholt92:
┤Mod Edit├┤Quote removed as post was removed├

It's all stolen yupp. Dude look at the commit history. That was ME. NOT stolen in any way 🤣 even the tree I initially forked was a super generic base that I had to add device specifics to. That gpt-utils didn't shim itself for our specific device 😂🤣

Just to show you how much I "copied" (not quite sure who I could have copied from, other devices? CAF?) I'm going to successfully bring up TWRP on the N100 too.

Am I supposed to disable the terminal to prevent people from bricking their phones?

Don't blame my software out of spite of me. That's just petty. That guy could have broken any phone that way in ANY TWRP not just mine.

Commits · Travisholt92/android_device_oneplus_sm4350-common

Contribute to Travisholt92/android_device_oneplus_sm4350-common development by creating an account on GitHub.

github.com

(This isn't fully up to date with my local changes yet)

I bet this work is all stolen too. I'm nearly at the point of being able to compile full custom ROMs for this specific device with a CAF based kernel I'm bringing up myself.

GitHub - Travisholt92/android_kernel_oneplus_sm4350

Contribute to Travisholt92/android_kernel_oneplus_sm4350 development by creating an account on GitHub.

github.com

I'll let my software speak for itself, I reaaaaaaaally don't need to defend it like this 😂
[OnePlus Nord N200 5G] Travisholt92:
┤Mod Edit├┤Quote removed as post was removed├

Look at the commit history yourself before you make such accusations. Download his device tree and my device tree, run a diff script or use meld to see just how much difference there is between my tree and his. It's quite a bit more than you're making it out to be 😂🤣 I HAD used one of EnumC's prebuilt TWRPs and shimmed some files within it as a proof of concept before implementing those changes and many more into a new build tree. And I wouldn't have needed EnumC's previous TWRP work to make it happen. And with my lineageOS bringup, who am I stealing that from? Can you tell me who else is working on lineageOS for the n200? Because the dev group for the N200 all seems to be waiting for me to finish bringup 🤷 So please show me who I'm stealing all of this work from so I can give credit where credit is due. I know EnumC is going to get a shout-out in all of my n200 ROM/recovery threads.
[OnePlus Nord N200 5G] -Enkidu-:
This is great work, thanks for all of it so far
[OnePlus Nord N200 5G] Travisholt92:
I got lineageOS to compile, lineageOS recovery seems to be working properly touch and all. It doesn't boot but does give a decent logcat and dmesg (kernel log) on the very first build. Have a few theories I need to test. Had that bit of success and immediately took a 2 day break 😂
[OnePlus Nord N200 5G] T3CHN0T33N:
So, just to clarify: As long as I either A) disable my pin/password or B) disable force-encrypt I will be able to access everything from recovery?
[OnePlus Nord N200 5G] Travisholt92:
You forgot C) not running Android 12 (including GSI). This is common across all devices for now though. But yeah full data partition including internal storage, no factory reset before hand required for it to work. Unless you haven't unlocked your bootloader yet of course. Unlocking the bootloader wipes data
[OnePlus Nord N200 5G] T3CHN0T33N:
can you please clarify?
[OnePlus Nord N200 5G] Travisholt92:
It doesn't work on GSI, it will work on custom ROMs when we get them booting though. Just not Android 12 for whatever reason 🤷
[OnePlus Nord N200 5G] T3CHN0T33N:
and the stock os is android 12, yes? also, would you happen to know where I can find a way to disable force-encrypt?
[OnePlus Nord N200 5G] Travisholt92:
Stock on N200 is Android 11

And it's complicated. Doable but complicated. I started at one point and abandoned ship 🤣 you would also have to disable avb and force encryption from multiple different partitions. It's doable but time consuming.
[OnePlus Nord N200 5G] T3CHN0T33N:
Ah, ok. So as long as I have my pin/password disabled before booting into recovery, I should be fine and can re-enable my pin when not using recovery
[OnePlus Nord N200 5G] drfsupercenter:
Awesome, I got it working and was able to install it from the "advanced" menu

One issue, however. As the on-screen logs pointed out, the phone was un-rooted when installing TWRP. It said it put the flash-file in /tmp, but I could not find it there when I opened the file manager. And when I flashed my original Magisk Patched boot .img, it erased TWRP.

How do I get an .img file that has TWRP in it, that I can give to Magisk to patch with the root-boot code?
[OnePlus Nord N200 5G] Travisholt92:
It's

This is correct. At least for now. I found a script in stock that backs up the decryption key, pins, patterns, and passwords. If it is triggered automatically by the system and doesn't require a manual trigger, decryption should be much easier to set up with better compatibility. But it's just a theory at the moment. Haven't looked into a way of implementation
[OnePlus Nord N200 5G] Travisholt92:
You install the magisk file (.apk) in twrp and you get root
[OnePlus Nord N200 5G] drfsupercenter:
Ah, thanks. But now I'm noticing this weird thing where instead of popping up a prompt to allow root, it just...opens the Magisk app any time an app requests root. I even tried setting it to auto-approve, and still nope, it just opens the app instead.

And also, do you know if it's possible to mount the partitions as read/write? I wanted to delete some bloatware that's in /product but it was mounted read-only by TWRP.
[OnePlus Nord N200 5G] Travisholt92:
Yeaaa I don't have that issue. It pops up as a prompt for me on 24.1. And I don't have an answer for that one
[OnePlus Nord N200 5G] drfsupercenter:
I figured it out, if I try to hide Magisk by repackaging it, it behaves like that. It shouldn't, and it doesn't on my other phone, but hey whatever.

I thought TWRP had access to the whole filesystem? I remember asking how to get R/W access to system folders in an app like Root Explorer, and people said "you have to make a Magisk patch that gives you R/W access", without telling me how to do such a thing. Since TWRP is loading before the OS boots, I thought it would get more access.
[OnePlus Nord N200 5G] Travisholt92:
┤Mod Edit├┤Quote removed├

Do not share my broken builds.

There is a high priority bug with charging from 0% (and charging in recovery) that needs to be addressed before I promote it here again on XDA.

And it's definitely not stolen, the broken builds were made from trees for a moto device that I brought up from information obtained from the latest stock dump that I extracted and staged myself/fastboot commands/adb getprop and a few bits pulled from OnePlus 9 Pro after talking with the 9 Pro TWRP developer (Nebrassy) asking what he would suggest, and he suggested forking his entire tree as a base, which I also did not do for TWRP bringup.

There are sooo many boardconfig flags alone that are set properly in my tree that weren't event touched or present in EnumC's TWRP because he used a script to generate his base for TWRP. I tried the script and didn't like how minimal information was output, so I went the route suggested by ArtiicPanda to fork his personal Moto TWRP tree which is for a device on the same chipset, and use it for a base, upon analysis of the source I deemed this to be the cleanest base that I could use. I then stripped Motorola OEM specific code, substituted with alternatives for either CAF (Qualcomm) source for our specific chipset's CAF tag, or from the OnePlus 9/Pro modified as much as necessary to be meant specifically for N200.

I really shouldn't have to explain my development process to prove myself against these claims that you know damn well to be false. I'm very open about my development process, secrets when it comes to these projects has an overall negative impact on the community and slows progress for everyone.

I keep linking my GitHub in response because I have alot of commit history on there. Albeit quite noobish commit history as I'm not the best with using Git, but I put my time into doing all of this crap not just for myself but in hopes that it gives other people a better user experience with their own devices. Just to have people such as yourself claiming "he steals work" because you don't know how to click a link a look at a few commits yourself?

Just stop man. You're not doing anyone any favors by trying your absolute hardest to push away one of the two ROM developers on a device that has no custom ROM support aside from GSI.
[OnePlus Nord N200 5G] T3CHN0T33N:
Hey Travisholt92, you may want to start a new thread, since (from what I can tell) you are porting from scratch (basically).

Also, do you have a dedicated progress tracker or should I just keep tabs on your GitHub?
[OnePlus Nord N200 5G] Travisholt92:
I've gone ghost until my laptop is sold and I order a few desktop parts so I can compile faster. TWRP is on life support in general and I don't feel comfortable wasting the time on it at this point. But custom ROMs will be coming soon. There are already custom builds of Evervolv created by another dev for this N200, he just hasn't released anything yet.
[OnePlus Nord N200 5G] T3CHN0T33N:
No problem👍

You are spending your own free time to make something without reimbursement after all.

Do know, I appreciate your contributions to this community, the time and effort you put into it too :)
[OnePlus Nord N200 5G] Link575:
If you don't mind me asking, why do you say that TWRP is on life support? Do you mean TWRP as a whole, and if so what would you suggest instead? I feel like that's the only thing I've ever seen suggested besides the build of FOX you included.
[OnePlus Nord N200 5G] Travisholt92:
The core development of TWRP and OrangeFox, SHRP, is maintained by only 2 or 3 core devs and they are struggling to keep up with the complex changes of each new android update
[OnePlus Nord N200 5G] Link575:
Oh interesting, thanks for the info.
[OnePlus Nord N200 5G] famewolf:
Just thought I'd mention that twrp for many models now can decrypt android 12 rom's....not sure if that version is available for n200 yet.
[OnePlus Nord N200 5G] EnumC:
@Travisholt92, great work! Yep, as you said, I used a common TWRP generation script for the base, then modified the boardconfig flags for this device. I was expecting to use this as a temporary build until a more experienced dev publishes their build, but it appears that never came to fruition. If you would like to publish a more stable build, I would be happy to link the original post to your thread or your build. If there's anything I can do to help, just let me know.
[OnePlus Nord N200 5G] Travisholt92:
It's awesome to see you around again! 🙂

I have been working on trying to better optimize my server for compile speeds before attempting android 12 TWRP bring-up and updating the android 11 TWRP to support newer OTA versions. Stuff on the to do list but things have been hectic around here with a newborn baby and 2 other children. I haven't been able to find the time to set up my server to compile.
[OnePlus Nord N200 5G] MiniNinja2024:
you could do $adb push (FILE) /sdcard or /tmp
[OnePlus Nord N200 5G] vipermark7:
Works like a dream! Thanks a ton :)