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

Search This thread

lRemainl

Senior Member
Sep 6, 2013
57
10
Lima
Hi, thanks for the updated but I still facing pin/lock pattern issue. I used last updated zip. I think is Redmi Note 7 security.
I am currently using encrypted mode and pin works normally.
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,148
7,005
zackptg5.com
Google Pixel 4a
Google Pixel 5a
Since nobody complained of any bugs with the 10.20 zip, it's now the new stable - OP updated :)

Hi, thanks for the updated but I still facing pin/lock pattern issue. I used last updated zip. I think is Redmi Note 7 security.
I am currently using encrypted mode and pin works normally.

Are you setting the pin during initial setup? Try going through initial setup without setting any security and then setting it after everythings setup.
Another thing is that even when you wipe data, the old pin can be left behind causing problems. In twrp, go to /data/system and delete the locksettings.db file and then try setting a new pin or whatever again
 
G

GuestK00376

Guest
Since nobody complained of any bugs with the 10.20 zip, it's now the new stable - OP updated :)



Are you setting the pin during initial setup? Try going through initial setup without setting any security and then setting it after everythings setup.
Another thing is that even when you wipe data, the old pin can be left behind causing problems. In twrp, go to /data/system and delete the locksettings.db file and then try setting a new pin or whatever again
Haha, I love the QA methods. No one complained, so it's stable. ?
 
G

GuestK00376

Guest
I considered it stable but since I try to make it as universal as possible, I wait for use feedback in case they l there device has different results. Not ideal, but works okayish :/
Oh it was more of an internal joke, I work for an international multi-million dollar organisation that deals with QA in the same manner.

It wasn't a criticism to you by any means, my company however....
 

chrcol

Senior Member
Jan 17, 2012
1,093
172
UK
OnePlus 6
OnePlus 8 Pro
works a treat thank you, I seen other zips and methods none worked reliably or at all, yours "just works"

I flashed it not for performance, but so TWRP backups work, TWRP is surprisingly pretty broken right now for my device, one of the bugs is related to FBE, and now I dont have to deal with that specific bug anymore.

Thanks.
 

Nubidubi23

Member
Sep 18, 2019
29
2
My phone is in RMM , and i cant go in TWRP after i flashed it because it just doesnt take inputs . What can i do?
 

lRemainl

Senior Member
Sep 6, 2013
57
10
Lima
Since nobody complained of any bugs with the 10.20 zip, it's now the new stable - OP updated :)



Are you setting the pin during initial setup? Try going through initial setup without setting any security and then setting it after everythings setup.
Another thing is that even when you wipe data, the old pin can be left behind causing problems. In twrp, go to /data/system and delete the locksettings.db file and then try setting a new pin or whatever again
Hi, thank you so much for the effort you put to help me to find a solution and... yes I have already tried this method before. Put the PIN after setup then go to TWRP, Advanced -File Manager- data/system/ and delete db files and when I setup a new PIN/Patter is still failing. I gave up and I think is my device model. If another user has a Redmi Note 7 and could give us feedback would be great.
 

chrcol

Senior Member
Jan 17, 2012
1,093
172
UK
OnePlus 6
OnePlus 8 Pro
Yo, so I'm not really sure what's going here on but a user on my guide for the g6 play here https://xdaforums.com/g6-play/how-to/guide-t3929928/page38 seems to be having issues getting magisk v20 with the latest 10.20.2019 build going, they have the xt1922-7 model as i do but they are running Android 8 though. I'm using the latest updated firmware for our models android 9 but I used the 8.18.2019 disabler because when I reflashed the newest firmware update the 10.20.2019 disabler wasn't out at that time and everything is working fine now issues for me , I'll be reflashing my phone later to try the 10.20.2019 disabler to see if it works out and let you know if it works, will try to get logs also

I dont see the point of magisk 20 on android8. just tell them to use 19.x or 17.x?
 

andrea0807

Senior Member
Jul 24, 2014
393
34
40
Perugia
In what order should I flash the dm verity zip?
For example I flash rom, magisk, dm verity, gapps, zip of migrate?
Is this order ok?
 
  • Like
Reactions: panchogg

andrea0807

Senior Member
Jul 24, 2014
393
34
40
Perugia
In the OP it says: "flash all of your stuff, then FLASH THIS ZIP LAST". I would recommend rom, gapps, magisk, (zip of migrate? Idk what this is), and finally this dm verity disabler.
Migrate is an application used to restore apps after a reset, such as Titanium.
But do I have to flash the DM verity zip every time I update my Rom? (when I update my rom I don't do a clean install I only do Wipe Cache and Devilk)
Or should I flash it only when I change ROM then after a clean installation?
(When I change ROM I make wipe data and system)

Inviato dal mio MI 8 utilizzando Tapatalk
 
Last edited:

mipirakas

Senior Member
Feb 16, 2015
233
117
leuven
Migrate is an application used to restore apps after a reset, such as Titanium.
But I need the DM verity zip to flash it every time I update my Rom?
(when I update my Rom I don't do a clean install I only do Wipe Cache and Devilk).
Or should I flash it only when I change ROM then after a clean installation?
(wipe data and System)?

Inviato dal mio MI 8 utilizzando Tapatalk
Yes, every time you flash an update, you need to flash this zip again. Flashing an update restores the fstab files and your boot img and such.
 
  • Like
Reactions: andrea0807

aocboe

Senior Member
Dec 31, 2015
127
37
oops
 

Attachments

  • IMG_20191104_102355.jpg
    IMG_20191104_102355.jpg
    69.2 KB · Views: 319

People11

Senior Member
Mar 10, 2018
73
9
Not working on Android Q on Pixel 2
here is what i have done:
reboot to rec
format data
flash magisk
flash your zip(latest)
reboot
the phone reboot automaticly during booting
data encrypted
 
Last edited:
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 name of the zip determines what's DISABLED. Here are the current options:
  • Add 'verity' to zipname to disable dm_verity (zipname already has this so remove this if you want to keep it enabled)
  • 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

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

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

Hi, would like to ask.
Do I need to be rooted for this to work?
Flashed this in TWRP after fresh stock rom installation. Thanks for reply!
 

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