Header Ads

How to Install Peter Twrp recovery 3.3.1-6 for Redmi Note 7 Pro (Violet) by PeterCxy (Encrption)

This is the unofficial TWRP recovery for Xiaomi Redmi Note 7 Pro (Violet) by PeterCxy. This ROM is a little bit different from the official Twrp recovery for Violet.

Differences between official Twrp and PeterCxy Twrp for Redmi Note 7 Pro:
  • Supports CAF-based wrappedkey encryption (decryption) properly (tested with MIUI 10.3.5.0)
  • Supports decrypting devices that have screen lock set up after Android 9 May update, which introduced a new key derivation function.
  • Mounts the system partition at /system_root as per AOSP standards. This makes the auto-backup scripts (e.g. GApps / Magisk survival script) work properly during updates, and you no longer need any 'patch' to flash GApps / Magisk properly. However, this may break some existing ROMs. See below FAQ section for details.
  • Appended DTBO to the recovery image so it doesn't depend on the dtbo partition. No standalone DTBO image required.

Requirements:
  • Unlocked bootloader:  check how to unlock bootloader Here
  • Adb/Fastboot Driver: Check download link and guide Here
  • PeterCxy unofficial Twrp Recovery for Violet: Download Here
  • Dm-verity and Forced Encryption Disabler: Download Here.

How to Install:
  • Download the DM verity disabler and copy it to your phone's internal storage.
  • Download the Twrp from the link above and rename it to twrp.img
  • Copy the downloaded twrp image to the adb folder on your computer
  • Reboot your phone to fastboot by holding down the power button and volume down (-) at the same time 
  • connect the phone to your PC 
  • Enter the fastboot command below
                fastboot flash recovery twrp.img
  • After flashing, disconnect your phone and hold both the power button and volume up(+) simultaneously to boot to recovery.
  • Click on install and select the DM verity file.
  • After installing that, reboot to system.
Note:
  • DO NOT try to reboot to recovery by running the command 'fastboot boot recovery.img', as it won't work.
  • You have to format the data partition if and ONLY IF:
            1) You were not encrypted, now going to an encrypted state, or vice-versa OR
            2) You were on a ROM other than MIUI that does not support "wrappedkey"                                         (ROMs would often state it supports wrappedkey if it does), now going to                                              a ROM that supports it
  • The restore zip created by the Migrate app is NOT compatible with this recovery. It's a problem of the Migrate app, not this recovery. Please DO NOT try to flash the restore zip created by Migrate.

Frequently Asked Questions (FAQ):
> Q: Do I need any specific DTBO image to make this recovery working?
- A: Nope. It is appended to the recovery image so it will work with any DTBO.

> Q: What is wrappedkey?
- A: It's a different mode of FBE implemented in CAF, the Qualcomm branch of AOSP.

> Q: This cannot install ROM X, why?
- A: Because it mounts the system partition at /system_root, which is AOSP standard behavior for A-only system_as_root devices, but is broken in some custom ROMs currently (MIUI should work though). 

> Q: Decryption doesn't work with ROM X, why?
- A: Decryption should work for most ROMs based on the CAF branch (not AOSP). CAF ROMs (including official MIUI) use a different scheme for key storage, which is why TWRP hasn't supported it till now. I have ported the CAF encryption changes (wrappedkey) to TWRP, but unfortunately this will break ROMsthat do not support the CAF wrappedkey mode of encryption. 


Credit:

2 comments:

  1. I have a Redmi note 7 pro, I followed your instructions, I unlocked my bootloader and then flashed twrp without rooting my device and then installed pixel experience ROM of September security patch on my device.

    But now when I'm trying to boot to twrp to flash android 10 ROM, TWRP is gone! It's not booting into TWRP at all , it just gets stuck in the Redmi Logo screen.

    ReplyDelete
    Replies
    1. Download Disable_Dm-Verity from this LINK
      Copy it to your phone's internal storage
      Now flash the Twrp recovery again from fastboot and boot directly to recovery from fastboot
      Then install the DM Verity file

      Delete

Powered by Blogger.