Development [RECOVERY][UNOFFICIAL] TWRP 3.7.0_12-0 for OnePlus Nord 2T [karen]

Search This thread

Beanow

Member
Sep 25, 2022
38
25
OnePlus Nord 2T
00089416acae5804b6922.jpg

Code:
#include <std_disclaimer.h>
/*
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/

What's not working?
See https://github.com/oneplus-karen-ro...s_karen-twrp/issues/1#issuecomment-1272629658

- Using fastboot boot <image> doesn't work, due to a very common MediaTek bootloader bug.
- Backing up Data partition may fail due to possible FBE issue.
- Installing OxygenOS stock OTA zip probably fails, because OnePlus didn't add version numbers to their partititons.

Flash guide:
1. Make sure you have the stock boot.img ready that matches your current OxygenOS version.
There's a list of them on this great guide: How to Root Nord 2T with Magisk without TWRP
Add both boot.img and twrp-3.7.0_12-0-UNOFFICIAL-karen.img to your phone storage, using MTP or adb push for example.

2. Flash the TWRP release to the boot partition.
Code:
fastboot flash boot twrp-3.7.0_12-0-UNOFFICIAL-karen.img
fastboot reboot

3. Once you've rebooted to TWRP, install the stock boot.img
- [Install]
- Toggle [Install Image]
- Choose boot.img in the file browser
- Select partition: Boot
- Swipe, DO NOT REBOOT

4. Next we install the ramdisk.
- Press back
- Choose twrp-3.7.0_12-0-UNOFFICIAL-karen.img in the file browser.
- Select partition: Install Recovery Ramdisk
- Swipe (optional, if you want to root the phone, DO NOT REBOOT).
- If you don't want to root, you can reboot now.

Optional, rooting:

5. Save the repackaged boot for Magisk.
Code:
adb shell dd if=/dev/block/by-name/boot of=/sdcard/boot-with-twrp.img

6. Patching the image to root.
- Reboot the device, to normal OS.
- In the Magisk app, choose install and patch our boot-with-twrp.img image.
- Note the ..../Download/magisk_patched-XXXXXXX.img filename in the logs.

7. Install the rooted boot image.
- First switch to TWRP
Code:
adb reboot recovery
- In TWRP, [Install]
- Toggle [Install Image]
- Choose Download/magisk_patched-XXXXXXX.img in the file browser
- Select partition: Boot
- Swipe
- Reboot! You're (finally) done.

Download:
twrp-3.7.0_12-1-UNOFFICIAL-karen.img
twrp-3.7.0_12-0-UNOFFICIAL-karen.img

Source code:

Credits:
@SakilMondal for the TWRP denniz (Nord 2) tree this is largely based on.
@PattasuBalu for testing out alpha builds and troubleshooting.

Information:
TWRP version: 3.7.0_12-1-UNOFFICIAL
Created: 2022-10-09
Last Update: 2022-10-15
 
Last edited:

cioce

Senior Member
Sep 21, 2013
383
115
Thanks for the TWRP, now the question is, what happen when we receive OTA updates?
Why seems not possible to directly flash magisk zip (apk renamed) to patch boot img?
I think is better to add this first Q&A in a FAQ list.
 

PattasuBalu

Senior Member
Dec 4, 2020
72
11
Thanks for the TWRP, now the question is, what happen when we receive OTA updates?
Why seems not possible to directly flash magisk zip (apk renamed) to patch boot img?
I think is better to add this first Q&A in a FAQ list.
When you recieve an OTA update you have do the entire process again.
 

Beanow

Member
Sep 25, 2022
38
25
OnePlus Nord 2T
Thanks for the TWRP, now the question is, what happen when we receive OTA updates?
Why seems not possible to directly flash magisk zip (apk renamed) to patch boot img?
I think is better to add this first Q&A in a FAQ list.
(Added the TL;DRs to the second post)


Do you need to repeat the install after an OTA?
Indeed you will need to repeat the process after an OTA.

With an asterisk. Because in theory you could speed this up if you have root access.
The Magisk app has a feature to "Install to Inactive Slot". And the TWRP app could be doing something similar, but I find it needs some work to be more reliable in doing that :]

So if 1. this becomes an OFFICIAL build, and 2. the TWRP app gets some love. It could be done.

Why can you not install Magisk as an APK?
Maybe you can though? I just don't recommend it.
I'm not a Magisk dev so I might miss the finer details why, but they state this method is no longer recommended and deprecated. So it wasn't on my checklist to try or support it.

I suspect though that the patching script will need to make a load of assumptions about how that recovery environment is set up, while the app would be more reliable.
 
Last edited:
  • Like
Reactions: cioce

cioce

Senior Member
Sep 21, 2013
383
115
Thanks for the update, what about SafetyNet test after TWRP + Root?
Is there any Magisk module that working 100%?
 

nutfile

New member
Feb 12, 2018
2
1
hi,
can I use this twrp to install full ROM zip file?
what is the right order to install:
1. full zip ROM
2. twrp.img
3. magisk patched boot.img

is it ok?
 
Never tried to install a GSI before. Did you already tried it on this phone?
I tried dsu loader on a different phone and it partialy worked but it's ment for the devs

But it's easy u just unlock the bootloader and download dsu sideloader. Then connect to pc and type some command and dsu will sideload sideload your preferred GSI
 
Last edited by a moderator:

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    00089416acae5804b6922.jpg

    Code:
    #include <std_disclaimer.h>
    /*
    *
    * We are not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about features included in this ROM
    * before flashing it! YOU are choosing to make these modifications, and if
    * you point the finger at us for messing up your device, we will laugh at you.
    *
    */

    What's not working?
    See https://github.com/oneplus-karen-ro...s_karen-twrp/issues/1#issuecomment-1272629658

    - Using fastboot boot <image> doesn't work, due to a very common MediaTek bootloader bug.
    - Backing up Data partition may fail due to possible FBE issue.
    - Installing OxygenOS stock OTA zip probably fails, because OnePlus didn't add version numbers to their partititons.

    Flash guide:
    1. Make sure you have the stock boot.img ready that matches your current OxygenOS version.
    There's a list of them on this great guide: How to Root Nord 2T with Magisk without TWRP
    Add both boot.img and twrp-3.7.0_12-0-UNOFFICIAL-karen.img to your phone storage, using MTP or adb push for example.

    2. Flash the TWRP release to the boot partition.
    Code:
    fastboot flash boot twrp-3.7.0_12-0-UNOFFICIAL-karen.img
    fastboot reboot

    3. Once you've rebooted to TWRP, install the stock boot.img
    - [Install]
    - Toggle [Install Image]
    - Choose boot.img in the file browser
    - Select partition: Boot
    - Swipe, DO NOT REBOOT

    4. Next we install the ramdisk.
    - Press back
    - Choose twrp-3.7.0_12-0-UNOFFICIAL-karen.img in the file browser.
    - Select partition: Install Recovery Ramdisk
    - Swipe (optional, if you want to root the phone, DO NOT REBOOT).
    - If you don't want to root, you can reboot now.

    Optional, rooting:

    5. Save the repackaged boot for Magisk.
    Code:
    adb shell dd if=/dev/block/by-name/boot of=/sdcard/boot-with-twrp.img

    6. Patching the image to root.
    - Reboot the device, to normal OS.
    - In the Magisk app, choose install and patch our boot-with-twrp.img image.
    - Note the ..../Download/magisk_patched-XXXXXXX.img filename in the logs.

    7. Install the rooted boot image.
    - First switch to TWRP
    Code:
    adb reboot recovery
    - In TWRP, [Install]
    - Toggle [Install Image]
    - Choose Download/magisk_patched-XXXXXXX.img in the file browser
    - Select partition: Boot
    - Swipe
    - Reboot! You're (finally) done.

    Download:
    twrp-3.7.0_12-1-UNOFFICIAL-karen.img
    twrp-3.7.0_12-0-UNOFFICIAL-karen.img

    Source code:

    Credits:
    @SakilMondal for the TWRP denniz (Nord 2) tree this is largely based on.
    @PattasuBalu for testing out alpha builds and troubleshooting.

    Information:
    TWRP version: 3.7.0_12-1-UNOFFICIAL
    Created: 2022-10-09
    Last Update: 2022-10-15
    2
    Fantastic work. Congrats and a huge thank you

    Thanks for the kind words. :] Was a fair bit of a learning curve but nothing quite as troublesome as now trying to build a full ROM. No luck on that yet.
    1
    Reserved :]

    Q&A:

    Do you need to repeat the install steps after an OTA update?

    Short answer: yes you do.
    Longer answer

    Can't we install Magisk as a zip from TWRP?
    Maybe you can? I just don't recommend it.
    And neither does Magisk.
    1
    Thanks for the TWRP, now the question is, what happen when we receive OTA updates?
    Why seems not possible to directly flash magisk zip (apk renamed) to patch boot img?
    I think is better to add this first Q&A in a FAQ list.
    (Added the TL;DRs to the second post)


    Do you need to repeat the install after an OTA?
    Indeed you will need to repeat the process after an OTA.

    With an asterisk. Because in theory you could speed this up if you have root access.
    The Magisk app has a feature to "Install to Inactive Slot". And the TWRP app could be doing something similar, but I find it needs some work to be more reliable in doing that :]

    So if 1. this becomes an OFFICIAL build, and 2. the TWRP app gets some love. It could be done.

    Why can you not install Magisk as an APK?
    Maybe you can though? I just don't recommend it.
    I'm not a Magisk dev so I might miss the finer details why, but they state this method is no longer recommended and deprecated. So it wasn't on my checklist to try or support it.

    I suspect though that the patching script will need to make a load of assumptions about how that recovery environment is set up, while the app would be more reliable.
    1
    Thanks for the update, what about SafetyNet test after TWRP + Root?
    Is there any Magisk module that working 100%?
    SafteyNet is working fine. Using Universal SafteyNetFix by kdrag0n and added play services to blocklist on Zygisk.