[Recovery][P20][Unofficial]TWRP 3.2.1-0 [16/04/2018]

Pretoriano80

Senior Member
Jun 9, 2010
3,187
2,873
253
Disclaimer
This software comes with no warranty,XDA staff ,myself or TeamWin stuff can't be hold responsible for any damage it may cause to your device.

Note: Currently Oreo 8.1 custom roms are not supported,only stock EMUI 8.x .

Download and Installation

* Download twrp recovery
* Start your device in fastboot mode
* Install the recovery using the following command:

Code:
fastboot flash recovery_ramdisk [name of the file].img --> ex: fastboot flash recovery_ramdisk twrp_p20_0.1.img
* Restart with this command:
Code:
fastboot reboot
* As soon as you execute the restart command,remove the USB cable and keep pressing Volume UP,so the device will boot to TWRP.This is to avoid that the device boot to OS,overwritting TWRP recovery.

Features

Internal storage decryption = working (If decryption with pin/password fails, remove the security (pin, pass, fingerprint) before booting to TWRP and it should decrypt just fine )
MTP and OTG connection = working
Backup&Restore = working


Note: This was tested only by few P20 owners,so if you test it,please report back!There are no sources for this yet,because is based on the work of @zxz0O0 ,from Honor 9 forum.

Credits
**** @zxz0O0 - This wouldn't be possible without this guy,so big big thank to him.I used his base to make this recovery work ,so in sign of respect his nick will also be on the TWRP boot screen.Thank again buddy!
**** TeamWin project ,obviously.

Download links

twrp_p20_0.1.img - Decryption support (you can use the same password/pin/pattern to decrypt in TWRP), /recovery_ramdisk not available for backup./vendor not available for backup (use /vendor_image instead)
 
Last edited:

Marnux

Member
Jul 30, 2008
33
12
0
I'm running into trouble when trying to resize the system partition.

Failed to unmount '/system' (Device or resource busy)
...
Repairing System before resizing.
Repairing System using e2fsck...
/sbin/e2fsck -fp /dev/block/sdd59 process ended with
ERROR: 8
Unable to repair System.

I guess the inability to unmount causes this. Does anyone have suggestions as to why it's happening and how to fix it?
Tried searching, but couldn't find anything useful so far.

Found some TWRP bug reports for different devices about this, maybe that's a possible direction to look into.
 
Last edited:
  • Like
Reactions: glaet

Marnux

Member
Jul 30, 2008
33
12
0
After some more investigation it seems that the the aptouch_daemon for TWRP is running from the system partition.
395 root 18092 S /system/vendor/bin/aptouch_daemon
When i kill the process, the command: e2fsck -fp /dev/block/sdd59 during resizing seems to work. The touch interface goes dead at that point, so can't test if the resize would work as i can't select it. The openrecoveryscripts only allow wiping of partitions it seems.
I did find multiple locations where the aptouch_deamon executable is stored:
/system/vendor/bin
/vendor/bin
I checked if it were links, but they don't appear to be.
There are some aptouch_daemon.rc files, that say to start from /system/vendor/bin/aptouch_deamon. I have changed the ones i found to remove the system directory, but on rebooting it stills loads the executable from /system/...
That's the stuff i figured out, which seems the main cause for the issue with the system partition. I'm not familiar with the code or build mechanism, so hopefully this gives you some information and an idea to fix it @Pretoriano80
If there is a git specific for this build, i'm willing to check if i can help with fixing this. Just not sure if i'm able to figure the system out quickly.
 
Last edited: