Development [TWRP][3.5.2-11][dre8t][WIP] Unofficial TWRP for OnePlus Nord N200 5G

Search This thread
Sep 17, 2021
37
2
OnePlus Nord N200 5G
Can you please provide the twrp.log and a full logcat while still in twrp after attempting to flash the zip?

To pull twrp.log, run `adb pull /tmp/recovery.log`
To pull logcat, run `adb logcat -d > logcat.txt`
Is there a way to flash stock recovery back?

I had to msm tools my device back to stock because I didn't know what image belonged to recovery
 
Last edited by a moderator:
Sep 17, 2021
37
2
OnePlus Nord N200 5G
You telling me boot.img is recovery

How do I flash the boot img If fastboot isn't recognized on ln recovery mode

Aka twrp

What do you mean by a/b partition devices, what command do I run again?
 

edale1

Senior Member
Sep 5, 2016
127
69
You know.... most forums severely frown upon double posting, Let alone quadruple posting...

Might I suggest simply editing the new line into your previous post the next time you have something else to say 30 seconds after posting something.
 

DLBtapS

Member
Oct 13, 2021
11
1
@EnumC
1I tried 0.2.0 but my storage is weird.
1) I did not see internal storage.
2) SD card (0mb)

I am still able to boot into the system with no issue. Not sure if this is the issue for TWRP?
And I tried to reboot to the recovery. It says no OS installed? why?

MOUNT: "sdcard1" is checked.
but System is not checked. I manually checked it and rebooted. But when I go back in, SYSTEM is still unchecked.

And Recovery will be FROZEN once a while. Need to use Hard reboot to get out of Recovery mode.

Anything I did wrong? (was trying to flash Magisk from SD card).


Please advise. Thanks!
I am having the same issue. No /sdcard-1 mounting option, just sdcard 1. I have tried pushing to /sdcard but cannot flash (no such file or directory) Any help would be appreciated.
 

EnumC

Senior Member
Dec 22, 2014
125
75
Cupertino
enumc.com
TCL 10 5G
OnePlus 8T
I am having the same issue. No /sdcard-1 mounting option, just sdcard 1. I have tried pushing to /sdcard but cannot flash (no such file or directory) Any help would be appreciated.
I think the confusion here is that you're mixing up the mount path with the UI option in "Mount". You mount "sdcard 1" in the Mount menu, then the mounting point for your sdcard will be /sdcard-1, not /sdcard. Therefore, after mounting sdcard 1 in mount options, you can access your files on the first partition of your sd card under the /sdcard-1 directory. Does that help?
 

DLBtapS

Member
Oct 13, 2021
11
1
Are you encountering any issues, besides the features listed under "What doesn't work"?
I think the confusion here is that you're mixing up the mount path with the UI option in "Mount". You mount "sdcard 1" in the Mount menu, then the mounting point for your sdcard will be /sdcard-1, not /sdcard. Therefore, after mounting sdcard 1 in mount options, you can access your files on the first partition of your sd card under the /sdcard-1 directory. Does that help?
Agree, I am confused :) sdcard 1 is checked in mount options but shows 0MB. How or where do I see this /sdcard-1?
 

EnumC

Senior Member
Dec 22, 2014
125
75
Cupertino
enumc.com
TCL 10 5G
OnePlus 8T
Agree, I am confused :) sdcard 1 is checked in mount options but shows 0MB. How or where do I see this /sdcard-1?
When you press "Install", you are brought to a screen with directories. Select "/sdcard-1" among the list of directories to access your SD card's first partition. This will appear after you selected SD card 1 in the mounting options. Don't select "Choose storage" on any screen since that option is unused. After mounting, you can also access "/sdcard-1" via adb push or pull. If you encounter any issue with this, please provide the full log so I can troubleshoot.

To pull twrp.log, run `adb pull /tmp/recovery.log`
To pull logcat, run `adb logcat -d > logcat.txt`
 

DLBtapS

Member
Oct 13, 2021
11
1
When you press "Install", you are brought to a screen with directories. Select "/sdcard-1" among the list of directories to access your SD card's first partition. This will appear after you selected SD card 1 in the mounting options. Don't select "Choose storage" on any screen since that option is unused. After mounting, you can also access "/sdcard-1" via adb push or pull. If you encounter any issue with this, please provide the full log so I can troubleshoot.

To pull twrp.log, run `adb pull /tmp/recovery.log`
To pull logcat, run `adb logcat -d > logcat.txt`
When I press install, there are no options to select "/sdcard-1". There is a directory "TWRP" that is empty

Would you mind posting command to push via adb and flash via fasboot?

I will try again this evening and post logs.
 

DLBtapS

Member
Oct 13, 2021
11
1
You got me! Found /sdcard-1 in root. Installed magisk v23.0, Here pics of the install and root check. Looks like root did not take.



Capture1.JPG
Capture2.JPG
 

DLBtapS

Member
Oct 13, 2021
11
1
Logs:

C:\platform-tools>adb pull /tmp/recovery.log
adb: error: failed to stat remote object '/tmp/recovery.log': No such file or directory


logcat attached
 

EnumC

Senior Member
Dec 22, 2014
125
75
Cupertino
enumc.com
TCL 10 5G
OnePlus 8T
You got me! Found /sdcard-1 in root. Installed magisk v23.0, Here pics of the install and root check. Looks like root did not take.



View attachment 5433211View attachment 5433215
What is the boot slot of the OS you're booting from? Try switching your boot slot to B in the TWRP reboot menu and install Magisk to slot b. Make sure you installed it to both a and b slots.

This is an a/b partition device, so it sometimes boots from the other slot, and your modification doesn't stick.
 

EnumC

Senior Member
Dec 22, 2014
125
75
Cupertino
enumc.com
TCL 10 5G
OnePlus 8T
As DLBtapS is stating all file system mounting is not functional. I'm not sure how your phone may be different, but it just is not working for us.

If all this build really provides is the ability to install zips (which again I was unable to do since I could not mount anything), the utility is very limited. Esp if you plan to rely in it for actual recoveryD purposes.

For the newbies, I would recommend editing your OP with UC examples of what your build can and cannot currently do.
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.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    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?
    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.
    1
    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.
    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 :)
  • 9

    Disclaimer:​

    Code:
    * I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed (like it did for me...).
    * YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you.
    * Your warranty will be void if you tamper with any part of your device / software.

    Warning: This build is still WIP in early stages. I posted this version so everyone can at least flash magisk and other standard zips without too much hassle. Expect bugs and possibly other unexpected behaviors, especially if you attempt to use any features not listed below. Currently working on encryption and getting the other TWRP features online.

    =========

    Update (10/14/2021): I am taking a hiatus from this unofficial TWRP build. With that being said, you are welcome to fork the device tree at the bottom of the post or submit PRs. I may continue working on this when I have more time, but I'm sure another experienced developer will be able to pick up and accomplish what I had trouble with before.

    =========


    What Works:

    * Booting to TWRP.
    * Installing ZIPs.
    * System, Product, Vendor, ODM, opluslog, Metadata, Persist, modem.
    * a/b slot
    * sdcard

    What doesn't work:​

    * userdata decryption. Requires forceencrypt disabler.
    * Backup for any partition besides Super.
    * Restore
    * Factory Reset
    * CPU temperature

    Downloads:​

    0.2.0: https://www.androidfilehost.com/?fid=7161016148664790178
    0.1.0: https://www.androidfilehost.com/?fid=7161016148664789523

    Installation:​

    1. Run
    Code:
    fastboot boot twrp-3.5.2-11-holi.img
    . This will not boot you to twrp, but you should see the device boot to system successfully. If it boots properly, run adb reboot bootloader. If it bootloops or freezes, STOP. Leave your model number in the comments and force reboot your device.

    2. Run
    Code:
    fastboot getvar current-slot
    to get your current active partition slot. If it's A, then run
    Code:
    fastboot flash boot_a twrp-3.5.2-11-holi.img
    . If it's B, run
    Code:
    fastboot flash boot_b twrp-3.5.2-11-holi.img

    3. Run
    Code:
    fastboot reboot
    to get back to the system

    This release is built w/ the stock kernel (5.4.61-qgki-gf8e532b).

    Source
    Manifest: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp
    Device Tree: https://github.com/EnumC/android-OnePlusN200TMO-TWRP
    Pull requests to the device tree are welcome!
    3

    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
    2
    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.
    2

    Disclaimer:​

    Code:
    * I'm not responsible for bricked devices, dead SD cards, thermonuclear war, or you getting fired because the alarm app failed (like it did for me...).
    * YOU are choosing to make these modifications, and if you point the finger at me for messing up your device, I will laugh at you.
    * Your warranty will be void if you tamper with any part of your device / software.

    Warning: This build is still WIP in early stages. I posted this version so everyone can at least flash magisk and other standard zips without too much hassle. Expect bugs and possibly other unexpected behaviors, especially if you attempt to use any features not listed below. Currently working on encryption and getting the other TWRP features online.

    =========

    Update (10/14/2021): I am taking a hiatus from this unofficial TWRP build. With that being said, you are welcome to fork the device tree at the bottom of the post or submit PRs. I may continue working on this when I have more time, but I'm sure another experienced developer will be able to pick up and accomplish what I had trouble with before.

    =========


    What Works:

    * Booting to TWRP.
    * Installing ZIPs.
    * System, Product, Vendor, ODM, opluslog, Metadata, Persist, modem.
    * a/b slot
    * sdcard

    What doesn't work:​

    * userdata decryption. Requires forceencrypt disabler.
    * Backup for any partition besides Super.
    * Restore
    * Factory Reset
    * CPU temperature

    Downloads:​

    0.2.0: https://www.androidfilehost.com/?fid=7161016148664790178
    0.1.0: https://www.androidfilehost.com/?fid=7161016148664789523

    Installation:​







    This release is built w/ the stock kernel (5.4.61-qgki-gf8e532b).

    Source
    Manifest: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp
    Device Tree: https://github.com/EnumC/android-OnePlusN200TMO-TWRP
    Pull requests to the device tree are welcome!

    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 👍
    1
    i replied to your post in the other thread, perhaps maybe this can help with decryption/encryption .... https://forum.xda-developers.com/t/rooting-stock-firmware-w-magisk.4321575/#post-85504141

    Enumc, thanks for the contribution and your time