yashsingh1/xdaforums huggingface dataset:
[OnePlus 3T Guides, News, & Discussion] Xennet:
Only if you need a decrypted data partition...otherwise no..
[OnePlus 3T Guides, News, & Discussion] pijen:
I'd like to confirm, when encrypted, is it just the /data where apps data stored or include the /sdcard where our media stored? Thanks
[OnePlus 3T Guides, News, & Discussion] BillGoss:
It's the whole data partition (/data), which includes /data/media, which is the internal user storage area (aka /sdcard)
[OnePlus 3T Guides, News, & Discussion] ferchichinabil:
please helppp i triggered dm verity on my op 3 on oreo while rooting now i'm wendering how can i send the 4.0.2 firmware OnePlus 3.zip to twrp to flash it
[OnePlus 3T Guides, News, & Discussion] Xennet:
Download the zip to your phone storage ....

Follow the exact steps in Post 2
[OnePlus 3T Guides, News, & Discussion] samwidd:
Well I have installed this dm verity thing and now want to encrypt my op5 but it's not working can someone tell me what to do next to encrypt my data partition
[OnePlus 3T Guides, News, & Discussion] Xennet:
This is exclusively an op3/3T thread...

No directions here for op5...
[OnePlus 3T Guides, News, & Discussion] ferchichinabil:
updater process ended with error : 7

i sent the firmware 4.0.2 via OTG but got this problem <<updater process ended with error : 7 >>

can i flash the phone all over with oreo stock rom ??

i really need help i just bought this phone:crying::crying:
[OnePlus 3T Guides, News, & Discussion] Xennet:
This has been mentioned several times in this thread..

It's not the problem with the zip file but the problem with the Twrp you use....

Use official Twrp to do the flashing...

And then if you need later reflash the custom Twrp..
[OnePlus 3T Guides, News, & Discussion] danmaman:
Hi [MENTION=7874870]Xennet[/MENTION]

please can you update to the latest Openbeta 20 and 29 (patched boot.img)

thanks a lot
[OnePlus 3T Guides, News, & Discussion] Xennet:
Have to get home!!!

Will release it in a few hours..
[OnePlus 3T Guides, News, & Discussion] 30adi:
Thank you [MENTION=7874870]Xennet[/MENTION], worked like a charm. I'm on latest Beta OOS, OP3T. :good:
[OnePlus 3T Guides, News, & Discussion] Slawuszcze:
Hey,

I am at OOS 5.0.0 on my 3T,

Tried your guide to get rid of dm-verity warning but couldnt flash the zip with 4.0.2 firmware.

Simply it give me an error; Couldnt flash the firmware because it is "". Whatevet it means, commands "oem_disable / enable" doesnt work as well.

My adb/fastboot works fine, device is shown using "fastboot devices" command.

Any advices :D?

TWRP 3.1.1-0

The Error exactly says:

Patching firmware images...

E3004: This package is for "OnePlus 3T" devices;

this is a " ".

Updater process ended with ERROR: 7

Error installing zip file '.........'

Looks like my phone is a " " :D

I am able to flash OOS 5 firmware without warning
[OnePlus 3T Guides, News, & Discussion] Xennet:
This has been mentioned several times in this thread..

It's not the problem with the zip file but the problem with the Twrp you use....

Use official Twrp to do the flashing...

And then if you need later reflash the custom Twrp..

This answer was given by me just 4 posts ahead of your question post...
[OnePlus 3T Guides, News, & Discussion] DarkSJ1998:
I use blu_spark TWRP & never got such issue. As already mentioned, it's a TWRP issue
[OnePlus 3T Guides, News, & Discussion] E66666666:
Still getting the dm-verity warnings after doing the steps in OP, I must've missed something. (I want to keep encryption and just get rid of the warning). Running OOS OB29 on a OnePlus 3 with TWRP 3.2.1-0.

1. Reboot to TWRP and flash the OOS OB29 zip

2. Immediately after, flash boot-patched-Beta29-OP3.img to boot

3. Reboot and select TWRP in the bootloader (it shows the dm-verity warning here)

4. Flash Magisk 15.0.zip

5. Reboot normally (still dm-verity warnings).

Something I'm doing wrong here?

Edit: I'm an idiot and missed post #2. Sorry.
[OnePlus 3T Guides, News, & Discussion] 30adi:
Yes, you are doing wrong.

You need to flash 4.0.2 firmware first. Check 2nd post.
[OnePlus 3T Guides, News, & Discussion] elmer_fudd:
Thanks again. Works flawlessly, as usual. Staying decrypted on OB20 rooted with SuperSU.
[OnePlus 3T Guides, News, & Discussion] uaiclout:
OOS 5.0.1 is out - will your zip for 5.0.0 still work?
[OnePlus 3T Guides, News, & Discussion] Xennet:
Will update the thread today and upload the boot images for 5.0.1....

Then you can...Wait till I get home and on my computer...

A few hours...
[OnePlus 3T Guides, News, & Discussion] counterfeit187:
So just to be sure this is saying downgrade firmware, fix verity, and then it's okay to upgrade to latest firmware again? Or do you keep downgraded firmware?
[OnePlus 3T Guides, News, & Discussion] Xennet:
Don't keep the downgraded firmware...

That's ridiculous

It's just for inputing the commands

Then flash the firmware for the current os and then only reboot...or else you will brick your device...

Read the post 2 completely and follow all steps. No shortcuts..

Please do delete the entire quote in your post..

Trim it...
[OnePlus 3T Guides, News, & Discussion] topjohnwu:
Thank you for your observation :)

The dtb magisk patched is correct. In programs, a string will stop to read further at a null byte (0x0). In dtb binary format, it will save both the property data length and the data content itself. I don't change the data length since it will require to change several offsets and alignment issues, so I simply null out the unwanted parts. The kernel will load in the full data into memory (including the null byte), and it will simply ignore it.

The issue with dtc is that it has to represent data into readable strings. DTB props are not restricted to ASCII values, it will also contain raw bytes, so dtc will have to decide whether it should represent the data with raw format (hex values), or human readable text. It detected null bytes in the data section, which should not appear in normal strings, so it thought that the data is not human readable, and thus print out the hex values.

The issue with Magisk v15.1 is that the tool has a bug and causes segmentation fault, I will fix it ASAP
[OnePlus 3T Guides, News, & Discussion] Xennet:
Thanks for the excellent clarification. Never thought you would reply to the post.

Just found out that Magisk 15.1 causes segmentation fault while patching boot images. So thought of posting. But even if i posted or not, I am sure that you would be aware of the issue and will put up an updated magisk in no time.

That you so much for your time. :)
[OnePlus 3T Guides, News, & Discussion] Xennet:
So Xdiians,

The OP has been updated with patched boot images for OOS Stable 5.0.1 for both Oneplus3 and 3T which has been patched manually for all the dm-verity checks in dtbs....

And the Force Encryption Disabler zip will be good with latest Beta 29/20 and with Latest Stable 5.1.0.....

Happy New Year Flashing!!!
[OnePlus 3T Guides, News, & Discussion] FaserF:
Thanks, but the download is not working. Generating new download key loop.

EDIT: Incognito Tab fixed it.
[OnePlus 3T Guides, News, & Discussion] laupuy:
Hi [MENTION=7874870]Xennet[/MENTION]

To remove the red warning dm-verity is not enforcing at boot I try this and it works for me (OP3, enrypted, twrp blu_spark v8.61, OpenBeta oreo 29, magisk 15.1):

from twrp, go to terminal and run:

reboot "dm-verity enforcing"

source: https://forums.oneplus.net/threads/...r-the-oneplus-3t.731952/page-55#post-17440536

And for stock recovery, run adb command:

adb reboot "dm-verity enforcing"

Credit [MENTION=774530]Chaplan[/MENTION]

Edit.

Should work from a terminal:

su
reboot "dm-verity enforcing"
[OnePlus 3T Guides, News, & Discussion] Xennet:
[MENTION=6849132]laupuy[/MENTION]

The method

adb reboot "dm-verity enforcing" has being lying around for sometime but the main hindrance to it was the need of a stock recovery...

But the other method via twrp is a new one...

If that works and is successful then it would just be great...

If time tested the method holds in all variants of OnePlus devices, I will update the Post 2 to include that method too...
[OnePlus 3T Guides, News, & Discussion] laupuy:
I think adb method can be used with custom recovery too, it's adb :D

And a friend confirm the twrp method on OP3 and RR (Nougat) and blu_spark kernel.

To be continued... ;)
[OnePlus 3T Guides, News, & Discussion] rikiterre:
Worked for me thanks... Oneplus3t openbeta20
[OnePlus 3T Guides, News, & Discussion] FaserF:
Tried installing OOS5.0.1 decrypted and got a bootloop, doing the following:

Flash OOS5.0.1

Flash patched boot image for DM-Verity (V5.0.1)

Flash force encryption disabler

Flash Magisk 14.6 (15.1 won't work!)

What am I doing wrong?
[OnePlus 3T Guides, News, & Discussion] myrthain:
I try to understand if the whole topic of dm-verity is relevant to me, if I plan to switch from an encrypted stock OOS 5.0/5.01 to lineageOS 14.1 (should be encrypted again).

As far as I understand it right now, dealing with dm-verity is only necessary if I want to stay with OOS and just plan to oem-unlook and root my device. Am I right?

Of course, I would like to be sure about the whole procedure before I start fiddling with it.

My research sources besides this thread are: oneplust3-forums and lineageos-on-oneplust3.
[OnePlus 3T Guides, News, & Discussion] timobayl:
It is enough when you write it once
[OnePlus 3T Guides, News, & Discussion] initguru:
Thanks for this great solution!

I have a dumb question though..

I'm going to upgrade from 4.5.1 to 5.0.1 stable.

To prevent dmverity and keep my data decryted, are those procedure right?

1. boot into twrp recovery

2. flash full oxygenos 5.0.1 stable rom

3. flash patched 5.0.1 boot image

4. boot into recovery again

5. flash force encryption disabler zip

6. boot into recovery

7. flash magisk (if I want root)

When I tried oxygenos 5.0 stable last time, there was no patched boot image for 5.0 in this thread yet.

I only used disabler zip and after boot, it did not trigger dmverity but my phone started being encrypted.

So my last question is:

Do I need custom kernel which does not trigger encryption?

I mean, adding this procedure too?

8. flash custom kernel such as franco or bluspark which disable force encryption as I know of?

Thanks in advance!
[OnePlus 3T Guides, News, & Discussion] Xennet:
Try following the procedure 2 in the OP step by step...

Make sure you have mounted system before flashing the disabler zip...

Don't install Magisk now...

At first try booting into system without Magisk and see if it is decrypted...

Finally go back to twrp and then install Magisk..
[OnePlus 3T Guides, News, & Discussion] Xennet:
It should work...

Always keep a back up of your data before you do this procedure...

Custom kernel is not a necessity..

But make sure that the system is mounted and flash the disabler zip...the whole point is to replace the fstab file in the system/vendor/etc folder with the fstab in the zip file...sometimes it doesn't get replaced that's when you get encrypted...
[OnePlus 3T Guides, News, & Discussion] initguru:
Thanks Xennet! You are the man :)
[OnePlus 3T Guides, News, & Discussion] Xennet:
The crux is that DM Verity WILL ALWAYS be triggered if you make changes to your system partition unless the boot process has the DM Verity checks disabled...

For any Rom whether OOS, lineage or custom make sure that the OOS kernel / custom kernel in the ROM is patched for disabling DM Verity...
[OnePlus 3T Guides, News, & Discussion] izukamikain:
Hi, [MENTION=7874870]Xennet[/MENTION], I have installed your patched boot.img but your signature still shows OxygenOS 5.0.1 - Xn

Can you confirm whether you have removed it or not, if it isn't then it's ok too

Thank you for your hard work :good:
[OnePlus 3T Guides, News, & Discussion] Xennet:
For 5.0.1 I have kept the signature...In case if anyone has problems I need to know for further trouble shooting as it was just released yesterday..

Enjoy...
[OnePlus 3T Guides, News, & Discussion] myrthain:
Thank you. I see that I wrote a confusing statement. Since dm-verity is an Android feature, of course it has to be dealt with any ROM. I understood that much. The point here in OOS is that oneplus decided to change the way of implementation and it's place, so that an extra patch is needed to keep it down.

My question was meant to ask whether I need such an extra patch, if I flash the lineageos rom as soon as I install the twrp recovery. Simply because their installation page does not state anything like it. I thought maybe their boot.img will deal with it. Does anyone here have experience with this since Oreo?

https://wiki.lineageos.org/devices/oneplus3/install
[OnePlus 3T Guides, News, & Discussion] JoLander:
Hi,

I'm quite new with the OnePlus device (using a ZUK Z2 pro by now).

I have currently installed twrp 3.2.1-0 and flashed the OOS 5.0 with your patched boot image and magisk 15.1.

All is working well.

My device is currently encrypted and I would like to know if it is necessary to decrypt it.

In this thread I sometimes read one should install the decrypter zip and in the OP it is mentioned that I can stay encrypted.

So, I'm a bit confused.

I also would like to know whether I have to flash the full OOS 5.0.1 package or just the update when I get it (it's not yet available for me) ?

Greetings,

Joe
[OnePlus 3T Guides, News, & Discussion] Xennet:
There is no added advantage of decrypting your data...my advice is to stay encrypted unless you specifically need decrypted data like when you use multirom...and you need to flash the encryption disabler zip only if you need to decrypt your data..
[OnePlus 3T Guides, News, & Discussion] JoLander:
Understood, thanks.

Joe
[OnePlus 3T Guides, News, & Discussion] Xennet:
Pretty much as you understood is correct...If you flash any custom ROM which has a boot image in which DM Verity is patched immediately after swiping to allow system modifications in twrp you will not trigger DM Verity...

And lineage os has a boot image that usually comes pre patched for disabling DM Verity..
[OnePlus 3T Guides, News, & Discussion] mhoo281:
Hey,

although worked for me. Official Twrp 3.2.1.0 experience os 32 (oos 5.0.1j

Gesendet von iPad mit Tapatalk
[OnePlus 3T Guides, News, & Discussion] yis221:
Thanks [MENTION=7874870]Xennet[/MENTION] , just managed to get rid of stubborn dm verity warning using your post #2
[OnePlus 3T Guides, News, & Discussion] sandeep_kumar:
Is it necessary to flash boot-patched.img file at the end to remove DM-verity?

In nougat, there were no need to flash any file after the current firmware.
[OnePlus 3T Guides, News, & Discussion] JoLander:
Additional question:

Is it necessary to flash the patched boot image when you plan to flash the latest magisk version after the stock ROM ?

As far as I understand, magisk patches the stock boot image as well to get rid of the dm-verity warning ?
[OnePlus 3T Guides, News, & Discussion] sandeep_kumar:
Yes I understand, but magisk 15.1 was not doing that on oxygen OS 5.0. That is why the developer is using patched boot image to get the DM verity.

I just want to know from the experience holders, If I do not flash the provided patched boot image, then my device should not soft brick. because if it goes in boot loops then I can easily take the back up.
[OnePlus 3T Guides, News, & Discussion] uaiclout:
Does this only remove the red warning or the yellow one too? Is there any way to remove the yellow message too?
[OnePlus 3T Guides, News, & Discussion] Xennet:
The yellow one is the unlocked bootloader message for which at present there is no way to remove..
[OnePlus 3T Guides, News, & Discussion] Xennet:
For your this query and the earlier question you asked the answer is given in FAQ in the OP...

Magisk and SuperSU are built to take care of DM Verity...

But they are generic and does the same thing for all devices...

So that can have some mishaps as I mentioned in my POST3 in this thread and with some releases like Magisk 15.1

It's entirely up to you that if you need to use the patched boot image if you are using Magisk or SuperSU....it's like an insurance policy in that case...If you use this patched boot image whatsoever you do you will never trigger DM Verity even if the root method fails like in Magisk 15.1 or faulty implementation of script while flashing etc.But if you are using root methods it's upto the method you use that if succeeded or not will define triggering DM Verity...for further read the FAQ in the OP and POST3
[OnePlus 3T Guides, News, & Discussion] JoLander:
Thanks, for clarification. I was just uncertain whether using a patched image and let Magisk (the corrected version) patch the image again might cause inconsistencies.
[OnePlus 3T Guides, News, & Discussion] BillGoss:
I like using [MENTION=7874870]Xennet[/MENTION] patched boot image as it allows me to be fully stock, unrooted, and keep TWRP.
[OnePlus 3T Guides, News, & Discussion] kulmegil:
[MENTION=7874870]Xennet[/MENTION]

Am I doing something wrong?

When I follow PROCEDURE 1, my TWRP hangs on step 6 every time.

Unless I do a REBOOT straight back to Recovery in step 4

(right after flashing patched boot image)
[OnePlus 3T Guides, News, & Discussion] Xennet:
Give details..

Device, OOS version, Twrp version, data encrypted /decrypted...what are you actually trying to do etc..
[OnePlus 3T Guides, News, & Discussion] kulmegil:
OnePlus 3T

OxygenOS Beta 20

official latest TWRP 3.2.1-0 (but also on latest bluespark build 8.61)

data is decrypted and I would like to keep it that way (hence procedure1)

When trying to flash latest OxygenOS beta build.

It happens after I flashed the rom .zip and then patched boot .img

All according to Your instructions.

Next step is to flash "Force Encryption Disabler For OOS Oreo.zip" without any reboot - since I don't want forced encryption.

But trying to flash it will hang TWRP.

In fact trying to browse /system at this point will hang TWRP as well.

(..unless I reboot recovery -> recovery beforehand flashing disabler zip)
[OnePlus 3T Guides, News, & Discussion] BillGoss:
Did you make /system writable in the Mount menu?
[OnePlus 3T Guides, News, & Discussion] kulmegil:
Yes.

(it freezes imminently when I try accessing partition from File Manager as well)
[OnePlus 3T Guides, News, & Discussion] BillGoss:
I'd try formatting /system and then flashing the ROM again.
[OnePlus 3T Guides, News, & Discussion] Xennet:
Like [MENTION=2911853]BillGoss[/MENTION] said try formatting system and then reflash...Think there is something wrong with the partition..
[OnePlus 3T Guides, News, & Discussion] kulmegil:
I did a total of 3 clean installs of same OS yesterday (testing stuff) and it happened every time.

I wiped all partitions - including internal storage.

It's a bit disturbing yes.

Either way... the end result are still as expected. Phone was remained decrypted, while DM wasn't triggered.
[OnePlus 3T Guides, News, & Discussion] jdgesmlls:
Patched on Nougat

I have never run an Oreo based ROM, and I want to install OOS 5.0.1. I know I need to update my TWRP, and install the OOS full image, then root with Magisk 15.2.

Is this procedure mandatory if you want to run rooted OOS 5.0.1?

BTW, I already did this procedure in OOS 4.5.1, but I figure it is necessary for each major release...
[OnePlus 3T Guides, News, & Discussion] BillGoss:
Yes
[OnePlus 3T Guides, News, & Discussion] Azaruddin:
No you don't need this procedure. if you want to run rooted OOS 5.0.1 do the following steps

1) update your TWRP to oreo compatible TWRP

2) flash the Full OOS 5.0.1 zip via TWRP

3) flash the Magisk 15.2 zip latest stable release.

(Magisk 15.2 release has the bootloop fix for the oneplus OOS 5.0.1 so it will not trigger the dm verity in your 3T)

Thats it........... you are ready to go!!!!
[OnePlus 3T Guides, News, & Discussion] Xennet:
If you have used this method before you may very well know the purpose of my patched boot images..

For all other reasons kindly refer to the FAQs in the OP and Post 3 in this thread. They are written in plain English and pretty straight forward so that you can yourself decide whether you need it or not...
[OnePlus 3T Guides, News, & Discussion] DvLAx3l:
Hi guys, is it possible to re enable encryption? I'm oos 5.0.1 with magisk 15.2 & data decrypted
[OnePlus 3T Guides, News, & Discussion] laupuy:
Yes, format data and flash stock OOS:

Re-Encrypt data partition:

1. Go to “Wipe” section, tap “Format Data”, and type “yes”

2. Transfer stock Oxygen Rom to the device over MTP

3. Go to “Install” section, select the Oxygen rom, and swipe to confirm the flash

4. Reboot

source: https://xdaforums.com/oneplus-5/how-to/guide-how-to-decrypt-data-partition-t3642144
[OnePlus 3T Guides, News, & Discussion] DvLAx3l:
Thanks! I did it!

My mistake was after format to not boot directly in the os, but flash magisk recovery and so on.
[OnePlus 3T Guides, News, & Discussion] lover:
i have OP3T with OB20/Magisk 15.2, when i reboot my deice after first boot option i get the DM-Verity might been triggered message and device boots after that with no problem...

do i need this fix? and which procedure? (just flash the boot
[OnePlus 3T Guides, News, & Discussion] Sir_gpm:
I understand, that, so If I flashed one of this rom in my 3t, it won't encrypt it.
[OnePlus 3T Guides, News, & Discussion] Xennet:
It's not a necessity to fix it...it does no harm in your case...if you need to fix this follow procedure in post 2...
[OnePlus 3T Guides, News, & Discussion] uaiclout:
I have NOT flashed the disable Encryption zip and was encrypted on OOS 5.0.1 (+Magisk). Since today I'm not asked for password while boot anymore.

Any explanation and/or advice to get encryption back?
[OnePlus 3T Guides, News, & Discussion] Xennet:
That weird...

Check in Settings, security,

Whether phone is encrypted or not...
[OnePlus 3T Guides, News, & Discussion] BillGoss:
Did you restore the data partition from a backup using TWRP?

Just set your password again and select Require password on boot.
[OnePlus 3T Guides, News, & Discussion] uaiclout:
Encrypted

But not asked for password while startup anymore :confused:

I didn't change any settings...

---------- Post added at 08:19 AM ---------- Previous post was at 08:17 AM ----------

No I didn't do anything!

Doing this will solve the problem for maybe ≈5-8 boots - after them I'm not asked again

----------

Edit: I'm not asked for password WHILE boot - but on the first "lockscreen-unlock" I'm asked to enter it.

I'm not happy with that because an attacker able to access some parts of the phone

Edit 2: encryption is not completely gone - it is just reset to default_password
[OnePlus 3T Guides, News, & Discussion] Xennet:
Think there is really messy going around with your phone...

Don't go around with a phone that's just unstable...

I would recommend not only to format data but also system and start complete a fresh...becoz it's ultimately the boot image and system that encrypts the data partition...
[OnePlus 3T Guides, News, & Discussion] uaiclout:
I had this problem a month ago...

Because of another reason I did a factory reset about 2 weeks ago

I flashed OOS 5.0.0 + Magisk 15.0

Then OOS 5.0.1 was released so I flashed full rom + Magisk 15.0

Next I updated Magisk to 15.2 via internal update option in the manager app

Now I have this problem again

--> I think my /data and /system are pretty clean because everything seemed to be flashed fine

Edit: I don't think my phone is unstable at all - I'm pretty near to stock (no custom kernel...) and this is my only problem