TWRP for Nougat? - Huawei P9 Plus Questions & Answers

Is there any TWRP img available that can be used on EMUI5/Android Nougat on P9 Plus? I am on VIE-AL10 and all the ones I found doesn't seem to be compatible with EMUI 5. When I flash them to recovery2 and tried to hold Volume Up while booting, all I get is Your Device is booting now and it doesn't actually go to the recovery.
If there is any other recovery image that might work with Nougat I am willing to give it a try too. Or even better, if there is any way I can install SuperSu without recovery since that's pretty much all I need the recovery for.

So as mine, and I cannot clear my phone, factory reset since I tried flashing marshmallow TWRP. I wanna clear all the Chinese apps and contacts on my phone, so I need TWRP and root

I am in the same situation...
Maybe edit system.img to include SuperSu?

pan.baidu.com/s/1nuIjxYp

Related

TWRP wont flash for nougat or oreo (SOLVED)

So I've been having lots of problems, it all started trying to upgrade to oreo from nougat and I got stuck part way with trying to install recoveries and missing the _ramdisk part. So then I think I was stuck somewhere in-between nougat and oreo and @Jannomag has been a huge help trying to push the device towards Oreo. You can see the thread where that begun here (https://forum.xda-developers.com/p1...-partition-length-t3766191/page2#post75966617) and Jannomag's guide here (https://forum.xda-developers.com/showpost.php?p=75760807).
After that as going to oreo wasn't working I looked into maybe trying to roll back to nougat as TWRP 3.2.1 was working. I have followed this guide as best I could (https://forum.xda-developers.com/p10/how-to/guide-to-rollback-huawei-p10-oreo-to-t3735156) and got to the end where you install the update let the phone reboot to huawei recovery to install the update. However the update got to 6% in verifying update and failed. At this point I tried to reflash twrp from fastboot. That seemed to flash fine however when I reboot the phone to recovery (vol-Up + pwr) it boots to the huawei recovery menu with reboot/wipe data/wipe cache options. I have tried flashing both twrp 3.2.1 3.1.1 and 3.0.1 and even reflashing the stock recovery before these from the file linked in the rollback guide that HWOTA8 uses (MHA_RECOVERY8_NoCheck.img)
Any ideas for fixes this are appreciated,
Thanks
Edit: Solved using DC-phoenix

[Recovery][BKL][EMUI 8.x][Unofficial]TWRP 3.2.1-0 working recovery from View 10

Backup your stock recovery per this post. If you are too lazy, I can upload my backup from .104 build (C432) to Mega.
Download twrp_bkl_0.7.img from this post and place it in same directory with your ADB.
After successful backup as precaution disable any locks like pattern/PIN/password/fingerprint, reboot to bootloader (fastboot):
Code:
adb reboot bootloader
Then flash new TWRP recovery:
Code:
fastboot flash recovery_ramdisk twrp_bkl_0.7.img
After successful flash reboot device and immediately after confirming command below unplug USB cable and HOLD and keep holding VOLUME UP button, if you won't the new recovery will be overwritten by stock and you can try again.
Code:
fastboot reboot
Tested by myself on Honor 10 8.1.0.104 (C432) with unlocked bootloader and installed already Magisk 16.4 with Magisk manager 5.7.0, Magisk ramdisk persisted after installing TWRP recovery, system boots normal.
Next step after unlocking BL, installing Magisk, installing TWRP recovery -> flashing GSI AOSP, LOS or RR. Only reason I bothered with installing TWRP was that GSI image of LOS and RR don't include opengapps, only AOSP does, so without TWRP you can't have opengapps with these two GSI ROMS.
PeterMarkoff said:
Backup your stock recovery per this post. If you are too lazy, I can upload my backup from .104 build (C432) to Mega.
Download twrp_bkl_0.7.img from this post and place it in same directory with your ADB.
After successful backup as precaution disable any locks like pattern/PIN/password/fingerprint, reboot to bootloader (fastboot):
Code:
adb reboot bootloader
Then flash new TWRP recovery:
Code:
fastboot flash recovery_ramdisk twrp_bkl_0.7.img
After successful flash reboot device and immediately after confirming command below unplug USB cable and HOLD and keep holding VOLUME UP button, if you won't the new recovery will be overwritten by stock and you can try again.
Code:
fastboot reboot
Tested by myself on Honor 10 8.1.0.104 (C432) with unlocked bootloader and installed already Magisk 16.4 with Magisk manager 5.7.0, Magisk ramdisk persisted after installing TWRP recovery, system boots normal.
Next step after unlocking BL, installing Magisk, installing TWRP recovery -> flashing GSI AOSP, LOS or RR. Only reason I bothered with installing TWRP was that GSI image of LOS and RR don't include opengapps, only AOSP does, so without TWRP you can't have opengapps with these two GSI ROMS.
Click to expand...
Click to collapse
Nice work. ?
tried to install GSI RR OS, but ending in bootloop, also even after resizing system partition to maximum (TWRP / wipe / resize) opengapps still showing error 70 about insufficient space (which makes no sense, so they really seem to have wrong detection of A/B instead of A for Huawei/Honor devices), though these gzr gapps seem to install successfuly, now if I could figure out the damn bootloop
potential reasons for bootloop - previously installed magisk, wiped also system not only data/cache, installed through fastboot while TWRP there and not only stock recovery, ???
edit: i guess will try flash GSI through TWRP again, quite a waste time to wait each time like 9-10 minutes to find out it can't boot
edit 2: so even flashing through TWRP doesn't help, just stuck on android animation for 10 minutes and then it restarts (and even if you do fatory reset through huawei erecovery it doesnt change anything). maybe can try to restore everything and not wipe system before installing, just factory reset through TWRP (though I remember I read somewhere it's not reliable and it is better to do it through system, but I think that one wipe also internal storage which I wanna avoid)? back to rooted EMUI with TWRP for now, don't have time to try various combinations
edit 3: flashing over TWRP backup without wiping system doesn't help, so it seem it's gonna be magisk or replaced stock recovery i guess, otherwise no idea
BTW the lack of feedback here and trying from other users it's very depressing. they boasted million phone sales and i am the only one in the whole world trying to install TWRP and GSI ROM on this phone?
PeterMarkoff said:
BTW the lack of feedback here and trying from other users it's very depressing. they boasted million phone sales and i am the only one in the whole world trying to install TWRP and GSI ROM on this phone?
Click to expand...
Click to collapse
Don't be disappointed the lack of feedback from users is not many power users have got their hands on this model.
And also we are having different builds.
From the day one I am trying to rebrand my device but no success .
Once I have rebranded to EU I will try and let you know.
Did you flash open gapps nano package through twrp in gsi image?
Did it give you the same error?
tried just pico opengapps as on all phones i flash, that's the smallest, but always end up with error 70 not enough space despite resized system partition in TWRP and many GB available, the other unofficial GZR zero gapps build i mentioned seem to be flashed successful in TWRP, but in any case no luck with booting
PeterMarkoff said:
tried just pico opengapps as on all phones i flash, that's the smallest, but always end up with error 70 not enough space despite resized system partition in TWRP and many GB available, the other unofficial GZR zero gapps build i mentioned seem to be flashed successful in TWRP, but in any case no luck with booting
Click to expand...
Click to collapse
Did you format your phone before trying GSI ?
Try formatting phone and remove some system apps and then flash gapps it will mostly solve the problem.
PeterMarkoff said:
BTW the lack of feedback here and trying from other users it's very depressing. they boasted million phone sales and i am the only one in the whole world trying to install TWRP and GSI ROM on this phone?
Click to expand...
Click to collapse
Don't be upset – e.g. I didn't receive my Honor 10 yet. You won't be the only one for sure, you're just the first one to do it, which is super nice for others because it motivates them to do so as well!
Just wondering: does it make a difference for TWRP wether I own the 6gb or 4gb version?
miststudent2011 said:
Did you format your phone before trying GSI ?
Try formatting phone and remove some system apps and then flash gapps it will mostly solve the problem.
Click to expand...
Click to collapse
I did factory reset (data, both cache) and also wiped system partition, gapps would be the least issue, as I said that GZR should work, but my system doesn't boot, no matter how times I wipe everything through TWRP or stock recovery after flashing system.img, since they say it's normal to hang at first boot and then wipe and then it should boot, but it doesn't work for me. also of course tried to power off phone since some people said it helps to do it after flashing. what I haven't done it's fastboot -w which should be some better wipe. some people say also you should remove magisk ramdisk, though I forgot to back up original, backed up just stock recovery. and also I haven't tried to flash everything with stock recovery, though first flash I did was through fastboot anyway and not through TWRP and it didn't make difference
so last few things left to try:
- fastboot -w for total wipe of data (better than TWRP? though it should be same as Format data in TWRP which wipe everything including internal storage which I wanna avoid since backing up 15GB TWRP backup file it's kinda annoying and my system has problem to do it)
- flash with stock recovery (I have backup, no big deal)
- remove magisk ramdisk and flash with stock ramdisk (forgot to make backup, can't replace)
though I am tired of it for now, spend last night like 4 hours dealing with it until 2AM and I also need to take care of children
vollkornbaguette said:
Don't be upset – e.g. I didn't receive my Honor 10 yet. You won't be the only one for sure, you're just the first one to do it, which is super nice for others because it motivates them to do so as well!
Just wondering: does it make a difference for TWRP wether I own the 6gb or 4gb version?
Click to expand...
Click to collapse
I don't think RAM has something to do with anything, but that sounds like Chinese version since EU has always 4GB and only difference is storage, so you will have different ROM
PeterMarkoff said:
(...)
so last few things left to try:
- fastboot -w for total wipe of data (better than TWRP?)
- flash with stock recovery (I have backup, no big deal)
- remove magisk ramdisk and flash with stock ramdisk (forgot to make backup, can't replace)
Click to expand...
Click to collapse
So I just read more about the GSI/Treble stuff and it said somewhere that modifications like Magisk probably lead to problems with the GSI flash.
Which is why I would try to get rid of the magisk ramdisk first.
I'm not an expert in this at all but maybe this helps.
---
PeterMarkoff said:
I don't think RAM has something to do with anything, but that sounds like Chinese version since EU has always 4GB and only difference is storage, so you will have different ROM
Click to expand...
Click to collapse
Indeed I bought the chinese 6gb RAM Version (hope this won't turn out as a big mistake)
vollkornbaguette said:
So I just read more about the GSI/Treble stuff and it said somewhere that modifications like Magisk probably lead to problems with the GSI flash.
"Your device is free of any heavy modifications such as the
Click to expand...
Click to collapse
yeah, now if someone could extract for me from 0.104 firmware for C432 that stock ramdisk, because I have some problems with mega to download it and I just need the stock ramdisk, nothing else, I have stock recovery backup but forgot to make ramdisk backup
edit: completely forgot there is option to "Completely uninstall" in Magisk manager, so tried it though even after restart with magisk manager missing i could still use root apps, so not sure how exactly this "complete uninstall" works, but anyway giving it a try after this and wiping data, installed system.img again, again wiped, rebooted and as usual loading and loading and nothing, seem can't further continue without copy of stock ramdisk to flash, tried downloading the big update from mega to extract it but it always fail for me to download, same with trying to copy my TWRP backup because for sure ain't gonna doi fastboot -w and setting up everything from scratch in case even this doesn't help, if I knew it works for sure and it will load new system which I will have to set up then no problem, but in this case...
edit 2: tried to replace magisk ramdisk with ramdisk from Honor View 10 BKL09 (same as our working TWRP) but it seem I end up after flashing it, wiping and flashing system.img in TWRP/erecovery bootloop, it's not showing android booting logo like before (but hey at least no need to wait 10 minutes to find it's fail) and either go to huawei ercovery, if I perform factory reset there then it boots to TWRP, but can't boot anywhere else besides these two
pass
I requested this image. Recovery has been established. When I enter the recovery, it requires a password to decrypt the system partition, I enter it (the same after switching on the phone), but a message is displayed that the password is incorrect. help me please.
told you in OP disable all passwords before flashing
PeterMarkoff said:
yeah, now if someone could extract for me from 0.104 firmware for C432 that stock ramdisk, because I have some problems with mega to download it and I just need the stock ramdisk, nothing else, I have stock recovery backup but forgot to make ramdisk backup
edit: completely forgot there is option to "Completely uninstall" in Magisk manager, so tried it though even after restart with magisk manager missing i could still use root apps, so not sure how exactly this "complete uninstall" works, but anyway giving it a try after this and wiping data, installed system.img again, again wiped, rebooted and as usual loading and loading and nothing, seem can't further continue without copy of stock ramdisk to flash, tried downloading the big update from mega to extract it but it always fail for me to download, same with trying to copy my TWRP backup because for sure ain't gonna doi fastboot -w and setting up everything from scratch in case even this doesn't help, if I knew it works for sure and it will load new system which I will have to set up then no problem, but in this case...
edit 2: tried to replace magisk ramdisk with ramdisk from Honor View 10 BKL09 (same as our working TWRP) but it seem I end up after flashing it, wiping and flashing system.img in TWRP/erecovery bootloop, it's not showing android booting logo like before (but hey at least no need to wait 10 minutes to find it's fail) and either go to huawei ercovery, if I perform factory reset there then it boots to TWRP, but can't boot anywhere else besides these two
Click to expand...
Click to collapse
If you want, i have all the files of the C432 update but idk in wich .zip, folder the ramdisk is stored.
I can send on several clouds.
PeterMarkoff said:
told you in OP disable all passwords before flashing
Click to expand...
Click to collapse
Hey did you restore your device are you still struck at boot screen?
If yes try this method.
https://forum.xda-developers.com/huawei-p20/development/rebrand-huawei-p20-eml-l29-eml-l09-t3779283
How to GO back to stock emui(India) after i flash a treble rom? Do i need to backup using some tool?
PLease someone tell me
srharshajava said:
PLease someone tell me
Click to expand...
Click to collapse
The problem is currently we don't have full
ROM to revert to stock and if we brick our device there is no proper way to revert to stock.
Our model even doesn't have SD card support.
Just wait for some time for someone to provide proper way.
When i flash a treble rom, I have a bootloop. I returned back with eRecovery directly on the phone.
miststudent2011 said:
The problem is currently we don't have full
ROM to revert to stock and if we brick our device there is no proper way to revert to stock.
Our model even doesn't have SD card support.
Just wait for some time for someone to provide proper way.
Click to expand...
Click to collapse
We do have a way to download full ROM.
http://pro-teammt.ru/firmware-database/?firmware_model=COL-L29C432
1. Search here for your exact model (change numbers after C432 to find ROM for your phone) and search for your rom version (B104 or B120)
2. Double click on "filelist" on the same row as FullOTA-MF
3. From filelist link menu download update.zip file (it should be really big, like 2+GB)
3. Extract UPDATE.APP file somewhere (eg. Desktop)
4. In settings of HuaweiUpdateExtractor (link: https://forum.xda-developers.com/showthread.php?t=2433454) uncheck "verify header checksum" and open UPDATE.APP
5. Extract any img (Be it ramdisk.img, ramdisk_recovery.img or system.img) file that you need from UPDATE.APP via HuaweiUpdateExtractor
You just got whoole stock rom and img files that you can flash. Tested by myself with flashing back original ramdisk, ramdisk_recovery and system.img and everything worked well.

Bricked P20, TWRP is encrypted. How can I factory reset?

Basically I tried to install a new substratum theme and rebooted. Stuck on a bootloop. Tried going to TWRP but my TWRP is encrypted. I am on stock EMUI. Anywhere I can get around this?
i know some versions of twrp ask you the encryption key so that it can access the files.
Fixed it by flashing stock recovery and doing a full wipe.
So what use is TWRP if this happens and the date is encrypted?
You need to remove all of your lockscreen protection first in order to use TWRP.

Flashing a GSI

So I followed the steps here to get TWRP on my phone and then flash the unofficial lineage OS ali on my motorola g6 and I got it done but it's not booting into the new OS but instead TWRP. How do I get rid of TWRP so that I can use my new system image?
Removing a recovery is always a bad idea and if you want to try a custom ROM you can always go for phussson's treble builds
I myself use AOSP 8.1 [V25] and it seems to be a daily driver material.
Either way if you want to remove TWRP, you can flash the stock recovery via fastboot.
trashprogrammer said:
So I followed the steps here to get TWRP on my phone and then flash the unofficial lineage OS ali on my motorola g6 and I got it done but it's not booting into the new OS but instead TWRP. How do I get rid of TWRP so that I can use my new system image?
Click to expand...
Click to collapse
You might have not cleared the PCB properly when you formatted data. You don't get rid of your recovery. While in TWRP have you tried selecting reboot system. Or reboot bootloader and then in bootloader select start.

Tried to flash twrp. Can't boot into recovery anymore.

Hi i tried to root my P9. I unlocked the bootloader successfully and i can flash the recovery but i can't boot into recovery anymore. I get stuck on "Your device is booting now...". Also i tried to flash twrp onto recovery2 which is often suggested and that didn't help either. What i find weird it that adb doesn't allow me to erase a partition "FAILED: (remote: Command not allowed). Also the phone still works normal and i can use android. I also tried to flash a stock recovery but that still doesn't boot into the recovery. I couldn't find any advice online that would help me further. Hope someone can help me out.
FlxF said:
Hi i tried to root my P9. I unlocked the bootloader successfully and i can flash the recovery but i can't boot into recovery anymore. I get stuck on "Your device is booting now...". Also i tried to flash twrp onto recovery2 which is often suggested and that didn't help either. What i find weird it that adb doesn't allow me to erase a partition "FAILED: (remote: Command not allowed). Also the phone still works normal and i can use android. I also tried to flash a stock recovery but that still doesn't boot into the recovery. I couldn't find any advice online that would help me further. Hope someone can help me out.
Click to expand...
Click to collapse
You probably flashed incorrect TWRP -
you didn't even mention are you on MM (EMUI 4) or N (EMUI 5)
Different TWRP images must be used, but from the corresponding XDA Huawei P9 (MM or N) threads - not something maybe from elswhere on Internet
Also, if it didn't work from Recovery then no chance that it would work from eRecovery (if wrong TWRP, not ported to Huawei P9 and your EMUI version, it will not ecognize partitions and encryption, no matter if flashed to Recovery or eRecovery)
For example, if you didn't spoil also eRecovery, you would be simply able now to (re)Install latest firmware and recovery from eRecovery, and it would fix your stock Recovery
Otherwise, you should flash Recovery and eRecovery (extracted by Huawei Extractor from update.app, unzipped from FullOTA update.zip corresponding to your exact stock firmware and build you have).
Or, reinstall your stock firmware by DLOAD method (FullOTA-MF-PV package must be used for DLOAD)
You can also just flash the correct TWRP (but I strongly recommend to recover the stock eRecovery anyway), find the correct ports for MM, N and O here:
https://forum.xda-developers.com/showpost.php?p=72153575&postcount=2
https://forum.xda-developers.com/showpost.php?p=75787111
https://forum.xda-developers.com/showpost.php?p=77161313&postcount=2
If you are on Nougat, you can also find on XDA (actually, zipped in HWOTA/HWOTA7 packages from links 2 and 3 above) the so-called no-check Recovery, it can replace Recovery (but not eRecovery) img for any EMUI 5 stock firmware)
---
Btw, for Magisk (root), you don't need TWRP. Just install Magisk Manager app and patch your extracted Boot.img (MM and N, on Oreo Ramdisk.img), then flash the patched img from Fastboot
zgfg said:
You probably flashed incorrect TWRP -
you didn't even mention are you on MM (EMUI 4) or N (EMUI 5)
Different TWRP images must be used, but from the corresponding XDA Huawei P9 (MM or N) threads - not something maybe from elswhere on Internet
Click to expand...
Click to collapse
Thanks alot! I was using TWRP img from twrp.me thought it was a offical site. Now i used an image from the forum here and everything works. Thanks alot would have gotten a headache without your help
FlxF said:
Thanks alot! I was using TWRP img from twrp.me thought it was a offical site. Now i used an image from the forum here and everything works. Thanks alot would have gotten a headache without your help
Click to expand...
Click to collapse
TWRP.me (apparently) is the official TWRP site but you can see that they only have one TWRP img file (for each new TWRP release) for Huawei P9 (EVA) - hence they don't care, they are not aware of different organization of partitions (sizes, names and encryption) coming with different EMUI versions.
And from their P9 Changelog (screenshot attached) you can see that last adaptation for P9 was made in May 2016, when P9 had its original Marshmallow (EMUI 4).
Below is XDA thread from 2017 when Nougat (EMUI 5) was released and a guy who ported to (with description of changes he made). TWRP for EMUI 5 I gave you the link in previous answer is based on his port, but made after he stopped maintaining it (he moved off from P9), hence it is still TWRP 3.2.1.0 but with slight change (somebody else fixed/improved I think which partitions are mounted by default and/or what will be erased by Factory reset option - I don't recall details anymore)
https://forum.xda-developers.com/p9/development/twrp-t3565703
Btw, you are not the first who soft-bricked P9 (with Nougat) by installing the 'official' TWRP (you could search here on XDA P9 sub-forum, I recall I similarly helped to two or three of them last year and this year) and who had to move to the proper port from XDA to unbrick - the 'official' TWRP seems to be good only for those who are stuck with Marshmallow / EMUI 4 from 2016 (most likely those who got stuck with the cust c900, 'international' cust at that time, that was never updated by Huawei to Nougat while they introduced new custs for different world regions, countries and operators when they started to sell and support the phone out of China)
It would be fair if TWRP.me at least makes a note on which stock firmware version they test their 'official' P9 releases...

Categories

Resources