Understanding Decryption - OnePlus 5 Questions & Answers

Hello this is my post here on this forum.
I´ve recently decrypted my OP5 running oreo open beta 4 with dm-verity.
My question is: If i flash a custom kernel do i have to reflash the no dm verity file again? Or only if i update the rom?
Thanks in advance and Merry Christmas everyone!

If you flash a custom kernel that enforces encryption, then you would have to flash the no-dm-verity zip after the kernel flash as well. If, however, the kernel doesn't modify the encryption status, then you don't need to flash that zip after flashing your custom kernel.
If you aren't sure if the kernel you're wanting to flash enforces encryption or not, search or ask in the kernel's thread. Or you can always flash the no-dm-verity zip post the kernel flash, in case you aren't sure and don't want to take any risk. Even if the kernel doesn't force encryption and you flash the no-dm-verity zip, there won't be any issues, so don't worry about that.

Related

[FIX][DM-Verity][Oneplus3/3T]DM-Verity/Force Encryption Patched Boot Image

I am creating this thread keeping in my mind the several posts in various threads mentioning that they have accidentally triggered the DM-Verity flag and have an annoying message during startup or due to force encryption in the boot image the phone went back to encrypted state after flashing a new Stock Oxygen OS zip file in TWRP recovery.
So I decided to start a thread where I will post the links to the OFFICIAL BOOT IMAGES of Oxygen OS ROMs for both OnePlus3 and OnePlus3T which have been patched to disable the DM-Verity Flag and to disable the Force encryption that is present in the Stock Oxygen OS ROM.
NB: This thread is only for Nougat Based OOS ROMs. For disabling Dm-Verity and force Encryption in PIE OOS ROMs refer to my thread here: https://forum.xda-developers.com/oneplus-3t/how-to/dm-verity-disable-oxygen-os-t3922324. For Disabling DM-Verity in Oreo Based OOS ROMs visit my thread here: https://forum.xda-developers.com/oneplus-3t/how-to/disable-dm-verity-force-encryption-op3t-t3688748
THIS IS FOR BOTH ONEPLUS 3 and 3T and read the instructions carefully and apply the file specific for your model
Disclaimer: I am not responsible for any damage to your phone by using this...
Nothing has been changed....
It is 100% stock boot image except that the DM-Verity Flag and Force Encryption has been patched...
Links:
For ONEPLUS 3T
STABLE OOS Boot Images
Patched Boot Image Stable OOS 4.5.1
http://www.mediafire.com/file/vm2k81s3pregdiv/boot-patched-4.5.1-OP3T.img
Patched Boot Image Stable OOS 4.5.0
http://www.mediafire.com/file/m8e3nu4ak4u1zkz/boot-patched-4.5.0-OP3T.img
Patched Boot Image Stable OOS 4.1.7
http://www.mediafire.com/file/g5rk4284lzyvqnu/boot-patched-4.1.7-OP3T.img
Patched Boot Image Stable OOS 4.1.6
[url]http://www.mediafire.com/file/j3802c259gea6f2/boot-patched-4.1.6-OP3T.img[/URL]
Patched Boot Image Stable OOS 4.1.5
[url]http://www.mediafire.com/file/78ej52gmthok212/boot-patched-OOS4.1.5.img[/URL]
BETA OOS Boot Images
Patched Boot Image OOS Beta 15
http://www.mediafire.com/file/a436larx3ddx00l/boot-patched-Beta15-OP3T.img
Patched Boot Image OOS Beta 14
http://www.mediafire.com/file/brlvdth86lxi0yl/boot-patched-Beta14-OP3T.img
Patched Boot Image OOS Beta 13
http://www.mediafire.com/file/2clnhl0x4vu8bu8/boot-patched-Beta13-OP3T.img
Patched Boot Image OOS Beta 12
http://www.mediafire.com/file/2214mr1adpdwlx4/boot-patched-Beta12-OP3T.img
Patched Boot Image OOS Beta 11
http://www.mediafire.com/file/hywcwmv0a993ah5/boot-patched-Beta11-OP3T.img
Patched Boot Image OOS Beta 10
http://www.mediafire.com/file/n7nu0wj266e8fhh/boot-patched-Beta10-OP3T.img
Patched Boot Image OOS Beta 9
[url]http://www.mediafire.com/file/5lkp6fi33u9lkpt/boot-patched-Beta9-OP3T.img[/URL]
Patched Boot Image OOS Beta 8
[url]http://www.mediafire.com/file/4d5zrpff4jakjgk/boot-patched-OOS_Beta_8.img[/URL]
For OnePlus 3
STABLE OOS Boot Images
Patched Boot Image Stable OOS 4.5.1
http://www.mediafire.com/file/srdurw9pg4f614f/boot-patched-4.5.1-OP3.img
Patched Boot Image Stable OOS 4.5.0
http://www.mediafire.com/file/nrbuddj0652bf4u/boot-patched-4.5.0-OP3.img
Patched Boot Image Stable OOS 4.1.7
http://www.mediafire.com/file/2cb3jrqckb4suxw/boot-patched-4.1.7-OP3.img
Patched Boot Image Stable OOS 4.1.6
[url]http://www.mediafire.com/file/ytax9vfa9lyhd6d/boot-patched-4.1.6-OP3.img[/URL]
BETA OOS Boot Images
Patched Boot Image OOS Beta 24
http://www.mediafire.com/file/8fcbeiduhiewc9v/boot-patched-Beta24-OP3.img
Patched Boot Image OOS Beta 23
http://www.mediafire.com/file/9i3snrmmsinczct/boot-patched-Beta23-OP3.img
Patched Boot Image OOS Beta 22
http://www.mediafire.com/file/bauq66z2s6o2k1q/boot-patched-Beta22-OP3.img
Patched Boot Image OOS Beta 21
http://www.mediafire.com/file/r31feak94y3cm5z/boot-patched-Beta21-OP3.img
Patched Boot Image OOS Beta 20
http://www.mediafire.com/file/5h32hzw5ot1gbba/boot-patched-Beta20-OP3.img
Patched Boot Image OOS Beta 19
http://www.mediafire.com/file/y6446j7sxiw9jwx/boot-patched-Beta19-OP3.img
Patched Boot Image OOS Beta 18
http://www.mediafire.com/file/zfsji9mjjds7a6n/boot-patched-Beta18-OP3.img
Patched Boot Image OOS Beta 17
[url]http://www.mediafire.com/file/mrqhkq7igt7x4na/boot-patched-Beta17-OP3.img[/URL]
USAGE FOR STOCK OOS:
# 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.)
# Restart back to TWRP Recovery.
# Done.
# Now do whatever you want like usual.. Flash root, kernel, mods or anything as usual
# You dont have to worry about triggering DM-Verity or Getting Force Encrypted again...
VERY IMPORTANT: FOR PEOPLE WHO HAVE ALREADY TRIGGERED DM-VERITY ON THEIR OOS OR CUSTOM ROM AND NEEDS TO GET RID OF THE DM-VERITY MESSAGE PERMANENTLY, READ MY POST 2. AFTER GETTING RID OF DM-VERITY BY FOLLOWING THE STEPS IN POST 2, NEXT TIME ONWARDS WHILE UPDATING YOUR OOS OR CUSTOM ROM FOLLOW THE INSTRUCTIONS IN THIS OP TO KEEP YOUR OOS AND PHONE FREE FROM THE TROUBLE OF DM-VERITY AND FORCE ENCRYPTION...
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 and Force Encryption has been patched...
Q: My phone is already encrypted, will I lose encryption?
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 data/apps accidentally while updating OOS after I lose TWRP ...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: Can I use it for CUSTOM ROMs? / What to do while updating CUSTOM ROMs?
A: For hassle free and the best results whenever you update CUSTOM ROMs always do it this way...
The below steps are for CUSTOM ROMs only. (For STOCK ROMs follow the main step mentioned above in the section USAGE)...
1.Go to TWRP
2.Flash the required firmware zip file
3.Flash the corresponding patched boot IMG
4.Flash the ROM whether LINEAGE, RR, ASOP, etc.
5.Flash gapps
6.Flash root (magisk /su)
7.Flash kernel
8.At last Reboot...
There will not be any problem ever...
You can reboot after step 5
Steps 6,7 are optional
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 and forced encryption..
Hope you find it useful...
Will update as newer OOS versions come....
HIT THANKS IF I HELPED YOU. IT DOESN'T COST YOU ANYTHING, BUT IT MEANS A LOT TO ME...
THIS IS FOR PEOPLE WHO HAVE TRIGGERED DM-VERITY AND NEEDS TO GET RID OF THE DM-VERITY MESSAGE PERMANENTLY ON OOS OR OPEN BETA OR CUSTOM ROM. CONFIRMED WORKING EVEN IN THE LATEST OOS 4.5.1/BETA Nougat Roms...
THIS IS FOR ONEPLUS 3T AND FOR ONEPLUS 3 but be careful in using the correct files corresponding to the OOS version and your MODEL
FOLLOW THE STEPS EXACTLY AND 100% THE DM-VERITY MESSAGE WILL BE GONE WITHOUT ANY DATA LOSS OR ANY OTHER HARM!!!
Prerequisite : Install ADB for windows from here: [url]https://forum.xda-developers.com/showthread.php?t=2588979[/URL]
1)
Download 4.0.2 Firmware for Oneplus 3T from here: [url]http://www.mediafire.com/file/cx568em66025p5b/4.0.2_firmware_OnePlus_3T.zip[/URL]
Download 4.0.2 Firmware for Oneplus 3 from here: [url]http://www.mediafire.com/file/8tt5x4xxy4m488t/4.0.2_firmware_OnePlus3.zip[/URL]
2) Flash the downloaded 4.0.2 firmware OnePlus 3.zip or 4.0.2 firmware OnePlus 3T.zip file in TWRP.
3) DONT REBOOT TO SYSTEM. REBOOT TO BOOTLOADER FROM OPTION IN TWRP.
4) Connect your phone to the pc
5) Press windows button + X
6) Open Command prompt
7) Type "fastboot oem disable_dm_verity" without quotes and press enter
8) Type "fastboot oem enable_dm_verity" without quotes and press enter
9) DONT REBOOT TO SYSTEM. REBOOT TO TWRP RECOVERY.
10)
In case of Oneplus3T, Flash the required firmware files for Stable or Open Beta OOS corresponding to your current OOS (current OOS is the version of OOS which you are using now on your phone) in TWRP from this post: https://forum.xda-developers.com/oneplus-3t/how-to/firmware-beta-10-t3631166(Courtesy: @kamilmirza)
In case of Oneplus3, Flash the required firmware files for Stable or Open Beta OOS corresponding to your current OOS (current OOS is the version of OOS which you are using now on your phone) in TWRP from this post: [url]https://forum.xda-developers.com/oneplus-3/how-to/radio-modem-collection-flashable-zips-t3468628[/URL] (Courtesy: @jamal2367)
11) DONT REBOOT!!!!
10) VERY IMPORTANT: WITHOUT REBOOTING, Flash the downloaded boot-patched.img file corresponding to the OOS version and phone model(either stable or beta) in TWRP from post 1...
11) Reboot..The DM-verity message is gone forever...
VERY IMPORTANT: If you are attempting this method on a a CUSTOM ROM then after Step 10 flash the full CUSTOM ROM zip file + latest gapps again without doing any sort of wipes in TWRP immediately and then only reboot....
Enjoy!!!
FAQs...
Q: Will I lose any data after I do these steps?
A: Never. There will be no data loss or any untoward effects of the procedure. Your data and phone will be in the exact same state as it was a before except for the fact that the damn dirty Dm-Verity message will be gone forever!!!
Q: Will this work on CUSTOM ROMs?
A: Of course. It has been tested to be perfectly working on even CUSTOM ROMs. Just follow the instructions in this post carefully where specific steps for CUSTOM ROMs are mentioned.
HIT THANKS IF I HELPED YOU. IT DOESN'T COST YOU ANYTHING, BUT IT MEANS A LOT TO ME...
Thanks mate..... You made my day..... Working perfectly.
Nice to see this thread on the day of release of oos 4.1.5 itself.
Deleted..
So well explained and working perfectly
One if the most detail step by step explanation
Thanks dev.
Hi,
I have already done the second method on 4.1.4 but without reflashing the firmware so will I have to do it again when Install 4.1.5?
MohamedRaafat said:
Hi,
I have already done the second method on 4.1.4 but without reflashing the firmware so will I have to do it again when Install 4.1.5?
Click to expand...
Click to collapse
Do the second method only if you trigger DM Verity while installing 4.1.5
To be sure you don't trigger DM Verity while installing 4.1.5 follow the instructions in the OP...
Hi,
would it be too bold to ask if something similar could be prepared also for OP3?
I have exactly the same problem with DM-Verity triggered on my OP3. I have seen several guides how to get rid of it but they are sometimes contradictory and the whole process seems to be a bit overwhelming.
This solution seems to be the cleanest of all I have seen but I am not so lucky to own OP3T.
Would you be so kind to prepare this also for us, OP3 owners, if possible?
Of course, there can be many valid reason why not and I can perfectly understand that. But I decided to ask, just in case...
prorokrak said:
Hi,
would it be too bold to ask if something similar could be prepared also for OP3?
I have exactly the same problem with DM-Verity triggered on my OP3. I have seen several guides how to get rid of it but they are sometimes contradictory and the whole process seems to be a bit overwhelming.
This solution seems to be the cleanest of all I have seen but I am not so lucky to own OP3T.
Would you be so kind to prepare this also for us, OP3 owners, if possible?
Of course, there can be many valid reason why not and I can perfectly understand that. But I decided to ask, just in case...
Click to expand...
Click to collapse
I have been thinking about it for the past few days...
Anyways I thought as no one asked they were not interested in getting the patched boot images for op3...
Ok.. they have released OOS 4.1.6..
So will push the links for the patched boot images for both op3 and op3T tomorrow after I test and get hands on the flashable ROMs.
The OP has been updated to accomodate both ONEPLUS 3T and ONEPLUS 3
Now this thread can be used for both models and will be updated as new OOS version come..
Enjoy!!!
NEW UPDATE RELEASED!!!
Links in OP...
Oxygen OOS 4.1.6 patched boot images for ONEPLUS 3T and ONEPLUS 3...
Thenks for this!
sparky vicky said:
How did you flashed the bootimg? through twrp? it's asking for 3 options like boot, recovery,system? im confused
Click to expand...
Click to collapse
Just flash the patched boot.img and select boot in the twrp option..
It's the boot image so boot option...
Xennet said:
Just flash the patched boot.img and select boot in the twrp option..
It's the boot image so boot option...
Click to expand...
Click to collapse
Yes i choose boot but still the warning showing on boot
sparky vicky said:
Yes i choose boot but still the warning showing on boot
Click to expand...
Click to collapse
Which phone are you using op3 or 3t..
Did you flash 4.0.2 zip and type the commands
Tell the steps you did.
Which is the warning being shown?
DM Verity warning or the the phone is unlocked warning??
Im on OP3T, OOS 4.1.6
sparky vicky said:
Im on OP3T, OOS 4.1.6
Click to expand...
Click to collapse
Which is the warning being shown and explain the steps you did
Xennet said:
Which phone are you using op3 or 3t..
Did you flash 4.0.2 zip and type the commands
Tell the steps you did.
Which is the warning being shown?
DM Verity warning or the the phone is unlocked warning??
Click to expand...
Click to collapse
Dm verity warning showing and asusal the unlocked warning also. Im on 3T with OOS 4.1.6. I need to flash 4.0.2 zip before this? Those are not mentioned in OP?
---------- Post added at 05:28 PM ---------- Previous post was at 05:26 PM ----------
Xennet said:
Which is the warning being shown and explain the steps you did
Click to expand...
Click to collapse
Flashed 4.1.6 with twrp at same time without reboot flashed bootpatch and rebooted to system and still the dm verity showung
Did i collapsed the procedure?:silly:
sparky vicky said:
Dm verity warning showing and asusal the unlocked warning also. Im on 3T with OOS 4.1.6. I need to flash 4.0.2 zip before this? Those are not mentioned in OP?
Click to expand...
Click to collapse
Mate do read the second post in the OP...
For getting rid of the DM-Verity message..
The first OP post is only for those who have no DM Verity warning on their phone..
If you already have DM Verity warning on your phone you have to follow the second post..it is clearly mentioned in the OP.. AND WRITTEN IN BOLD LETTERS..
Once you get rid of the DM Verity warning from next time onwards you have to follow only the instructions in the first OP post..

Flashing Order

Hey guys, i just bought the phone and flashed zips immediately But have a question as i've never encrypted my phones till now(it's forced). So i'm on stock kernel and latest 4.5.14 Nolimits rom. Now I want to install xposed, bluspark kernel and remove the encryption from my device(i read something like a dm-verity disabler). Which order and method I should chose to flash those ? I saw something about decyrpted device in the first page of the rom's aroma installer and an option for the xposed but not sure and i don't want any bootloops
Thanks!

rooting shield

So i recently installed developer image 8.0 on my 2017 16gb shield, now i want to install twrp and then flash the kernel to increase cpu and gpu clock and mainly full fan control, i have read that there is no root available but with dev image which is already rooted is it safe to install twrp and the kernel and how do i do it, thank you.
https://forum.xda-developers.com/shield-tv/development/kernel-overclock-kernel-2-22-ghz-t3943079
There is root available, works with both the developer image but also the stock ota.
All the kernel's/modified boots there comes with magisk root.
If you have no idea how to do it, I wouldn't suggest you start doing it.
But there a plenty of guides here on the forum on how to root, flash images and boot into twrp.
I guess my question is as the dev edition is already rooted do i need to install magisk or just flash the kernel which is what i wanted to begin with. So just to twrp temporarily and then flash kernel but not install twrp, i am not entirely sure.
lingarajug said:
I guess my question is as the dev edition is already rooted do i need to install magisk or just flash the kernel which is what i wanted to begin with. So just to twrp temporarily and then flash kernel but not install twrp, i am not entirely sure.
Click to expand...
Click to collapse
You can boot into twrp from fastboot.
"fastboot boot twrp.img"
Magisk is included in the kernel, so if you flash the kernel, magisk will also be installed.
I understood that part, so do i have to flash twrp after flashing kernel with temporary twrp or just leave as it is with stock recovery for it to work.
lingarajug said:
I understood that part, so do i have to flash twrp after flashing kernel with temporary twrp or just leave as it is with stock recovery for it to work.
Click to expand...
Click to collapse
I would suggest just leaving the stock recovery there.
I tried flashing twrp and ended with a bootloop, so now I just boot into twrp instead.

Feeling stoopid... [Magsk-patched boot + TWRP]

Hey guys,
So I grabbed the latest factory image, patched boot with Magisk, and flashed it to the phone. Works great.
But now I want to use TWRP. I can't figure out how to get TWRP on this device.
It seems there's no recovery partition, so I can't use fastboot flash recovery twrp.img. I know I can flash arter97's kernel, which has TWRP baked-in, but I'm trying to figure out how to do it with the stock-Magisk-patched kernel.
Can someone please hit me with a clue-stick?
-edison
get the razer phone 2 arter97 kernel and flash to boot. twrp will be installed.
Marcos8760 said:
get the razer phone 2 arter97 kernel and flash to boot. twrp will be installed.
Click to expand...
Click to collapse
I'm on the PSMR3-RC002 version. Which version of Arter97 kernel works and is stable? Also, does this effect the Magisk root availability, or do I need to run Magisk patch on Arter's Kernel? I had used R12 in the past, prior to the new Magisk Boot-patch scheme, and also lost TWRP afterwards. I haven't gone and tried to reflash Arter97-R12 since I didn't want to bork anything and couldn't find an definitive answer.
MoPhoMike said:
I'm on the PSMR3-RC002 version. Which version of Arter97 kernel works and is stable? Also, does this effect the Magisk root availability, or do I need to run Magisk patch on Arter's Kernel? I had used R12 in the past, prior to the new Magisk Boot-patch scheme, and also lost TWRP afterwards. I haven't gone and tried to reflash Arter97-R12 since I didn't want to bork anything and couldn't find an definitive answer.
Click to expand...
Click to collapse
@MoPhoMike,
I use arter kernel v12.0, seems to be as stable as can be, no hiccups or issues with 12 for me and have been running 12 for about a year.
Flash arter kernel to boot "fastboot flash boot arterxxx.img" xxx is for whichever version you flash or how you named the img.
Once the arter kernel is flashed, i then boot into TWRP. Either from bootloader on your phone, select recovery or use fastboot commands.
Then you can flash magisk from TWRP.
.
NOTE, i have some posts where folks say to boot up the phone after flashing arter kernel, then reboot to recovery and flash magisk. I do it the way i noted above and never had issues.
****No need to patch Magisk that I'm aware of****
Hope this helps...
The new version of Magisk doesn't install via recovery, but from Magisk Manager, and in doing so, it patches the boot.img from the app, then reboots, which then removes TWRP. I may just try to flash arter12 and see what happens. It sucks, because I don't have TWRP installed, and therefore can't make a nandroid backup.

Stock ROM+custom kernel+magisk

Perhaps, someone knows what problem can be caused by the connective, mentioned in the thread name and how to fix it...
So, what I have experienced myself: I flashed a modified kernel, magisk from twrp and used the phone happily..
After some time I got a system message about that my phone was ready for security patch updating. I deleted update files from Ota-packages folder, but after an occasional reboot I found that the phone had already been updated, I had no root, twrp and the custom kernel anymore.
Does anyone know the reason of such behaviour? What exactly cause it? How to reflash the custom kernel correctly? How to avoid subsequent system updates, which can rebuild the ROM with the stock kerner instead of the custom one?
Does it matter when to obtain root via magisk providing I use a custom kernel?

Categories

Resources