[RECOVERY][lavender][UNOFFICIAL] TWRP touch recovery for Redmi Note 7

Search This thread

thelazyindian

Senior Member
Jun 3, 2016
92
424
Puri
https%3A%2F%2Fimg.xda-cdn.com%2FpSvihPyfhapF9LoHqaNVoQ9y7kw%3D%2Fhttp%253A%252F%252Flh3.googleusercontent.com%252F2HtVAF5zfNMlmKhF0QYqCSr1rsstB1btNfdKl7WvGTcZkOSKCYNxdXwsSizx9VhiPg%253Dw300

Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. It's a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

Code:
#include <std_disclaimer.h>

/*
 * Your warranty is now void.
 *
 * We are not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at us for messing up your device, we will laugh at you.
 *
 */

Features:
  • All function in a normal TWRP
  • Multi-language support
  • Supports MTP
  • Support decrypt /data!

Install guide:
1. Install fastboot tools from google's sdk on your PC
2. Enter fastboot mode
3. Unlock your bootloader
4. Run "fastboot flash recovery recovery.img" in command line
5. Reboot and enjoy it

Download:
https://drive.google.com/uc?id=1rp_cgVuk6fsRybN0wDoOTbt_Pc-vOiHx&export=download

Source code:
https://github.com/omnirom/android_bootable_recovery
https://github.com/thelazyindian/android_device_xiaomi_lavender-twrp

Note:
  • Due to a bug in android pie, the recovery may ask for pattern if you have set PIN/password for encryption (and vice-versa). Unfortunately, to fix this you need to format your data partition and ask the developer of ROM to include this commit.
  • When you flash twrp for the first time in MIUI you need to goto Wipe > Format Data otherwise you won't be able to boot to system as it will ask for password.
  • GAPPS FIX: In TWRP, goto Mount > system_root and try reflashing.

FAQ:
How is it different from other TWRPs available for lavender ?
This build uses standalone decryption which is better than the recoveries using vold decrypt as vold decrypt will fail if system ROM is corrupt or wiped

Credits:
Huge thanks to @abhishek987 and @vasishath for helping
@tufadorin @faraz shafi (For testing)
 
Last edited:

jimgsey

Member
Jul 3, 2017
39
158
It works well. Just one detail. You can not see the clock, because it appears in the same place as the camera.
Thank you for everything.
 

Enddo

Senior Member
Oct 31, 2013
1,994
850
Atlanta, Ga.
www.AndroidExplained.com
Can you install official miui ota zip after installing twrp and magisk?
Would it brick the device?

It won't brick the device, but no you can't install them.
The update will just fail and reboot you back into MIUI. Everything working as usual.

If you want TWRP/Magisk installed and get updates then you'll have to manually download the 'Recovery ROM' to the update you want to update to. Then flash it in TWRP like you would a custom ROM.
You'll want to reinstall Magisk after you flash the Recovery ROM to get root back.

TWRP remains intact
 

vkmcondor

Senior Member
Feb 7, 2015
81
5
Xiaomi Redmi Note 7
It won't brick the device, but no you can't install them.
The update will just fail and reboot you back into MIUI. Everything working as usual.

If you want TWRP/Magisk installed and get updates then you'll have to manually download the 'Recovery ROM' to the update you want to update to. Then flash it in TWRP like you would a custom ROM.
You'll want to reinstall Magisk after you flash the Recovery ROM to get root back.

TWRP remains intact
Do I need to format or wipe data?
 

majo3000

Senior Member
Dec 14, 2007
81
23
strange behaviour: TWRP is asking for pattern decryption when PIN is used and vice versa.

Decryption via command line works fine.

same happend to me.can you explain how you fixed it via commandline ? i have to wipe phone and flashed successfully Xiaomi.eu rom . i have global device.
also i flashed now Magisk 19.0 .and it works.
much thx for your work admin ?
 
  • Like
Reactions: BIJAN BHANDARI

Diniodoc

Member
Apr 10, 2013
16
4
same happend to me.can you explain how you fixed it via commandline ? i have to wipe phone and flashed successfully Xiaomi.eu rom . i have global device.
also i flashed now Magisk 19.0 .and it works.
much thx for your work admin ?

I did not fix it, but you can decrypt your /data via terminal in TWRP : "twrp decrypt PIN"

But I didn't understand you, are you still facing that problem or did you solved it by reflashing MIUI?
 
  • Like
Reactions: samarium

thelazyindian

Senior Member
Jun 3, 2016
92
424
Puri
strange behaviour: TWRP is asking for pattern decryption when PIN is used and vice versa.

Decryption via command line works fine.

Due to a bug in android pie, the recovery may ask for pattern if you have set PIN/password for encryption (and vice-versa). Unfortunately, to fix this you need to format your data partition and ask the developer of ROM to include this commit.

Updated in OP
 

majo3000

Senior Member
Dec 14, 2007
81
23
I did not fix it, but you can decrypt your /data via terminal in TWRP : "twrp decrypt PIN"

But I didn't understand you, are you still facing that problem or did you solved it by reflashing MIUI?

i was first on original rom.then i flashed TWRP from here.after reboot i hang on screen were i have to enter password to access android.so i never have set a password and tryed mi Pin and miui Account password...but none pin was acceptet.
then i wiped data ...reboot ...but android doesnt load.
so i flashed xuaomi.eu Rom . after flashing it .the phone startet succesfully....
the thing is.... i never entered a pin or password to dercrypt my device....and what helped was wipe and flash rom .... greatz..
 

Diniodoc

Member
Apr 10, 2013
16
4
Due to a bug in android pie, the recovery may ask for pattern if you have set PIN/password for encryption (and vice-versa). Unfortunately, to fix this you need to format your data partition and ask the developer of ROM to include this commit.

Updated in OP

Good to know THX. I'm still using original MIUI so I think there is nothing to do than waiting or better use a custom ROM ;)

One more question. Does anybody know if there is the possibility to use a separate password for encryption different from the lock screen? This was possible in earlier versions of Android.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 92
    https%3A%2F%2Fimg.xda-cdn.com%2FpSvihPyfhapF9LoHqaNVoQ9y7kw%3D%2Fhttp%253A%252F%252Flh3.googleusercontent.com%252F2HtVAF5zfNMlmKhF0QYqCSr1rsstB1btNfdKl7WvGTcZkOSKCYNxdXwsSizx9VhiPg%253Dw300

    Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. It's a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

    Code:
    #include <std_disclaimer.h>
    
    /*
     * Your warranty is now void.
     *
     * We are not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at us for messing up your device, we will laugh at you.
     *
     */

    Features:
    • All function in a normal TWRP
    • Multi-language support
    • Supports MTP
    • Support decrypt /data!

    Install guide:
    1. Install fastboot tools from google's sdk on your PC
    2. Enter fastboot mode
    3. Unlock your bootloader
    4. Run "fastboot flash recovery recovery.img" in command line
    5. Reboot and enjoy it

    Download:
    https://drive.google.com/uc?id=1rp_cgVuk6fsRybN0wDoOTbt_Pc-vOiHx&export=download

    Source code:
    https://github.com/omnirom/android_bootable_recovery
    https://github.com/thelazyindian/android_device_xiaomi_lavender-twrp

    Note:
    • Due to a bug in android pie, the recovery may ask for pattern if you have set PIN/password for encryption (and vice-versa). Unfortunately, to fix this you need to format your data partition and ask the developer of ROM to include this commit.
    • When you flash twrp for the first time in MIUI you need to goto Wipe > Format Data otherwise you won't be able to boot to system as it will ask for password.
    • GAPPS FIX: In TWRP, goto Mount > system_root and try reflashing.

    FAQ:
    How is it different from other TWRPs available for lavender ?
    This build uses standalone decryption which is better than the recoveries using vold decrypt as vold decrypt will fail if system ROM is corrupt or wiped

    Credits:
    Huge thanks to @abhishek987 and @vasishath for helping
    @tufadorin @faraz shafi (For testing)
    9
    Changelog:

    Build 03/05/19:
    • Add offset for notch
    • Updated prebuilt kernel built from source
    • Option to mount system as system_root to fix GAPPS flash error
    • Enable /vendor wipe option

    Links updated in OP
    6
    If you flashed TWRP, but you can't get into the TWRP recovery screen, this is for you:
    I was having the same issue, but this phone is tricky.
    Just DON'T USE fastboot boot recovery.img

    1. Boot into Fastboot screen
    2. fastboot flash recovery recovery.img
    3. Check if flashed ok in the cmd prompt and remove the usb cable while the fastboot screen is on
    4. Keep pressed Volume UP + POWER until the phone reboots - after the first vibration, remove your finger from power button, but keep Volume UP.
    5. You should boot into TWRP screen.

    If you use "fastboot boot recovery.img" - the old recovery from gets back - DON'T USE IT

    Well, at least that's how it worked for me on two Redmi Note 7 lavender (64gb rom/4gb ram).
    4
    Can you install official miui ota zip after installing twrp and magisk?
    Would it brick the device?

    It won't brick the device, but no you can't install them.
    The update will just fail and reboot you back into MIUI. Everything working as usual.

    If you want TWRP/Magisk installed and get updates then you'll have to manually download the 'Recovery ROM' to the update you want to update to. Then flash it in TWRP like you would a custom ROM.
    You'll want to reinstall Magisk after you flash the Recovery ROM to get root back.

    TWRP remains intact