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

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

Search This thread

DLBtapS

Member
Oct 13, 2021
10
1
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.
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.
 

DLBtapS

Member
Oct 13, 2021
10
1
**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
 

EnumC

Senior Member
Dec 22, 2014
124
69
Cupertino
enumc.com
TCL 10 5G
OnePlus 8T
Let me ask this another way: What actions/activities have you successfully performed with your build? You must have had a reason to fork this up to a certain point in functionality. What was that reason?

That answer will help those anonymously reading this thread to understand if they should flash or not.
Most of your questions are already answered in the OP and my previous replies. Please let me know if that helped answer your question.
 

EnumC

Senior Member
Dec 22, 2014
124
69
Cupertino
enumc.com
TCL 10 5G
OnePlus 8T
I'm wondering if I can get the kernel to build, we could possibly disable dm-verity. Would that help?
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.
 

DLBtapS

Member
Oct 13, 2021
10
1
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.
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!
 
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...
 

Link575

Senior Member
Dec 21, 2015
85
18
Ugh.

I really wish that the OP would provide very clear fair warnings about these limitations in their original post, like I already have asked them to.

The TWRP build as it stands is causing lots of folks problems and only they can stop the bleeding.
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.
 

mr_reaper

Senior Member
Sep 2, 2016
254
23
New Orleans
OnePlus Nord N200 5G
found this dont know if its helpful

  1. fastboot boot twrp.img
  2. Open a terminal (on a computer) and type adb shell
  3. your window should have only a ~#
  4. Type this command in
    HTML:
    dd if=**boot.img path** of=/sdcard/boot.img
  5. Replace the **boot.img path** with whatever path you found your boot.img in when locating it
  6. This should pull the boot.img to your /sdcard (storage) directory
  7. To transfer to computer, just use your favorite file transfer method!
 

mr_reaper

Senior Member
Sep 2, 2016
254
23
New Orleans
OnePlus Nord N200 5G
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
 
Sep 17, 2021
31
2
OnePlus Nord N200 5G
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
So this is the official way to decrypt the partition
 

Top Liked Posts

  • There are no posts matching your filters.
  • 7

    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!
    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
    1
    First, thank you @EnumC great work. Second, anyone know how would I go about installing a zip if TWRP can't see anything in downloads and can't see the SD card. TIA
    Push to /tmp or /sdcard.
    1
    Tried out new build of TRWP, everything worked fine.
    1
    Cool. So what should I do now if I want to flash Magisk? Wait for your 0.3.0 version?
    Flash it! If you have an SD card, then put the zip in the SD card, and flash from /sdcard-1. If not, connect it to your computer and run "adb push yourmagisk.zip /tmp" and flash from /tmp.