Disable DM-Verity via Magisk without TWRP
Android

Disable DM-Verity via Magisk without TWRP: Complete Guide [100% Working]

Hello friends! Welcome to the post where you will learn how to disable DM-Verity using Magisk. This method doesn’t use TWRP recovery so you can disable Android Verified Boot without using TWRP. So, let’s know how to do that.

Android is an open-source operating system that gives full liberty to the users to modify & customize their device as they like. They can root their device to get admin-level access. They can enable OEM that allows them to unlock the device bootloader. Then they can flash Custom ROMs such as AOSP, Pixel Experience, Lineage OS, etc., and install also custom recovery such as TWRP, OrangeFox Recovery, Lineage OS, etc.

But there are also risks like device vulnerability to malicious apps that can harm your device. If you grant an app root-permissions, it can access the system partitions and can perform admin-level functions. To prevent such malicious activities, you can simply stop installing such apps and grant them root access. And even if you do install them, there is the DM-Verity security feature to restrain such apps from performing any tasks.

DM Verity is a great security feature by Google to protect users’ devices. But the users, who have knowledge about root devices and know which apps are harmful or not, find DM-Verity limiting them from using all features of the apps. Therefore, to free the users from this limiting DM-Verity, we are going to share a full guide on how to disable DM Verity in this post.

What is DM-Verity?

DM-Verity, also known as Device Mapper Verity, is a kernel feature that verifies the integrity of each and every device block to ensure that the device is in the same state as before when booting the device. If some app tries to compromise the device before the kernel turns on, DM-Verity retains that app’s access. 

How to Disable DM-Verity or Android Verified Boot

There are several methods to disable verified boot Android you can use. Some of these methods are using Magisk, Fastboot, and TWRP. But in this post, we will only talk about the first, Magisk method. Using this method, you can disable DM Verity without TWRP recovery. 

If you are wondering if is it possible to disable verified boot without TWRP, then yes. It is possible. And we are going to share how to disable verified boot. Read the following sections and the steps mentioned in them carefully one by one so that you don’t do any mistakes & face any issues.

Disable DM-Verity via Magisk

Disable DM-Verity via Magisk without TWRP

In this section, we have shared all the steps you need to follow to disable DM-Verity without TWRP. This method uses the Magisk-disable-dm-verity-v20.4 application.  Read the steps given below on how to use this method.

Step 1: Download Stock Boot Image File

First of all, you will need the Stock Boot Image that will be available on your device’s official website. Download the Stock Boot Firmware of the same version that corresponds to your device’s version. The downloaded Firmware will be in a ZIP file. Extract it using WinRAR to get the Stock Boot IMG. In case you have a Xiaomi device, and the download file is in GZ format, rename it to TGZ and extract it using 7ZIP.

Disable DM-Verity_4

Step 2: Download & Install Android SDK Platform Tools

Now download the Android SDK Platform Tools like ADB and Fastboot using the links given below according to your computer OS:

If you want a complete guide of Android SDK Platform Tools, you can read our post – ADB and Fastboot Commands.

Step 3: Download & Install Magisk Manager

You, now, will need to download & install Magisk and Magisk Manager on your Android device. Here are the download links for these apps:

Step 4: Enable USB Debugging 

In this step, you need to enable the USB debuffing option so that your Android device can receive commands from the computer via USB. To enable the USB Debugging, follow the steps given below:

  • Navigate to “Settings >> About Phone”. Here, tap on the ‘Build Number’ seven times to activate the developer mode.
  • Then go back to the settings and navigate to “Advanced >> Developer Options”. Here, you will see USB Debugging options. Enable it.
Disable DM-Verity_5

Step 5: Disable Preserve AVB 2.0/dm-verity

Now we will disable the Preserve AVB 2.0/DM-Verity option in the Magisk Manager. To do that, follow these steps:

  • Open Magisk Manager and tap on the Advanced Settings. 
  • Here, you will see the option “Preserve AVB 2.0/dm-verity”. Untick this option to disable it. 
Disable DM-Verity_1

After that, proceed to the next step.

Step 6: Patch Stock Boot Image File

In this step, you need to patch the Stock toot.img using the Magisk app on your Android device. To do that, follow these steps:

  • Copy & paste the stock boot.img file that you downloaded in Step 1 to your Android device. 
  • Now, open the Magisk Manager app.
  • On the home screen, you will see the ‘Magisk is not Installed’ with an Install button. Tap on the Install button. 
Disable DM-Verity_2
  • It will pop up a window asking your permission to install Magisk v20.4. Again, tap on the Install button. 
  • It will again open a pop-up window asking you to select a method. Tap on the Select and Patch a File option.
  • Then navigate to the folder where stock boot.img file is stored and choose it. 
  • It will begin patching the stock boot.img file and will take a few seconds. 
Disable DM-Verity_3
  • Once completed, it will save the patched file in the Download folder with magisk_patched.img name.
  • After that, copy and paste this file to the folder where Android SDK Platform Tools are stored in your computer. 

Once you followed all these previous steps, proceed to the next step to disable DM-Verity.

Step 7: Flash Patched Boot IMG file to Disable DM-Verity

This is the final step. In this step, we will use computer and ADB and Fastboot commands to flash the patched boot image to disable DM-Verity without TWRP. Follow the steps written below to do that:

  • First of all, connect your Android to the computer via USB cable.
  • Then go to the Platform Tools folder and open the Command Prompt. To open the Command Prompt, type CMD in the address bar and hit enter key. It will open the Command Prompt.
Disable DM-Verity
  • Now enter the following command and press the enter key to boot the device into Fastboot mode: 
    • adb reboot bootloader
  • Then, enter the following command and press the enter key to flash the patched img.
    • fastboot flash boot magisk_patched.img
  • After that, reboot your device using the following command
    • fastboot reboot

Done. It will successfully disable DM Verity without TWRP recovery.

FAQ

Can I disable DM-Verity without using the TWRP?

Yes. You can disable the DM Verity without using the TWRP recovery. You can use the Magisk v20.4 to do that. In this post, we have explained all the steps thoroughly on how to use Magisk to disable DM-Verity or AVB on Android devices.

Why do I need to enable USB Debugging?

You need to enable USB debugging so that your Android device can receive ADB and Fastboot commands from your PC via USB cable as ADB and Fastboot commands are required to disable the DM-Verity.

What can I use to execute ADB and Fastboot commands?

You can use Command Prompt or PowerShell to execute the commands.

Conclusion

Thank you for visiting and reading the post. In this post, we have shared how you can disable DM-Verity via the Magisk method. Using this method, you can disable the Android Verified Boot without using the TWRP Recovery. But if you don’t have any knowledge about rooting and about the apps that might be harmful, we recommend not to disable DM-Verity. It’s the best security feature to prevent your device from malicious apps. If you have the knowledge know about the apps & rooting, then go ahead and use the method shared in this post to disable DM Verity in your Android device. And feel free to ask in the comment section if you have any questions. Have a nice day!

Leave a Reply

Your email address will not be published.