[RECOVERY][UNOFFICIAL] TWRP 3.2.1-0 for Mate 20 X aka Everest (EVR-AL00/EVR-L29)

freeza

Recognized Developer
May 28, 2006
5,326
14,128
263
Pasadena, CA
www.freeza-inc.com
Below you'll find an unofficial semi-bootleg version of TWRP for the Mate 20 X. I say bootleg because I took @Pretoriano80's P10 lite build and modified it for our devices.

Credits: teamwin, @Pretoriano80, @ante0
Testers: @cflynt

Download: Download TWRP for Mate 20 X

Installation guide:

Welcome to the TWRP installation guide for the Mate 20 X. Keep in mind that installing this REQUIRES you to format your data and remove encryption in order for TWRP to read your /data partition and be able to create backups, so backing up your internal storage is recommended if you want to keep anything from it. This will factory reset your device as well.

Flashing TWRP to the eRecovery ramdisk partition is recommended as it allows you to have both Magisk root and TWRP simultaneously. Otherwise, you can flash between Magisk and TWRP when you need it by flashing this image to recovery_ramdisk. This guide will focus on eRecovery installation.

Magisk root and ADB/a terminal app is REQUIRED for the installation of TWRP as fastboot does not allow flashing of erecovery_ramdisk partition.

Backing up your original eRecovery:
The easiest way to accomplish this is to download "partitions backup & restore" from the google play store, and using that app to back up "erecovery_ramdisk." However, you can also accomplish this with adb by running the command "dd if=/dev/block/bootdevice/by-name/erecovery_ramdisk of=/sdcard/erecovery_ramdisk_stock.img" with your device hooked up to a computer. If you are backing up your internal storage, do it after creating this backup. Otherwise, copy this backup to a safe location on your computer.

Booting to TWRP: Booting into TWRP requires a different button combination.
-Booting to TWRP is as simple as getting to the standard boot splash "corruption" screen. When you see this, it will be followed by instructions to hold volume UP for three seconds. Doing this will boot you into TWRP or eRecovery, depending on which one you have installed. With the phone connected to a power source, USB or AC, reboot/boot the phone holding volume UP. Once the standard corruption screen is displayed, release and hold the volume UP key again.

Booting to Magisk root:
-Booting to Magisk root requires the same volume UP key combination, but the phone must NOT be connected to a power source (USB or AC), OR you must use the "adb reboot recovery" command. Reboot/boot the device holding volume UP. This will display the standart boot splash "corruption" screen but will NOT show the standard instructions for booting into eRecovery. It will simply show a "your device is booting" message under the "corruption" message.

Booting to Magisk root from TWRP: the Reboot>Recovery option in TWRP does NOT reboot the device back into TWRP. This is used to boot Magisk root.
-From TWRP, tap the Reboot button followed by Recovery. Normally, the device would boot back into TWRP, but since TWRP is installed to the eRecovery partition and Magisk is installed to the normal recovery partition, it reboots to Magisk root instead.

Booting back into TWRP from TWRP: Using the Reboot>System option in TWRP will get you back to the standard corruption boot splash screen where you can use the "Booting into TWRP" instructions above to get back into TWRP.
-From TWRP, tap the Reboot button followed by System. This will reboot the device normally, giving you the standard corruption screen followed by a normal boot WITHOUT Magisk root. Use this option only if you plan on rebooting back into TWRP with the "Booting into TWRP" instructions above. Otherwise, use the Reboot>Recovery option to get you back into a rooted system.

Modifying system from TWRP: This device uses "System as root" file structure, so it's a bit different to modify system from TWRP.
-Go to the mount option in twrp and mount "System_root" From here, you'll need to browse /system_root NOT /system in order to make changes to system.



*******************INSTALLING TWRP TO ERECOVERY*******************

Flashing TWRP to eRecovery ramdisk:
-Hook your phone up to a PC.

Step 1.
Start by copying the TWRP image to your internal storage OR nm card. Rename it to "twrp.img" to make typing the next command easier.

Step 2.
Using ADB or a terminal app, gain SU access and run the following command: "dd if=/sdcard/twrp.img of=/dev/block/bootdevice/by-name/erecovery_ramdisk"

Step 3.
Reboot your phone into TWRP by following the "Booting to TWRP" instructions above.

Step 4.
Once you are in TWRP, you will need to format data, as TWRP cannot read encrypted storage on this device yet. Do this in the "wipe" "Format Data" section of TWRP.

Step 5.
Once data is formatted, copy the fstab.kirin980 file from this package to your internal storage or nm card.

Step 6.
Go to "mount" in twrp, and mount Vendor.

Step 7.
Use TWRP file manager in the "advanced" section of TWRP to copy fstab.kirin980 from your internal storage or nm card to /vendor/etc. This will overwrite the original fstab.kirin980 file and replace it with our modified one removing forced encryption so that the system won't try and re-encrypt your device on boot.

Step 8.
Reboot>Recovery to get back into a rooted system, which is now factory resetted.

DO NOT USE ANY OF THE TWRP SUGGESTIONS TO INSTALL ROOT TO YOUR SYSTEM. Disable the notice to install root by going into TWRP settings and unchecking the relevant box.
 
Last edited:

n1tro

Senior Member
Aug 14, 2007
553
132
0
Can you expand on step 2...
"Using ADB or a terminal app, gain SU access..."

How does one "gain" SU access? Opening a terminal app on the phone and entering SU in command prompt comes back with permission denied even though I am booted under the previous root method.
 

freeza

Recognized Developer
May 28, 2006
5,326
14,128
263
Pasadena, CA
www.freeza-inc.com
Can you expand on step 2...
"Using ADB or a terminal app, gain SU access..."

How does one "gain" SU access? Opening a terminal app on the phone and entering SU in command prompt comes back with permission denied even though I am booted under the previous root method.
Are you sure you're booted with magisk root? If so, open the magisk manager and go to > superuser and make sure shell is allowed for root. If you're using a terminal app, then make sure that's allowed.

Sent from my EVR-AL00 using Tapatalk
 

n1tro

Senior Member
Aug 14, 2007
553
132
0
Are you sure you're booted with magisk root? If so, open the magisk manager and go to > superuser and make sure shell is allowed for root. If you're using a terminal app, then make sure that's allowed.

Sent from my EVR-AL00 using Tapatalk
Took a few tries typing in SU before it triggered the Magisk Grant Permission prompt to come up. I granted permission. But entering in the command gives me a permission denied.
 

freeza

Recognized Developer
May 28, 2006
5,326
14,128
263
Pasadena, CA
www.freeza-inc.com
Attached screenshot
You want to use app launcher in phone manager or battery settings to turn off emui optimization of magisk manager so it'll be allowed to run in the background to prompt for su. Also try entering just su in the terminal first to get the # prompt instead of $, then enter the dd command

Sent from my EVR-AL00 using Tapatalk
 

n1tro

Senior Member
Aug 14, 2007
553
132
0
You want to use app launcher in phone manager or battery settings to turn off emui optimization of magisk manager so it'll be allowed to run in the background to prompt for su. Also try entering just su in the terminal first to get the # prompt instead of $, then enter the dd command

Sent from my EVR-AL00 using Tapatalk
Seems not all terminal apps are created equal. Even with permissions enabled, issuing the SU command did bring it to a # prompt but kept it at $.

Downloaded and installed Material Terminal from the playstore and it works.
 
  • Like
Reactions: freeza

n1tro

Senior Member
Aug 14, 2007
553
132
0
Glad you got it sorted [emoji16]

Sent from my EVR-AL00 using Tapatalk
1 problem cleared, another one starts.

I followed the instructions wiping the data and copying the 1 file over under the vendor directory. Phone boots up in setup menu. I go through everything (skipping setting up wifi) and when I finish selecting to use gestures or nav buttons, the phone goes back to the beginning of the setup screen.

Guess, I will try to wipe everything and load the custom rom you guys made
 
Last edited:

cflynt

Senior Member
Oct 19, 2008
124
69
0
1 problem cleared, another one starts.

I followed the instructions wiping the data and copying the 1 file over under the vendor directory. Phone boots up in setup menu. I go through everything (skipping setting up wifi) and when I finish selecting to use gestures or nav buttons, the phone goes back to the beginning of the setup screen.

Guess, I will try to wipe everything and load the custom rom you guys made
When you wiped data, did you do it from the WIPE screen in TWRP and select Format Data? Should prompt you to type in YES when you do so. Otherwise if you are doing an ADVANCED WIPE it is only formatting data without the Media part. YOU MUST get this part right and then copy over that new fstab.kirin980 file using the TWRP File Manager. If you didn't get this right then your Data Partition will still be encrypted.

Hope that helps.

Chad
 
  • Like
Reactions: freeza

n1tro

Senior Member
Aug 14, 2007
553
132
0
When you wiped data, did you do it from the WIPE screen in TWRP and select Format Data? Should prompt you to type in YES when you do so. Otherwise if you are doing an ADVANCED WIPE it is only formatting data without the Media part. YOU MUST get this part right and then copy over that new fstab.kirin980 file using the TWRP File Manager. If you didn't get this right then your Data Partition will still be encrypted.

Hope that helps.

Chad
I wiped the data from the main screen and got a prompt to type YES to continue. I think the setup screen loop issue is coming from all the Huawei stuff I got rid of using the adb procedure in the other thread. Maybe I got rid of some 1st time setup file. In any rate, I got the custom ROM you guys made and installed it and everything works again.
 

n1tro

Senior Member
Aug 14, 2007
553
132
0
How did your set it? The typical lcd_density didn't trigger anything for me.
It's in a messed up location. Go and edit the local.prop file located in /product/etc/prop pathway. That's the only thing that needs to be set. All the other files and locations are red herrings.
 

ben63vw

Senior Member
Oct 2, 2010
194
55
58