[FIX] Device-Mapper-Verity fix for Oxygen OS Nougat Rom ( 4.0.1 and Open Beta's)

cpt.macp

Senior Member
Aug 2, 2013
552
311
63
Under Your Bed
Code:
/* DISCLAIMER:
*
* Your warranty is... still valid?
*
* I am 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 steps included in this guide
* before formatting the phone! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*
*/


Pre requisites :-
Q. DM verity ? uh ? !??
A. https://source.android.com/security/verifiedboot/

Q. I don't know sheit help me pls!!!!!!!!!!!!!!!!!!
A. Search Forum , help yourself , Almost everything is answered .

Q. /data/media ( sdcard where all the pics and songs and your sheit is stored) will be lost ?? OMG ?? pls tell :(((
A. uhm yea it will , but follow this guide to backup it , just follow backup process , and not the FS - changing part .

Download Links :-

Oxygen OS :-​

Recoveries :-​
  • Unoffical TWRP-3.0.3-x_blu_spark_v15-op3_op3t.img by eng.stk : Here
  • Offical TWRP 3.0.3-0 by twrp.me and jcadduono : Here
  • Unofficial TWRP 3.0.4.-0 by jcadduono : Here and Official Unified OP3/OP3T Thread Here
  • Unofficial TWRP 3.0.3-0 by dianlujitao : Here
  • Official Oxygen OS Recovery : Here
Super SU :- ( Official Thread )​
  • [STABLE][2016.12.15] SuperSU v2.79 : Here
  • [BETA][2017.01.14] SuperSU v2.79 SR3 : Here

DM verity Disabler :-
  • DM-verity and forced encryption disabler (5.1): Here

Misc Tools :-​
  • [ToolKit] OnePlus 3[v4.0] by ahmedradaideh : Here
  • Signed_OxygenOS-H2OS-Booster-Script-v3.7-by ahmedradaideh ( Super Optimized ) : Here



ALSO I won't be RESPONSIBLE for any mishap , at your own RISK

What this walk through will do ?

  • Fix device-mapper-verity issue
  • Phone will be decrypted . ( can check from Settings -> Security -> Encryption)
  • TWRP recovery would be accessible
  • /data will be f2fs only , not /cache and /system
  • Any backup of other partition's done in ext4 can't be used again in case if you wish to change fs of other partitions , mainly only /data is req for f2fs fs .
  • Now Supports f2f2's decryption without password prompt and better fs handling and Nougat Firmware Supported sadly it won't support ext4 filesystem probably more like don't know how its gonna behave to that environment with the new Modified TWRP by bluspark . ( Updated version of twrp-3.0.2-1.28-oneplus3.img ) .
  • Official TWRP Supports f2fs filesystem handling R/W

Procedure :-

  1. Backup ( for real? do I need to tell this .-. I guess Not but still ) !!!
  2. Flash and boot into stock recovery recovery_op3.img
  3. While in stock recovery, Wipe everything ( resetting variables for dm-verity inside the system boot image ) , all the 3 options , just do all (for a clean flash).
  4. Install OxygenOS 4.0.2 through sideload
  5. Reboot the phone and wait for a while ( might take 2-3 minutes for first boot ) let the setup page come and reboot again to fastboot .
  6. Flash Official TWRP ,Now switch off the phone .
  7. Start the phone in TWRP recovery ( also DM- verity would be gone now , if you would have noticed)
  8. Wipe the phone i.e Advanced Wipe the /data to f2fs (see the guide above, have posted a link )
  9. Reboot again to TWRP .
  10. From TWRP access MTP, copy Super SU.zip to device and flash it.
  11. Wipe data & cache and reboot system.

While Updating ( Optional)
if while updating from old rom to new Rom ( versions ) and You encounter DM verity again Just Follow this
  • Flash the dm-verity and forced encryption disabler zip.
  • Reboot the system followed by clearing cache and dalvik.


DM - verity would be gone NOW .
Voila Lads!!




Change log
  • Updated Link for Stock Recovery ( Nougat Supported)
  • Updated TWRP recovery by BluSpark ( f2fs Decryption and better support )
  • Updated Procedure because of decryption fix
  • Added Link for 4.0.1 ( wont make any diffidence 4.0 or 4.0.1 )
  • Added Link for 4.0.2
  • New Updated TWRP OFFICIAL (3.0.3-0)
  • Updated TWRP recovery by BlusSpark ( 3.0.3-x source)
  • Added dm-verity and forced encryption disabler
  • Added Misc Tools ( ToolKit and Debloater )


Credits :-

  1. for backup and f2fs fs changes by @Adithya R
  2. for new Decryption Supported TWRP twrp-3.0.2-0_blu_spark_v11-op3.img 2017-01-05 14:54 by @eng.stk AKA bluspark
  3. TWRP Official 3.0.3-0 by @jcadduono and TWRP Team
  4. no verity Script by @jcadduono
  5. ToolKit and Debloater Script By @ahmedradaideh
 
Last edited:

kuulbhaskar

Senior Member
May 23, 2012
204
43
0
Kolkata
yeah thanks and also i want to mention that i just skipped first three steps where i flashed stock recovery using fastboot and wiped everything :)
 
Last edited:

TiVa

Senior Member
Apr 11, 2013
287
163
0
It fixed it for me! 2 of those warnings are too much... Encryption sure may be an issue but i'm going tot invest in a USB c portable device so i can use my backups
 

playerboys10

Member
Jan 6, 2014
28
1
0
if i already on oxygen os 4.0 I can go directly to step 8 or I will follow the guide from the point 0? also the point 13 is necessary?...once last thing... in twrp when i do format, i select only data partion and not internal storage but i select f2fs option or automatically see already the partition f2fs? these are all my doubts.
 

cpt.macp

Senior Member
Aug 2, 2013
552
311
63
Under Your Bed
if i already on oxygen os 4.0 I can go directly to step 8 or I will follow the guide from the point 0? also the point 13 is necessary?...once last thing... in twrp when i do format, i select only data partion and not internal storage but i select f2fs option or automatically see already the partition f2fs? these are all my doubts.

1. No in order to remove dm- verity you have to clean install the rom from sideload in official recovery from OnePlus , better to follow from step 1 .
2. Step 13 is necessary as you flashed the Super SU and it will reset variables.
3. /data contains ->> /data/media itself . you cant format Internal Storage seperately from TWRP (.28) so just make a backup by pulling from adb and then format the /data to f2fs
 

cpt.macp

Senior Member
Aug 2, 2013
552
311
63
Under Your Bed
Hello,



Don't work for me...
the zip will prevent the Force Encryption . It doesn't remove it i.e if you un encrpted ( by following this method) and you wanted to install new Updates or some Dirty flashes . Just flash this NO-DM verity .zip just after installing new ROM and it will prevent force Encryption . It won't remove the existing DM verity
 

Skelett

Member
Apr 26, 2016
27
7
0
Montpellier
the zip will prevent the Force Encryption . It doesn't remove it i.e if you un encrpted ( by following this method) and you wanted to install new Updates or some Dirty flashes . Just flash this NO-DM verity .zip just after installing new ROM and it will prevent force Encryption . It won't remove the existing DM verity
Oh, ok :)

Thanks !
 

playerboys10

Member
Jan 6, 2014
28
1
0
Bro please make a video
Please please please
1. No in order to remove dm- verity you have to clean install the rom from sideload in official recovery from OnePlus , better to follow from step 1 .
2. Step 13 is necessary as you flashed the Super SU and it will reset variables.
3. /data contains ->> /data/media itself . you cant format Internal Storage seperately from TWRP (.28) so just make a backup by pulling from adb and then format the /data to f2fs
yes but in the step 13 with the format data and cache, both the partion are formatted in f2fs? or i select manually the f2fs wipe for data and ext 4 for cache?...Thankss:good: