How to Disable DM-Verity Force Encryption on OnePlus 3T

OnePlus 3T owners who upgraded to OOS Oreo have been discovering that attempts to install root the device, or flash any other scripts that perform changes to the /system partition are somehow reverted upon rebooting the device. This is because the OOS Oreo update forced DM-Verity and Force Encryption onto the device. What this basically means is that when DM-Verity is triggered, any changes to the /system are reverted back to its original state when you reboot the device.

What this means is that the device cannot be rooted or any kind of custom recovery (or anything that touches /system, for that matter) cannot be flashed onto the device; luckily, there is a way to disable DM-Verity and Force Encryption.

Warning: We will be flashing patched boot images for this procedure. Please have a backup of all your phone’s important data, including original firmware.

Downloads:

Patched Boot Images For OnePlus 3T

Patched Boot Images For OnePlus 3

Procedure 1 – Stock OOS, User wants encrypted data, no DM-Verity Trigger

  1. Download the boot-patched.img and Stock ROM .zip files which corresponds to your model and OOS version.
  2. Reboot your OnePlus 3T into TWRP Recovery (see the TWRP installation instructions on Appual’s OnePlus 3T root guide)
  3. First flash the Stock ROM .zip in TWRP, and restart your device back into TWRP Recovery – do not reboot into the Android system!
  4. Now flash the boot-patched.img file in TWRP. You can now proceed to flash any other scripts or mods you like, without triggering DM-Verity.

Stock OOS, User does not want Force Encryption and DM-Verity trigger

There are two procedures to follow here. The first is for people who want to get rid of Force Encryption and prevent further triggering of DM-Verity. The second is for people who currently have their data encrypted, and need to decrypt the data before proceeding with DM-Verity patch flashing.

Procedure 1 – Unencrypted device, remove Force Encryption and DM-Verity trigger

  1. Make sure you have a backup of all your important data for restoring later.
  2. Reboot your OnePlus 3T into TWRP Recovery, and proceed to format the System, Dalvik, and Cache.
  3. In TWRP, flash the full Oreo Beta OOS .zip file. DO NOT REBOOT YOUR DEVICE AFTER THIS.
  4. Flash the boot-patched.img file from the downloads above – AGAIN, DO NOT REBOOT TO SYSTEM. REBOOT TO TWRP!
  5. In the TWRP menu, choose to Mount System, then go to Advanced > Terminal and type the following command: df system
  6. The details of your /system partition will be displayed – look for the Use% and Free Space, and make sure you have at least 100MB in /System before proceeding. If you do not have enough space, Mount System in TWRP, go to File Manager and free space by deleting bloatware apps, like Duo, Google Hangouts, etc. The reason for this is because if the /system partition does not have enough free space, the Fstab file being flashed will fail, resulting in a blank Fstab file, and device bootloops!
  7. So once you have at least 100MB of reserved space in the /system partition, Reboot to TWRP.
  8. Proceed to flash the Force Encryption Disabler for OOS Oreo .zip file in TWRP.
  9. You may now flash the rooting tool of your choice, such as SuperSu or Magisk. When you’re done, you can Reboot to System!

Procedure 2 – Encrypted device needs decrypting and DM-Verity trigger removal

  1. You should have ADB installed on your computer for this procedure. Please see Appual’s guide “How to Install ADB on Windows”.
  2. Make sure you have a backup of all your important user-data before proceeding.
  3. Connect your OnePlus 3T via USB, launch an ADB command terminal, and type: fastboot format userdata (Note: This will erase your user-data)
  4. Do not reboot to system – use the volume buttons to select Boot to Recovery and Reboot to TWRP.
  5. Flash the Stock ROM .zip and boot-patched.img files from the downloads section above, do not reboot to system after this. Reboot to TWRP.
  6. In the TWRP menu, choose to Mount System, then go to Advanced > Terminal and type the following command: df system
  7. The details of your /system partition will be displayed – look for the Use% and Free Space, and make sure you have at least 100MB in /System before proceeding. If you do not have enough space, Mount System in TWRP, go to File Manager and free space by deleting bloatware apps, like Duo, Google Hangouts, etc. The reason for this is because if the /system partition does not have enough free space, the Fstab file being flashed will fail, resulting in a blank Fstab file, and device bootloops!
  8. So once you have at least 100MB of reserved space in the /system partition, Reboot to TWRP.
  9. Proceed to flash the Force Encryption Disabler for OOS Oreo .zip file in TWRP.
  10. You may now flash any /system scripts or root tools you wish, such as SuperSU or Magisk, and then proceed to Reboot to System.

Procedure 3 – DM-Verity has previously been triggered, user wishes to permanently remove DM-Verity warning message.

Required:

  1. Begin by downloading the firmware for your OnePlus model version, and flash it inside of TWRP Recovery.
  2. Do not reboot to /system – reboot to bootloader from TWRP menu.
  3. Connect your phone to your PC via USB, and launch an ADB command prompt.
  4. Type the following commands in the ADB console:
    Fastboot oem disable_dm_verity
    Fastboot oem enable_dm_verity
  5. Now reboot to TWRP Recovery from inside the TWRP menu.
  6. Now if you are on the OnePlus 3T, flash whichever one of these files corresponds with your OS version:
    5.0.1 – Oreo
    Open Beta 21 – Oreo
  7. If you are on the OnePlus 3, flash one of these files instead:
    Android 6.0.1 OxygenOS:
    – Firmwares + Modems – Download
    Open Beta:
    – Firmwares + Modems – Download
    Android 7.0 OxygenOS:
    – Firmwares + Modems – Download
    Open Beta:
    – Firmwares + Modems – Download
    Android 7.1.1 OxygenOS:
    – Firmwares + Modems – Download
    Open Beta:
    – Firmwares + Modems – Download
    Android 8.0.0 OxygenOS:
    – Firmwares + Modems – Download
    Open Beta:
    – Firmwares + Modems – Download
  8. Do not reboot after flashing one of the above files – you must now flash the boot-patched.img file from the Downloads section at the beginning of this guide.
  9. Now you can reboot, and the DM-Verity message should be completely gone.
Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

How to Disable DM-Verity Force Encryption on OnePlus 3T

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested