[Deprecated] Universal DM-Verity, ForceEncrypt, Disk Quota Disabler [11/2/2020]

Search This thread

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a

Thanks for the reply..by the way i found the solution by myself. As your patch changes the forcencrypt flag to encryptable..what i did is i removed the whole text 'forceencrypt=footer' and changed it to 'check'..i just applied this change to vendor fstab .qcom....voila camera and flashlight is working now...thanks for the patch anyway

Interesting. My OP5T has the check flag in addition to the forceencrypt=ice flag so if you just remove the forceencrypt=footer completely (and the ',' next to it if needed), does it still work?
Maybe it's a bug with vold or something

If it works, I can add an option to completely remove the flag rather than setting to encryptable. I'm also assuming that you can't encrypt at all now with the flag removed?
 
Last edited:

rakesh0kumar

Member
Jul 11, 2016
14
4
Interesting. My OP5T has the check flag in addition to the forceencrypt=ice flag so if you just remove the forceencrypt=footer completely (and the ',' next to it if needed), does it still work?
Maybe it's a bug with vold or something

If it works, I can add an option to completely remove the flag rather than setting to encryptable. I'm also assuming that you can't encrypt at all now with the flag removed?
i didnt had an an additional 'check' so i additionaly added it..anyway it worked for me..it needs to be confirmed by someone else with the same problem, then you can add an option on your patch to remove it
 
  • Like
Reactions: Zackptg5

sonic997

Senior Member
Sep 18, 2011
221
8
Samsung Galaxy S7
May i have the changelog for no-verity-opt-encrypt-6.1 versus 6.0 ?

Since my S7 updated to the lastest version of ESG5 bootloader, it seems cannot boot after flashed TWRP...
even I flashed no-verity-opt-encrypt-6.0 in TWRP.

I just also wonder how to gain the Magisk root for this version of my S7

twrp-3.3.1-0-herolte

AP_G930FXXS5ESG5_CL14843133_QB24881129_REV00_user_ low_ship_meta.tar
BL_G930FXXS5ESG5_CL14843133_QB24881129_REV00_user_ low_ship.tar
CP_G930FXXS5ESG5_CP13334970_CL14843133_QB24881129_ REV00_user_low_ship.tar
CSC_OZS_G930FOZS5ESG5_CL14843133_QB24881129_REV00_ user_low_ship.tar
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
May i have the changelog for no-verity-opt-encrypt-6.1 versus 6.0 ?

Since my S7 updated to the lastest version of ESG5 bootloader, it seems cannot boot after flashed TWRP...
even I flashed no-verity-opt-encrypt-6.0 in TWRP.

I just also wonder how to gain the Magisk root for this version of my S7

twrp-3.3.1-0-herolte

AP_G930FXXS5ESG5_CL14843133_QB24881129_REV00_user_ low_ship_meta.tar
BL_G930FXXS5ESG5_CL14843133_QB24881129_REV00_user_ low_ship.tar
CP_G930FXXS5ESG5_CP13334970_CL14843133_QB24881129_ REV00_user_low_ship.tar
CSC_OZS_G930FOZS5ESG5_CL14843133_QB24881129_REV00_ user_low_ship.tar
This zip is completely different from the one you mention (which is also by different ppl). I explained what makes this zip unique in the first post
 

rafaelsarilho

New member
Oct 11, 2014
4
0
27
Ribeirão Preto
Good afternoon!
I have a problem.
I installed rom Pixel Experience 10 on my Xiaomi Mi 8, on TWRP installation, I flashed the ROM ZIP and DM-Verity ZIP (filename Disable_Dm-Verity_ForceEncrypt_08.18.2019).
After the installation, I tried to downgrade installing MIUI 10 (Android 9) by TWRP, it worked, but I am unable to configure a pin or register my fingerprint on the previous Android, when I open the configuration screen, there is the force- close
From what I've seen, I need to change the file name to get back to the default settings, but I don't understand that much.
Does anyone know how to fix this?
Sorry for my bad english.
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
Nothing changed by removing ',clear' everything is working fine.. I don't know why I added that

Can you try this test build with your original fstabs? Should remove entries now rather than change to encryptable. I'm also curious if you can still encrypt afterwards or if that capability is gone now

Edit: Removed build
 
Last edited:

Pupet_Master

Senior Member
Nov 10, 2014
1,753
779
Daedalus:GlobalNode:HUB
Hey sorry but i need a little of more info.
If i flash it after i flash my ROM, would it disable decryption?

---------- Post added at 20:38 ---------- Previous post was at 20:38 ----------

Hey sorry but i need a little of more info.
If i flash it after i flash my ROM, would it disable decryption?
 

kidlerek

Member
Sep 8, 2012
33
2
Radom
It should be work with motorola g6? I flashed it by twrp and dm-verity message still appear .... I have Android 9.0 and pps29.55-37-4-3 compilation. I tried 10.01.2019 version and 08.18.2019.
 

adrianogoes

Member
Oct 4, 2012
48
4
Rio de Janeiro
It should be work with motorola g6? I flashed it by twrp and dm-verity message still appear .... I have Android 9.0 and pps29.55-37-4-3 compilation. I tried 10.01.2019 version and 08.18.2019.

Hi, I'm with the same version as you and it's all working great.

What I did?
- Using RSD Lite, I flashed stock using flashfile.xml (because servicefile.xml does not erase everything);
- Wait for the first boot to occur (it will take a while) and power off the device when the first setup dialog appear;
- Boot to bootloader (VOL - and POWER)
- Don't flash TWRP (use 3.3.1.0 version) because it can cause you problems. Instead, boot with TWRP (use once with fastboot boot twrp.img);
- Hit cancel when prompted for password (it will take a while for the dialog to appear);
- Format DATA (it is different from WIPE) typing yes when needed;
- Reboot to bootloader and boot with TWRP again (fastboot boot twrp.img);
- Format DATA again typing yes when needed;
- Reboot to bootloader and boot with TWRP again;
- Flash Magisk (use the latest beta 19.4);
- Flash Universal DM Verity (use the latest 08.18 version);
- WIPE Dalvik, Cache and Internal Memory (make sure to delete Android folders in your external SD card).

Best of luck!
 

Mervingio

Senior Member
Mar 28, 2011
3,917
944
Elysium
OnePlus 7 Pro
Hi, I'm with the same version as you and it's all working great.

What I did?
- Using RSD Lite, I flashed stock using flashfile.xml (because servicefile.xml does not erase everything);
- Wait for the first boot to occur (it will take a while) and power off the device when the first setup dialog appear;
- Boot to bootloader (VOL - and POWER)
- Don't flash TWRP (use 3.3.1.0 version) because it can cause you problems. Instead, boot with TWRP (use once with fastboot boot twrp.img);
- Hit cancel when prompted for password (it will take a while for the dialog to appear);
- Format DATA (it is different from WIPE) typing yes when needed;
- Reboot to bootloader and boot with TWRP again (fastboot boot twrp.img);
- Format DATA again typing yes when needed;
- Reboot to bootloader and boot with TWRP again;
- Flash Magisk (use the latest beta 19.4);
- Flash Universal DM Verity (use the latest 08.18 version);
- WIPE Dalvik, Cache and Internal Memory (make sure to delete Android folders in your external SD card).

Best of luck!

OP 6T?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 322
    Hi all!

    For the past couple of months, I've been looking into making a more universal solution to disable dm-verity and forceencrypt. Needing to take different zips, modify them for different devices, and then cross your fingers when you switch between custom and stock roms simply wasn't good enough for me. After lots of searching around, failed attempts, and some guidance by @Xennet, @osm0sis, and @nathanchance (thank you all for your help), I finally got a working solution. Ironically, it was under my nose the whole time.

    @topjohnwu figured much of this out a while ago with his magiskboot binary - just modify the fstabs. Magiskboot only works for fstabs in the ramdisk though and dm-verity and forceencrypt are only disabled under certain conditions (when you create a .magisk file with the variables set to false and place it in the proper location). So I made an installker with AK3 by @osm0sis and used a combination of sed patches by @jcadduono in addition to others I found for fstabs not in the ramdisk, modified magiskboot with some extra entries I found need to be removed on some devices, and added some stuff of my own like the creation of .magisk and .supersu files in the right location with the proper contents.

    The end result: a zip that will remove dm-verity and/or forceencrypt from all fstabs on your device
    It can also remove disk quota if you choose. This may be needed if you have an older twrp and/or want to downgrade to Nougat. More info here: https://source.android.com/devices/storage/faster-stats

    Instructions:
    The zipname tells the installer what to do. Here are the current options:
    • Add 'enfec' or en'forceencrypt' to zipname to keep forceencrypt enabled if present
    • Add 'fec' or 'forceencrypt' to zipname to disable forceencrypt (zipname already has this so remove these if you want to keep it enabled)
    • Add 'quota' to zipname to disable disc quota
    Note that verity is always disabled - it has to be for any modifications with this mod

    If you're currently encrypted:
    1. BACKUP YOUR INTERNAL STORAGE TO YOUR PC
    2. Format data (this is NOT the same as Wipe data) (In TWRP: Wipe -> Format Data)
    3. Reboot back into recovery
    4. Follow the directions below for when you're not encrypted

    If you're not encrypted: flash all of your stuff, then FLASH THIS ZIP LAST

    Some extra details for Slot devices:
    1. Flash ROM
    2. Flash TWRP Installer Zip
    3. Reboot into TWRP
    4. Flash everything else
    5. Flash this zip

    Only difference here is the twrp zip and the recovery reboot, main principle is the same - FLASH THIS ZIP LAST

    Troubleshooting:
    • Take a recovery log after flashing this zip (thanks to @aIecxs for the imgs):
      recovery_log.png
    • If the zip isn't patching any fstabs that it should be, then it's possible that the previous zip(s) didn't unmount system and/or vendor properly. Either unmount them in twrp, or just reboot back into recovery and flash this zip again

    Compatibility: Any android device

    Source: https://github.com/Zackptg5/Disable_Dm-Verity_ForceEncrypt

    Download
    17
    Hey everyone! It's been a while thanks to life and such but I have a test build out that I'll make the next release if all goes well. Let me know if it works for you, I'm especially interested in system as root devices.

    I completely revamped the zip to now use AK3 by @osm0sis and have a modified version of magiskboot in it that'll do some extra stuff for ramdisk patching :)
    16
    Merry Christmas everybody! Posted another build - lots of bug fixes - think I got everything ironed out. Here's the changelog:
    • Added vol key selection method for adb sideloading
    • Fixed dtbo patching bugs
    • Fixed magiskboot bug
    • Ignore twrp fstabs if installed in boot img (system as root devices)
    • Add x86 chromeos support
    • Fix apex mounting
    • Misc bug fixes/improvements
    13
    Updated the zip!
    Changelog:
    - Update ak3
    - Always disable verity - required for any other options
    - Added keep encryption option to zip
    - Added new verity flags
    12
    Updated zip! Fixes problem where kernel fstabs weren't being patched. Thanks to lastsaskatchewanpirate @ github for the fix