OnePlus 7T Android 12 TWRP?

Search This thread
Hello! I'm very new to building custom recoveries, and haven't even completed a successful build yet. I have a OnePlus 7T model HD1905 (aka North American model/Global) running OOS 12. I've tried to find guides on how to make a TWRP recovery, but nothing has worked for OOS 12. I am able to extract the OOS 12 stock recovery.img with Payload Dumper, and am able to create a basic TWRP device tree for android 12.1 using the official TWRP 12.1 Github manifest, but I'm not able to find a good guide to create a TWRP-ready device tree from my stock recovery.img I mentioned earlier. I've tried updating to OOS 11, and using the twrp-keep module on the magisk modules github to keep the official TWRP installed. (It support OOS 11, but not OOS 12). I've also tried flashing the unofficial build made by Mauronofrio, but none of the specified methods have worked. Can someone please either make a OOS12-compatible version of TWRP for the OnePlus 7T, or if they can't do that, guide me in a step-by-step process on how to do i myself? Any help would be greatly appreciated.
 
  • Like
Reactions: arvindgr
I compiled it but i didn't test it with oos12 (fbe) and custom rom a13 (erofs). I hope it will work..
Device Tree
Sourceforge
So... upon further inspection, there's an issue with decryption. I can successfully flash the image to the recovery partition, and it boots just fine. When I tap on "Mount", all of the options are unchecked. One of the buttons is called "Decrypt Data". I currently don't have face unlock, fingerprint unlock, password or PIN set up, and it still promts me for a password when I tap on "Decrypt Data". I've tried entering "default_password" and "password" (but without the quotation marks), but neither of them work. Is there a way to solve this? This is on the OOS12 TWRP, btw.
 
So... upon further inspection, there's an issue with decryption. I can successfully flash the image to the recovery partition, and it boots just fine. When I tap on "Mount", all of the options are unchecked. One of the buttons is called "Decrypt Data". I currently don't have face unlock, fingerprint unlock, password or PIN set up, and it still promts me for a password when I tap on "Decrypt Data". I've tried entering "default_password" and "password" (but without the quotation marks), but neither of them work. Is there a way to solve this? This is on the OOS12 TWRP, btw.
I just tested the non-OOS Android 13 TWRP file, and it has the same issue.
 
  • Like
Reactions: rabilgic
I compiled it but i didn't test it with oos12 (fbe) and custom rom a13 (erofs). I hope it will work..
Device Tree
Sourceforge
Hi again. As I've mentioned, both TWRP images boot just fine. However, I am unable to mount /data, as when I enter the "Mount" section of TWRP, nothing except the Cache partition is checked. It doesn't ask me for a password upon booting into TWRP, however it DOES ask for one when I tap on the "Decrypt Data" button in the "Mount" section. I've tried entering "default_password" (without the quotation marks), "password" (again, without the quotation marks), and also my password that I set up when I flashed LineageOS 20. I'm curently running LineageOS 20 on the device. I'm able to access USB OTG in TWRP, but I'm not able to flash anything from there. I'm also unable to change boot slots, or backup any partitions. Formatting Data doesn't allow me to access the data partition on rebooting, and the only fix I've been able to find is changing the data partition format from ext4, to ext2, and then back to ext4. This only works temporarily, and only with OxygenOS installed. Even then, after I change the data partition's format like I mentioned above, it resets my data, as is expected. After setting up the device again, and rebooting into TWRP, the /data partition goes back to being un-selected, and I have to repeat the process over again, and once again lose my data. I am unable to carry out the process described while running LineageOS, and its respective TWRP file that you have made. Any help would be greatly appreciated, and if you know the password that TWRP is asking for in the Mount section (when I select "Decrypt Data"), I'd like to know what it is so that I can hopefully get the rest of TWRP to work. Even with these issues, I'd like to give MASSIVE thanks to you, because you were able to do something that my inexperienced self was able to: That is, create a TWRP file that boots, made from the latest custom rom files, and the latest OxygenOS versions' files.
 

rabilgic

Member
Mar 4, 2019
17
21
Xiaomi Redmi Note 7
OnePlus 7T
Hi again. As I've mentioned, both TWRP images boot just fine. However, I am unable to mount /data, as when I enter the "Mount" section of TWRP, nothing except the Cache partition is checked. It doesn't ask me for a password upon booting into TWRP, however it DOES ask for one when I tap on the "Decrypt Data" button in the "Mount" section. I've tried entering "default_password" (without the quotation marks), "password" (again, without the quotation marks), and also my password that I set up when I flashed LineageOS 20. I'm curently running LineageOS 20 on the device. I'm able to access USB OTG in TWRP, but I'm not able to flash anything from there. I'm also unable to change boot slots, or backup any partitions. Formatting Data doesn't allow me to access the data partition on rebooting, and the only fix I've been able to find is changing the data partition format from ext4, to ext2, and then back to ext4. This only works temporarily, and only with OxygenOS installed. Even then, after I change the data partition's format like I mentioned above, it resets my data, as is expected. After setting up the device again, and rebooting into TWRP, the /data partition goes back to being un-selected, and I have to repeat the process over again, and once again lose my data. I am unable to carry out the process described while running LineageOS, and its respective TWRP file that you have made. Any help would be greatly appreciated, and if you know the password that TWRP is asking for in the Mount section (when I select "Decrypt Data"), I'd like to know what it is so that I can hopefully get the rest of TWRP to work. Even with these issues, I'd like to give MASSIVE thanks to you, because you were able to do something that my inexperienced self was able to: That is, create a TWRP file that boots, made from the latest custom rom files, and the latest OxygenOS versions' files.
Thank you for testing the builds and for the feedback :love:. I've been on oos11 for a long time, but today I'm going to flash oos12. Because i would need recovery log files to fix errors.
I don't have no time for some fixes, i will try to fix errors whenever possible.
 
  • Like
Reactions: arvindgr

mrk2815

Senior Member
May 16, 2012
1,533
334
burbank
did you not ttry to use the twrp and the twrp installer builds that are on official twrp site for one plus 7t
 

rabilgic

Member
Mar 4, 2019
17
21
Xiaomi Redmi Note 7
OnePlus 7T
Hi again. As I've mentioned, both TWRP images boot just fine. However, I am unable to mount /data, as when I enter the "Mount" section of TWRP, nothing except the Cache partition is checked. It doesn't ask me for a password upon booting into TWRP, however it DOES ask for one when I tap on the "Decrypt Data" button in the "Mount" section. I've tried entering "default_password" (without the quotation marks), "password" (again, without the quotation marks), and also my password that I set up when I flashed LineageOS 20. I'm curently running LineageOS 20 on the device. I'm able to access USB OTG in TWRP, but I'm not able to flash anything from there. I'm also unable to change boot slots, or backup any partitions. Formatting Data doesn't allow me to access the data partition on rebooting, and the only fix I've been able to find is changing the data partition format from ext4, to ext2, and then back to ext4. This only works temporarily, and only with OxygenOS installed. Even then, after I change the data partition's format like I mentioned above, it resets my data, as is expected. After setting up the device again, and rebooting into TWRP, the /data partition goes back to being un-selected, and I have to repeat the process over again, and once again lose my data. I am unable to carry out the process described while running LineageOS, and its respective TWRP file that you have made. Any help would be greatly appreciated, and if you know the password that TWRP is asking for in the Mount section (when I select "Decrypt Data"), I'd like to know what it is so that I can hopefully get the rest of TWRP to work. Even with these issues, I'd like to give MASSIVE thanks to you, because you were able to do something that my inexperienced self was able to: That is, create a TWRP file that boots, made from the latest custom rom files, and the latest OxygenOS versions' files.
Hi again, i updated my repo and download links.
-OOS12 decryption working.
-Flash zip working . "I installed with zip by the Magisk and copy partititon, i flashed los20 & stock oos12 .)"
-Adb sideload working, i tried stock oos12 flashed successfully.
-Format data working.
-Mtp working.
-Otg working.
-Adb working.
-Vibration working.
* Backup data working, but restore data on oos bootloop :(
* i use swift backup instead of nandroid backup
When i have free time, i will work on twrp a13 fbev2.
 
Last edited:

mrk2815

Senior Member
May 16, 2012
1,533
334
burbank
lets hope you can get a working twrp going for both andrid 12 and 13 .as my one plus 7t is just been put away in my drawer after seeing that one plus has given up on these older devices. when there is a working twrp i would probably want to flash something down the road. my primary driver unfortunately is a samsung S21 plus .
 

HueyT

Senior Member
Apr 3, 2014
4,799
2,178
New Albany, IN
OnePlus 7T
Hi again, i updated my repo and download links.
OOS12 decryption working.
Mtp working.
Adb working.
Vibration working.
I installed with zip by the Magisk and copy partititon.
Backup/restore boot.img working.
I haven't tested: flash rom, format data, needs some testing :)
When i have free time, i will work on twrp a13 fbev2.
All works until I tried to restore. Then it got stuck at red dot going around in circle. When I tried to go back in twrp again to format data, it won't mount data after that. Ended up having to restore all over using msmtool.

It mounted data fine before I tried to restore the data part, then it messed up decryption of data despite not having a lock code, no fingerprint, no pattern-lock, or lock screen enabled.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    Will try tonight as at work
    2
    All works until I tried to restore. Then it got stuck at red dot going around in circle. When I tried to go back in twrp again to format data, it won't mount data after that. Ended up having to restore all over using msmtool.

    It mounted data fine before I tried to restore the data part, then it messed up decryption of data despite not having a lock code, no fingerprint, no pattern-lock, or lock screen enabled.
    Thanks a lot for your feedback. I haven't tried it before because I use swift backup to restore my data. I tried it too, after restoring the data, the device gets bootloop. I got the required log files, backup issue is the context problem "twrp sets ownership and permission incorrectly" in twrp 12. Maybe this could be tried, after you do the backup, open up the psuedo terminal in TWRP and manually change the permissions or owner of the files recursively. Just set the starting directory in TWRP to "/sdcard/TWRP" and do "chown -R media_rw.media_rw BACKUPS" to change the owner, or do "chmod -R og+rw BACKUPS" to change the permissions.
    or
    if you are using magisk and root explorer, you should select /data/media/0/TWRP folder and set secontext default(media_rw_data_file). You should edit the permissions of the twrp folders and files. (folder 775, files 664)


    You should definitely take a backup with swift backup, data backup alpha, App Manager and store it in another storage area. Twrp nandroid backup can still cause other problems.

    If your bootloader is unlocked, fastbootd and twrp are working, you don't need msmtool. Also FastbootEnhance does a nice job. I just formatted data via twrp after bootloop.

    Thank you again for testing and feedback.

    I fixed all other issues.

    I fixed empty TWRP folder and log files copy to pc error. (permission/owner/group/context issue)

    I updated my repo and download links.
    2
    That's right, I saw in the logcat logs that it gives a keymaster error, i will fix it today(OrangeFox/OOS12). Restore nandroid not working properly for OOS12. I tried and the result is bootloop :(

    *I fixed stuck on splash logo (OrangeFox 12.1 OOS12). Reuploaded on SourceForge.
    OrangeFox works now and even allow saving backup on USB OTG flash drive. Not tried restore yet as worry about losing my data
    2
    Works great now, USB OTG works too. 👍
    Data restore bootloop issue fixed. I reuploaded on SourceForge.
    2
    question which one of the twrp files are required to either flash android 12 or 13 roms . i will attempt it this week when i have a bit of time.
    https://sourceforge.net/projects/tw...wrp-3.7.0_12-2-oos12-fbe-hotdogb.img/download if you're on oos12 currently
  • 3
    Will try tonight as at work
    3
    Hi again. As I've mentioned, both TWRP images boot just fine. However, I am unable to mount /data, as when I enter the "Mount" section of TWRP, nothing except the Cache partition is checked. It doesn't ask me for a password upon booting into TWRP, however it DOES ask for one when I tap on the "Decrypt Data" button in the "Mount" section. I've tried entering "default_password" (without the quotation marks), "password" (again, without the quotation marks), and also my password that I set up when I flashed LineageOS 20. I'm curently running LineageOS 20 on the device. I'm able to access USB OTG in TWRP, but I'm not able to flash anything from there. I'm also unable to change boot slots, or backup any partitions. Formatting Data doesn't allow me to access the data partition on rebooting, and the only fix I've been able to find is changing the data partition format from ext4, to ext2, and then back to ext4. This only works temporarily, and only with OxygenOS installed. Even then, after I change the data partition's format like I mentioned above, it resets my data, as is expected. After setting up the device again, and rebooting into TWRP, the /data partition goes back to being un-selected, and I have to repeat the process over again, and once again lose my data. I am unable to carry out the process described while running LineageOS, and its respective TWRP file that you have made. Any help would be greatly appreciated, and if you know the password that TWRP is asking for in the Mount section (when I select "Decrypt Data"), I'd like to know what it is so that I can hopefully get the rest of TWRP to work. Even with these issues, I'd like to give MASSIVE thanks to you, because you were able to do something that my inexperienced self was able to: That is, create a TWRP file that boots, made from the latest custom rom files, and the latest OxygenOS versions' files.
    Hi again, i updated my repo and download links.
    -OOS12 decryption working.
    -Flash zip working . "I installed with zip by the Magisk and copy partititon, i flashed los20 & stock oos12 .)"
    -Adb sideload working, i tried stock oos12 flashed successfully.
    -Format data working.
    -Mtp working.
    -Otg working.
    -Adb working.
    -Vibration working.
    * Backup data working, but restore data on oos bootloop :(
    * i use swift backup instead of nandroid backup
    When i have free time, i will work on twrp a13 fbev2.
    2
    Works great now, USB OTG works too. 👍
    Data restore bootloop issue fixed. I reuploaded on SourceForge.
    2
    Hi again, i updated my repo and download links.
    OOS12 decryption working.
    Mtp working.
    Adb working.
    Vibration working.
    I installed with zip by the Magisk and copy partititon.
    Backup/restore boot.img working.
    I haven't tested: flash rom, format data, needs some testing :)
    When i have free time, i will work on twrp a13 fbev2.
    All works until I tried to restore. Then it got stuck at red dot going around in circle. When I tried to go back in twrp again to format data, it won't mount data after that. Ended up having to restore all over using msmtool.

    It mounted data fine before I tried to restore the data part, then it messed up decryption of data despite not having a lock code, no fingerprint, no pattern-lock, or lock screen enabled.
    2
    All works until I tried to restore. Then it got stuck at red dot going around in circle. When I tried to go back in twrp again to format data, it won't mount data after that. Ended up having to restore all over using msmtool.

    It mounted data fine before I tried to restore the data part, then it messed up decryption of data despite not having a lock code, no fingerprint, no pattern-lock, or lock screen enabled.
    Thanks a lot for your feedback. I haven't tried it before because I use swift backup to restore my data. I tried it too, after restoring the data, the device gets bootloop. I got the required log files, backup issue is the context problem "twrp sets ownership and permission incorrectly" in twrp 12. Maybe this could be tried, after you do the backup, open up the psuedo terminal in TWRP and manually change the permissions or owner of the files recursively. Just set the starting directory in TWRP to "/sdcard/TWRP" and do "chown -R media_rw.media_rw BACKUPS" to change the owner, or do "chmod -R og+rw BACKUPS" to change the permissions.
    or
    if you are using magisk and root explorer, you should select /data/media/0/TWRP folder and set secontext default(media_rw_data_file). You should edit the permissions of the twrp folders and files. (folder 775, files 664)


    You should definitely take a backup with swift backup, data backup alpha, App Manager and store it in another storage area. Twrp nandroid backup can still cause other problems.

    If your bootloader is unlocked, fastbootd and twrp are working, you don't need msmtool. Also FastbootEnhance does a nice job. I just formatted data via twrp after bootloop.

    Thank you again for testing and feedback.

    I fixed all other issues.

    I fixed empty TWRP folder and log files copy to pc error. (permission/owner/group/context issue)

    I updated my repo and download links.