[Recovery][EMUI 8.x][Huawei P10 Lite][Unofficial]TWRP 3.2.1-0 [28/04/2018]

Pretoriano80

Senior Member
Jun 9, 2010
3,187
2,873
253
Disclaimer
This software comes wth 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 [filename].img --> ex: fastboot flash recovery_ramdisk twrp_p10_lite_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
MTP and OTG connection = working
Backup&Restore = working


Note: There are no sources for this yet,because is based on the work of @zxz0O0 ,from Honor 9.

Contributors
**** Pretoriano80
**** @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.
**** @Tecalote - He was the main tester for the Mate 9
**** @Blackball
**** @Eurofighter_ty for testing on P10 Lite
**** Team OpenKirin - thanks for the "Oem Path wipe esclusion" code

Download links
twrp_p10_lite_0.1.img - initial release,OTG connection not working
twrp_p10_lite_0.2.img - minor fixes,OTG connection should be fixed (please test and report)
twrp_p10_lite_0.3.img - OTG is now fixed
twrp_p10_lite_0.4.img - fixed mount issues
 
Last edited:

Aalesund

Senior Member
Jul 22, 2014
131
72
48
Why after entering into TWRP I got "Mount Decrypt Data" menu and ask me for some password? What is this?
Then I press Cancel because I don't know what is this menu.
Also I can't make any backups because I got an error: "Failed to unmount '/data' (device or resource busy)" and "Failed to unmount '/system' (device or resource busy)"
Something is wrong with this TWRP.
 

Pretoriano80

Senior Member
Jun 9, 2010
3,187
2,873
253
Why after entering into TWRP I got "Mount Decrypt Data" menu and ask me for some password? What is this?
Then I press Cancel because I don't know what is this menu.
Also I can't make any backups because I got an error: "Failed to unmount '/data' (device or resource busy)" and "Failed to unmount '/system' (device or resource busy)"
Something is wrong with this TWRP.
Obviously it's asking for password, otherwise it couldn't decrypt the internal storage.
You have to use the same password/pin/pattern that you use in Android.
 

naruto1995

Member
Mar 5, 2018
9
0
0
The feature Internal Storage Decryption is really cool!
And this TWRP has better compatibility with magisk, at last I can use recovery mode for mm.
Thanks!
 

AndyYan

Recognized Contributor
Jan 30, 2012
4,229
3,388
253
Beijing
The problem of not being able to unmount /system means that it'll always be mount read-only, which then means unless a whole system image is flashed, no modifications can be made to /system. This is the only gripe I have about this TWRP; otherwise it works brilliantly.
 
  • Like
Reactions: Tecalote

Tecalote

Senior Member
Aug 6, 2015
4,078
3,109
253
Leipzig
The problem of not being able to unmount /system means that it'll always be mount read-only, which then means unless a whole system image is flashed, no modifications can be made to /system. This is the only gripe I have about this TWRP; otherwise it works brilliantly.
Yes, that's right - I saw the issue with keeping system ready only yesterday night on Huawei Mate 10 Lite.
This TWRP works except this also brilliantly on Mate 10 Lite :)
 

dlewando

Senior Member
Jan 4, 2011
323
106
73
i tried to flash my emui 5 p10lite with no success:
#
Code:
fastboot flash recovery_ramdisk ./twrp_p10_lite_0.3.img
target reported max download size of 471859200 bytes
sending 'recovery_ramdisk' (24952 KB)...
OKAY [ 3.186s]
writing 'recovery_ramdisk'...
FAILED (remote: partition length get error)
finished. total time: 3.194s
 
  • Like
Reactions: DarthVader

Eurofighter_ty

Senior Member
Jul 3, 2014
1,184
1,554
0
Bucharest
i tried to flash my emui 5 p10lite with no success:
#
Code:
fastboot flash recovery_ramdisk ./twrp_p10_lite_0.3.img
target reported max download size of 471859200 bytes
sending 'recovery_ramdisk' (24952 KB)...
OKAY [ 3.186s]
writing 'recovery_ramdisk'...
FAILED (remote: partition length get error)
finished. total time: 3.194s
It only works on EMUI 8.
 

AndyYan

Recognized Contributor
Jan 30, 2012
4,229
3,388
253
Beijing
Just had a quick look, which device you were using to get the logs, it doesn't seem to be a Honor 7x?!
Weird, I didn't have another device at hand when I was taking the logs, I'm fairly certain that it's from my 7X. I do see it mention this in the recovery.log:
Code:
persist.radio.current_version=BND-AL10 8.0.0.331(C00)
I captured logs again just in case.

I was on Oreo beta B331 and am now on LineageOS Treble GSI, if that matters.
 

Attachments

Pretoriano80

Senior Member
Jun 9, 2010
3,187
2,873
253
Weird, I didn't have another device at hand when I was taking the logs, I'm fairly certain that it's from my 7X. I do see it mention this in the recovery.log:

I captured logs again just in case.

I was on Oreo beta B331 and am now on LineageOS Treble GSI, if that matters.
As far as i can see, your device is not encrypted! Also, custom roms are not supported yet. I will have a look later, after work, but loke i said, from logs is seems that your storage is not encrypted.
 

AndyYan

Recognized Contributor
Jan 30, 2012
4,229
3,388
253
Beijing
As far as i can see, your device is not encrypted! Also, custom roms are not supported yet. I will have a look later, after work, but loke i said, from logs is seems that your storage is not encrypted.
Yes, I have modified fstab in vendor to disable storage encryption on /data (various reasons); I don't see how that's related to not being able to mount /system properly, however.
Probably the other guy who reported a similar problem would be able to get you the "clean" logs you need.
 

Pretoriano80

Senior Member
Jun 9, 2010
3,187
2,873
253
Yes, I have modified fstab in vendor to disable storage encryption on /data (various reasons); I don't see how that's related to not being able to mount /system properly, however.
Probably the other guy who reported a similar problem would be able to get you the "clean" logs you need.
I already know why it's happening in your case, the cause being the unencrypted storage. This TWRP was especially created to support encryption, otherwise there's already official TWRP without encryption support.
However, your logs are still useful! ?
 
  • Like
Reactions: adeii

AndyYan

Recognized Contributor
Jan 30, 2012
4,229
3,388
253
Beijing
I already know why it's happening in your case, the cause being the unencrypted storage. This TWRP was especially created to support encryption, otherwise there's already official TWRP without encryption support.
However, your logs are still useful!
Pardon me, but which official? I don't see 7X / P10Lite / M10Lite on official TWRP site.
 

Pretoriano80

Senior Member
Jun 9, 2010
3,187
2,873
253
Pardon me, but which official? I don't see 7X / P10Lite / M10Lite on official TWRP site.
Oh, my bad, i thought someone already ported TWRP from Mate 10 Pro.
I might be able to fix system unmount issue with unencrypted devices, but i will need your help with testing cause i only have a Mate 10 Pro and it's encrypted. The best solution would be to add a workaround in the current version without building a new one for unencrypted devices.
 

Tecalote

Senior Member
Aug 6, 2015
4,078
3,109
253
Leipzig
Oh, my bad, i thought someone already ported TWRP from Mate 10 Pro.
I might be able to fix system unmount issue with unencrypted devices, but i will need your help with testing cause i only have a Mate 10 Pro and it's encrypted. The best solution would be to add a workaround in the current version without building a new one for unencrypted devices.
I had for some days Mate 10 Lite - rebranded it from c432 to c185 on Android 7 (cause there was not Oreo-Update available for c432) and updated the phone to Oreo with Nocheck Recovery. I tested your TWRP for P10 Lite for Mate 10 Lite - on Stock its working pretty good. I had not any issues.
The owner of the phone like to have a Stock based Custom Rom, I flashed it and tested 3 different TWRPs.
The Dev of the Rom made one, but it does not working properly - Backup /restore without data is only possible on internal storage, no permission to external SD.... Same with two others.

Your TWRP had only issues with data (cause of the modified vendor/etc/fstab.hi6250 - avb and encryption disabled) and issues with system mount/unmount on Custom Rom. But on Stock Rom no issues.
Here are some Logs (from your TWRP). I had not time before to post it :)
 

Attachments

Last edited:
  • Like
Reactions: Pretoriano80