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

Search This thread

cpt.macp

Senior Member
Aug 2, 2013
563
315
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
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
288
163
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
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
563
315
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
563
315
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
 

playerboys10

Member
Jan 6, 2014
28
1
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:
 

Top Liked Posts

  • There are no posts matching your filters.
  • 47
    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
    11
    The best and fastest method to fix Device-Mapper-Verity
    boot to FASTBOOT and type this commands one after another
    fastboot oem disable_dm_verity
    fastboot oem enable_dm_verity
    3
    I couldn't sideload to zip file. Got an "cannot read update.zip" message. Anyone any idea? I just updated and still have the dm error




    use this ADB . Yours is old

    just get the portable version of it and run command line from there , it will work surely then
    3
    My Method for dm verity and f2fs on OOS 4.0

    Here are the Proper Instructions to Install Oxygen OS 4.0 without DM - Verity Error and F2FS -

    For Unlocked Bootloader + TWRP + Rooted users (Having any Rom installed before) -

    Requisites -
    Backup All your internal Storage Data - Sync all Google Stuff - backup all Messages or stuff.


    Downloads -
    Oxygen OS Official OTA Full Zip - http://otafsc.h2os.com/patch/amazon...en_16_OTA_035_all_1612310359_e10cadfb2af7.zip
    Official Recovery ( Oxygen OS ) - https://www.androidfilehost.com/?fid=24591000424943319
    TWRP Recovery 3.0.2 - 23 (IMPORTANT) - https://www.androidfilehost.com/?fid=529152257862684308
    SuperSU 2.79 Stable - http://downloadmirror.co/Utz/UPDATE-...1211114519.zip
    Custom Rom Based on OOS ( Choose any) - Freedom OS - https://xdaforums.com/one...s-1-0-t3409348
    Experience Rom - https://xdaforums.com/one...-v1-0-t3522259
    Hyper Stock - https://xdaforums.com/one...stock-t3521946

    Procedure -
    1.) As mentioned, BACKUP EVERYTHING.
    2.) Flash stock oxygen recovery though fastboot or in twrp.
    3.) Boot to stock recovery, sideload Official 4.0 ota via adb.
    4.) Reboot and dont set up device ( not necessary ) enable developer settings and usb debugging.
    5.) Flash TWRP .23 NOT .28 (.28 is bugged with decryption and f2fs errors)
    6.) Boot to twrp, wipe /data to f2fs and /system and /cache to ext4.
    7.) As wiping everything, copy any custom oxygen os build and supesu 2.79
    8.) Flash any custom oxygen os build ( all these 3 builds flashes supersu itself, so no need to flash supersu, buy keep it for further later use.)
    9.) Reboot, Setup and copy all ur stuff.

    This method will surely get u a Rooted, decrypted, f2fs /data partition Oxygen Os 4.0.

    For Stock/Twrp Recovery, Encrypted/Decrytped, Locked/Unlocked Bootloader, Unrooted Users (Those who dont want to root or decyrpt) -

    1.) Backup is necessary as internal storage will be wiped, its a one time process as for now every Oneplus update will be f2fs /data compatible.
    2.) ADB sideload 4.0 ota.
    3.) Reboot and dont set up device ( not necessary )
    4.) Go to backup and reset in settings, do a factory reset with internal storage ( This will wipe everything, BACKUP NEEDED )
    5.) Let the process complete and check /data partition via DiskInfo app.
    6.) If it isnt, do a factory reset again via stock recovery.
    7.) If nothing helps, follow first method.

    I cant guarantee this will work, but many users have reported this as working.
    I think this will be sufficient
    2
    I don't understand anything... Yesterday that happen to me exactly.

    I was in Experience ROM with f2fs and "twrp-3.0.2-0_blu_spark_v11-op3", did a nandroid backup, then factory reset, flash citrus ROM, Google apps, ecofix and supersu....

    After boot logo appeared a message asking me for the password to boot in android, I couldn't fix it...So I wanted to restore the nandroid and had the described fail....All in black and don't boot...



    Enviado desde mi ONEPLUS A3003 mediante Tapatalk

    seems like an ROM issue .
    as said new TWRP decrypted data and handled f2f2 /data .
    still its not 100% functional . gotta wait for the stable recovery.