Oneplus has released the PIE Oxygen OS for Oneplus 3T and 3.
This thread is only for OOS PIE. For disabling Dm-Verity and force Encryption in NOUGAT OOS ROMs refer to my thread here:https://forum.xda-developers.com/oneplus-3t/how-to/rom-dm-verity-force-encryption-disabled-t3618232 and for OREO OOS refer to my thread here:https://forum.xda-developers.com/oneplus-3t/how-to/disable-dm-verity-force-encryption-op3t-t3688748
Disclaimer: I am not responsible for any damage or data loss that happens to your device on embarking this procedure. This is a just released version of OOS and so expect the unexpected. Back up all your data and valuables before you go on and don't blame me if you or your device commits suicide..
THE DETAILS....
After a thororugh initial analysis of the PIE installation zip file for Oneplus 3/3T, I found that there has not been much hell of a difference in the protection schema related to Dm-verity and force encryption. Hence most of the procedure remains the same...As mentioned this is relatively new build and probably existing Twrp may need upstream fixes or other changes to accommodate PIE related commits before encrypting, decrypting and flashing...I have no intention of flashing the PIE build unless it gets stable and have a lot of time to spare so that if things get rough i can dive into it..So its untested from my side but its ought to work same as before. ..
So in a nut shell, to disable DM-Verity you will need to flash the patched Boot Images and to disable force encryption you will have to flash the force encryption disabler zip - The links of which are provided below. Do refer to the correct procedure explained in detail before attempting to do anything...
For all those who need an in-depth reading of the nature of patching the fstab in dtb file and my work you can refer here:
https://forum.xda-developers.com/showpost.php?p=74326761&postcount=3
THIS METHOD WILL WORK FOR BOTH ONEPLUS 3 T AND ONEPLUS 3...
FOR THOSE WHO HAVE ALREADY TRIGGERED DM-VERITY ON OOS PIE FOLLOW THE STEPS IN POST 2 IN THIS THREAD TO GET RID OF DM-VERITY BEFORE PROCEEDING...
Nothing has been changed....
It is 100% stock boot image except that the DM-Verity Flag has been patched...
Links:
For ONEPLUS 3T
STABLE OOS Boot Images
BETA OOS Boot Images
For OnePlus 3
STABLE OOS Boot Images
BETA OOS Boot Images
STEPS: This is applicable only to people who have their data currently ENCRYPTED and needs the procedure only for NOT TRIGGERING DM-VERITY
USAGE FOR STOCK OOS:
1. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip in TWRP before doing anything (even before restarting or applying any patches, root, kernels, etc.)
2. Restart back to TWRP Recovery.
3. Done.
4. Now do whatever you want like usual.. Flash root, kernel, mods or anything as usual
5. You dont have to worry about triggering DM-Verity again and any changes made to system via TWRP will not be reverted back..
The 2 Prodeures given below: This is applicable only to those people who needs the procedure for getting rid of FORCE ENCRYPTION AND PREVENT TRIGGERING DM-VERITY
PROCEDURE 1: This is applicable only to people who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED
First of all Backup your data preferably to and usb otg or a PC for later restore. You may lose your data from your phone following this procedure...
1. Format SYSTEM, DALVIK, CACHE and then only Flash the Full Rom Pie OOS zip file in TWRP.
2. DON'T REBOOT
3. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip.
4. DON'T REBOOT TO SYSTEM
5. REBOOT TO TWRP.
6. In TWRP, MOUNT SYSTEM, GO TO ADVANCED > TERMINAL and Type "df system"(without quotes) and enter. The details of the system partition will be shown. Look at the Use% and Free Space. Make sure you have atleast 100MB free space in System before you go to the next step. If you don't have enough free space then mount system in TWRP, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps)...If there is low space on your system partition that fstab file flashing fails resulting in blank fstab file and you will end up in bootloop.
7. Once you have confirmed that you have atleast 100MB of free space left in system partition. REBOOT BACK TO TWRP.
8. Flash "Force Encryption Disabler For OOS Pie v1.zip" in TWRP.
9. Flash SuperSuSR5 / Magisk 18+
10. Done.
11. Reboot to System.
NB:f you have bootloop go back to TWRP by keep holding the power button to power off and powering on and rebooting to TWRP via the volume buttons, mount system, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps) and reflash the disabler zip and reboot..It is due to low space on your system partition that fstab file flashing fails resulting in blank fstab file. But if you followed Steps 6 and 7 carefully you wont end up here.
PROCEDURE 2: This is applicable only to people who have their data currently ENCRYPTED AND NEEDS TO GET IT DECRYPTED and PREVENT TRIGGERING DM-VERITY
First of all Backup your data preferably to and usb otg or a PC for later restore. You will lose your data from your phone following this procedure...
1. Go to Bootloader...
2. Connect to your PC..Type "fastboot format userdata" without quotes and press enter. (You will lose your data, do back up if you need something.)
3. Don't reboot to system...Using volume buttons select boot to recovery and Reboot to TWRP.....(Very Important)
4. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip.
5. DON'T REBOOT TO SYSTEM
6. REBOOT TO TWRP
7. In TWRP, MOUNT SYSTEM, GO TO ADVANCED > TERMINAL and Type "df system"(without quotes) and enter. The details of the system partition will be shown. Look at the Use% and Free Space. Make sure you have atleast 100MB free space in System before you go to the next step. If you don't have enough free space then mount system in TWRP, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps)...If there is low space on your system partition that fstab file flashing fails resulting in blank fstab file and you will end up in bootloop.
8. Once you have confirmed that you have atleast 100MB of free space left in system partition. REBOOT BACK TO TWRP.
9. Flash "Force Encryption Disabler For OOS Pie v1.zip" in TWRP.
10. Flash SuperSuSR5 / Magisk 18+
11. Done.
12. Reboot to System.
NB: If you have bootloop go back to TWRP by keep holding the power button to power off and powering on and rebooting to TWRP via the volume buttons, mount system, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps) and reflash the disabler zip and reboot..It is due to low space on your system partition that fstab file flashing fails resulting in blank fstab file. But if you followed Steps 7 and 8 carefully you won't end up here.
Rooting:
For Rooting use only SuperSu 2.82 SR5 or Magisk 18 or above seems to work for root...
FAQs:
Q: Is the boot.img file altered in anyway?
A: As mentioned above its 100% stock boot image except that the DM-Verity Flag has been patched in the device tree blobs (dtb)...
Q: My phone is already encrypted, will I lose encryption on flashing the zip?
A: No. It only disables force encryption. That means if you have already disabled encryption in your phone it will prevent the phone from getting encrypted when you flash a stock OOS ROM..
Q: I happen to lose TWRP and revert to stock recovery every time I update OOS, I happen to lose changes made to system via TWRP or lose data/apps accidentally while updating OOS...Can this be corrected by using this method?
A: Definitely. Follow the steps correctly. Each time while updating the OOS, after flashing the Full OOS ROM.zip, immediately flash the patched boot.img of the corresponding OOS given in this thread and then restart back to TWRP recovery. Done. You will never lose TWRP again..
Q: I am Rooting my phone using Magisk/Supersu then why do i need this?
A: Its optional.. If you are rooting phone using Magisk/Supersu it patches the stock boot.img. But in case you have problems flashing Magisk/Supersu after flashing the STOCK ROM zip this can come in handy or as an insurance policy just flash this patched boot.img before doing anything. But is very helpful to those people out there who doesn't root their phone but has unlocked their phone or installed TWRP for other purposes..
Q: How to flash the patched boot.img in TWRP?
A: Default flash option is for zip files in TWRP. Select the flash image option in TWRP. Then select the downloaded patched boot.img file and among from the partition option (boot, recovery and system) select the boot option and then flash it.
Q: What is "-Xn" seen after the OOS Version in the settings menu?
A: That's just my signature -Xn that I had put there to make sure that you have correctly done the procedure and the boot image that is currently in use is my patched boot image and to ensure you that you are 100% safe from DM verity...
Q: Where to find downloads and queries regarding the Stock OOS ROM and Beta OOS?
A: @Siddk007 has been maintaining Stock and Beta OOS threads were you can find relevant information.
Hope you find it useful...
Will update this OP as newer OOS versions come....
HIT THANKS IF I HELPED YOU. IT DOESN'T COST YOU ANYTHING, BUT IT MEANS A LOT TO ME...
AND IF YOU DO APPRECIATE MY WORK DONATIONS ARE ALWAYS WELCOME...
This thread is only for OOS PIE. For disabling Dm-Verity and force Encryption in NOUGAT OOS ROMs refer to my thread here:https://forum.xda-developers.com/oneplus-3t/how-to/rom-dm-verity-force-encryption-disabled-t3618232 and for OREO OOS refer to my thread here:https://forum.xda-developers.com/oneplus-3t/how-to/disable-dm-verity-force-encryption-op3t-t3688748
Disclaimer: I am not responsible for any damage or data loss that happens to your device on embarking this procedure. This is a just released version of OOS and so expect the unexpected. Back up all your data and valuables before you go on and don't blame me if you or your device commits suicide..
THE DETAILS....
After a thororugh initial analysis of the PIE installation zip file for Oneplus 3/3T, I found that there has not been much hell of a difference in the protection schema related to Dm-verity and force encryption. Hence most of the procedure remains the same...As mentioned this is relatively new build and probably existing Twrp may need upstream fixes or other changes to accommodate PIE related commits before encrypting, decrypting and flashing...I have no intention of flashing the PIE build unless it gets stable and have a lot of time to spare so that if things get rough i can dive into it..So its untested from my side but its ought to work same as before. ..
So in a nut shell, to disable DM-Verity you will need to flash the patched Boot Images and to disable force encryption you will have to flash the force encryption disabler zip - The links of which are provided below. Do refer to the correct procedure explained in detail before attempting to do anything...
For all those who need an in-depth reading of the nature of patching the fstab in dtb file and my work you can refer here:
https://forum.xda-developers.com/showpost.php?p=74326761&postcount=3
THIS METHOD WILL WORK FOR BOTH ONEPLUS 3 T AND ONEPLUS 3...
FOR THOSE WHO HAVE ALREADY TRIGGERED DM-VERITY ON OOS PIE FOLLOW THE STEPS IN POST 2 IN THIS THREAD TO GET RID OF DM-VERITY BEFORE PROCEEDING...
Nothing has been changed....
It is 100% stock boot image except that the DM-Verity Flag has been patched...
Links:
For ONEPLUS 3T
STABLE OOS Boot Images
Patched Boot Image Stable OOS 9.0.6
https://www.mediafire.com/file/mgdc7fga7ypemon/boot-patched-9.0.6-OP3T.img/file
Patched Boot Image Stable OOS 9.0.5
http://www.mediafire.com/file/xuea2pjk7iebo7y/boot-patched-9.0.5-OP3T.img/file
Patched Boot Image Stable OOS 9.0.4
http://www.mediafire.com/file/dzbe1djwlc24h0q/boot-patched-9.0.4-OP3T.img/file
Patched Boot Image Stable OOS 9.0.3
http://www.mediafire.com/file/432r3vew6786pga/boot-patched-9.0.3-OP3T.img/file
Patched Boot Image Stable OOS 9.0.2
https://www.mediafire.com/file/fj2offc35sa0zo7/boot-patched-9.0.2-OP3T.img/file
https://www.mediafire.com/file/mgdc7fga7ypemon/boot-patched-9.0.6-OP3T.img/file
Patched Boot Image Stable OOS 9.0.5
http://www.mediafire.com/file/xuea2pjk7iebo7y/boot-patched-9.0.5-OP3T.img/file
Patched Boot Image Stable OOS 9.0.4
http://www.mediafire.com/file/dzbe1djwlc24h0q/boot-patched-9.0.4-OP3T.img/file
Patched Boot Image Stable OOS 9.0.3
http://www.mediafire.com/file/432r3vew6786pga/boot-patched-9.0.3-OP3T.img/file
Patched Boot Image Stable OOS 9.0.2
https://www.mediafire.com/file/fj2offc35sa0zo7/boot-patched-9.0.2-OP3T.img/file
BETA OOS Boot Images
Patched Boot Image Beta OOS 9.0.1
http://www.mediafire.com/file/bf32s2mf2c7y66o/boot-patched-9.0.1-OP3T.img/file
Patched Boot Image Beta OOS 9.0
http://www.mediafire.com/file/kesaqq2q8dgi43p/boot-patched-9.0.0-OP3T.img/file
http://www.mediafire.com/file/bf32s2mf2c7y66o/boot-patched-9.0.1-OP3T.img/file
Patched Boot Image Beta OOS 9.0
http://www.mediafire.com/file/kesaqq2q8dgi43p/boot-patched-9.0.0-OP3T.img/file
For OnePlus 3
STABLE OOS Boot Images
Patched Boot Image Stable OOS 9.0.6
http://www.mediafire.com/file/huxj64syp8l1o58/boot-patched-9.0.6-OP3.img/file
Patched Boot Image Stable OOS 9.0.5
http://www.mediafire.com/file/mkv6swi72pruafy/boot-patched-9.0.5-OP3.img/file
Patched Boot Image Stable OOS 9.0.4
http://www.mediafire.com/file/7d9k4nytqa7nqjv/boot-patched-9.0.4-OP3.img/file
Patched Boot Image Stable OOS 9.0.3
http://www.mediafire.com/file/z7dckvcztskes53/boot-patched-9.0.3-OP3.img/file
Patched Boot Image Stable OOS 9.0.2
http://www.mediafire.com/file/3rzae15wf25l72w/boot-patched-9.0.2-OP3.img/file
http://www.mediafire.com/file/huxj64syp8l1o58/boot-patched-9.0.6-OP3.img/file
Patched Boot Image Stable OOS 9.0.5
http://www.mediafire.com/file/mkv6swi72pruafy/boot-patched-9.0.5-OP3.img/file
Patched Boot Image Stable OOS 9.0.4
http://www.mediafire.com/file/7d9k4nytqa7nqjv/boot-patched-9.0.4-OP3.img/file
Patched Boot Image Stable OOS 9.0.3
http://www.mediafire.com/file/z7dckvcztskes53/boot-patched-9.0.3-OP3.img/file
Patched Boot Image Stable OOS 9.0.2
http://www.mediafire.com/file/3rzae15wf25l72w/boot-patched-9.0.2-OP3.img/file
BETA OOS Boot Images
Patched Boot Image Beta OOS 9.0.1
http://www.mediafire.com/file/v36cxtcnao23bc3/boot-patched-9.0.1-OP3.img/file
Patched Boot Image Beta OOS 9.0
http://www.mediafire.com/file/a9gq8koevpra9bh/boot-patched-9.0.0-OP3.img/file
http://www.mediafire.com/file/v36cxtcnao23bc3/boot-patched-9.0.1-OP3.img/file
Patched Boot Image Beta OOS 9.0
http://www.mediafire.com/file/a9gq8koevpra9bh/boot-patched-9.0.0-OP3.img/file
STEPS: This is applicable only to people who have their data currently ENCRYPTED and needs the procedure only for NOT TRIGGERING DM-VERITY
USAGE FOR STOCK OOS:
1. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip in TWRP before doing anything (even before restarting or applying any patches, root, kernels, etc.)
2. Restart back to TWRP Recovery.
3. Done.
4. Now do whatever you want like usual.. Flash root, kernel, mods or anything as usual
5. You dont have to worry about triggering DM-Verity again and any changes made to system via TWRP will not be reverted back..
The 2 Prodeures given below: This is applicable only to those people who needs the procedure for getting rid of FORCE ENCRYPTION AND PREVENT TRIGGERING DM-VERITY
PROCEDURE 1: This is applicable only to people who have their data currently NOT ENCRYPTED AND KEEP IT DECRYPTED
First of all Backup your data preferably to and usb otg or a PC for later restore. You may lose your data from your phone following this procedure...
1. Format SYSTEM, DALVIK, CACHE and then only Flash the Full Rom Pie OOS zip file in TWRP.
2. DON'T REBOOT
3. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip.
4. DON'T REBOOT TO SYSTEM
5. REBOOT TO TWRP.
6. In TWRP, MOUNT SYSTEM, GO TO ADVANCED > TERMINAL and Type "df system"(without quotes) and enter. The details of the system partition will be shown. Look at the Use% and Free Space. Make sure you have atleast 100MB free space in System before you go to the next step. If you don't have enough free space then mount system in TWRP, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps)...If there is low space on your system partition that fstab file flashing fails resulting in blank fstab file and you will end up in bootloop.
7. Once you have confirmed that you have atleast 100MB of free space left in system partition. REBOOT BACK TO TWRP.
8. Flash "Force Encryption Disabler For OOS Pie v1.zip" in TWRP.
9. Flash SuperSuSR5 / Magisk 18+
10. Done.
11. Reboot to System.
NB:f you have bootloop go back to TWRP by keep holding the power button to power off and powering on and rebooting to TWRP via the volume buttons, mount system, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps) and reflash the disabler zip and reboot..It is due to low space on your system partition that fstab file flashing fails resulting in blank fstab file. But if you followed Steps 6 and 7 carefully you wont end up here.
PROCEDURE 2: This is applicable only to people who have their data currently ENCRYPTED AND NEEDS TO GET IT DECRYPTED and PREVENT TRIGGERING DM-VERITY
First of all Backup your data preferably to and usb otg or a PC for later restore. You will lose your data from your phone following this procedure...
1. Go to Bootloader...
2. Connect to your PC..Type "fastboot format userdata" without quotes and press enter. (You will lose your data, do back up if you need something.)
3. Don't reboot to system...Using volume buttons select boot to recovery and Reboot to TWRP.....(Very Important)
4. Flash the downloaded boot-patched.img file corresponding to the Model and OOS version in TWRP immediately after flashing the Stock ROM zip.
5. DON'T REBOOT TO SYSTEM
6. REBOOT TO TWRP
7. In TWRP, MOUNT SYSTEM, GO TO ADVANCED > TERMINAL and Type "df system"(without quotes) and enter. The details of the system partition will be shown. Look at the Use% and Free Space. Make sure you have atleast 100MB free space in System before you go to the next step. If you don't have enough free space then mount system in TWRP, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps)...If there is low space on your system partition that fstab file flashing fails resulting in blank fstab file and you will end up in bootloop.
8. Once you have confirmed that you have atleast 100MB of free space left in system partition. REBOOT BACK TO TWRP.
9. Flash "Force Encryption Disabler For OOS Pie v1.zip" in TWRP.
10. Flash SuperSuSR5 / Magisk 18+
11. Done.
12. Reboot to System.
NB: If you have bootloop go back to TWRP by keep holding the power button to power off and powering on and rebooting to TWRP via the volume buttons, mount system, go to file manager and free some space in system by deleting some unwanted apps (in system/app folder like duo, google drive, hangouts,etc. which you can later reinstall via google play as it is not mandatory for them to run as system apps) and reflash the disabler zip and reboot..It is due to low space on your system partition that fstab file flashing fails resulting in blank fstab file. But if you followed Steps 7 and 8 carefully you won't end up here.
Rooting:
For Rooting use only SuperSu 2.82 SR5 or Magisk 18 or above seems to work for root...
FAQs:
Q: Is the boot.img file altered in anyway?
A: As mentioned above its 100% stock boot image except that the DM-Verity Flag has been patched in the device tree blobs (dtb)...
Q: My phone is already encrypted, will I lose encryption on flashing the zip?
A: No. It only disables force encryption. That means if you have already disabled encryption in your phone it will prevent the phone from getting encrypted when you flash a stock OOS ROM..
Q: I happen to lose TWRP and revert to stock recovery every time I update OOS, I happen to lose changes made to system via TWRP or lose data/apps accidentally while updating OOS...Can this be corrected by using this method?
A: Definitely. Follow the steps correctly. Each time while updating the OOS, after flashing the Full OOS ROM.zip, immediately flash the patched boot.img of the corresponding OOS given in this thread and then restart back to TWRP recovery. Done. You will never lose TWRP again..
Q: I am Rooting my phone using Magisk/Supersu then why do i need this?
A: Its optional.. If you are rooting phone using Magisk/Supersu it patches the stock boot.img. But in case you have problems flashing Magisk/Supersu after flashing the STOCK ROM zip this can come in handy or as an insurance policy just flash this patched boot.img before doing anything. But is very helpful to those people out there who doesn't root their phone but has unlocked their phone or installed TWRP for other purposes..
Q: How to flash the patched boot.img in TWRP?
A: Default flash option is for zip files in TWRP. Select the flash image option in TWRP. Then select the downloaded patched boot.img file and among from the partition option (boot, recovery and system) select the boot option and then flash it.
Q: What is "-Xn" seen after the OOS Version in the settings menu?
A: That's just my signature -Xn that I had put there to make sure that you have correctly done the procedure and the boot image that is currently in use is my patched boot image and to ensure you that you are 100% safe from DM verity...
Q: Where to find downloads and queries regarding the Stock OOS ROM and Beta OOS?
A: @Siddk007 has been maintaining Stock and Beta OOS threads were you can find relevant information.
Hope you find it useful...
Will update this OP as newer OOS versions come....
HIT THANKS IF I HELPED YOU. IT DOESN'T COST YOU ANYTHING, BUT IT MEANS A LOT TO ME...
AND IF YOU DO APPRECIATE MY WORK DONATIONS ARE ALWAYS WELCOME...
Attachments
Last edited: