yashsingh1/xdaforums huggingface dataset:
[Huawei P9 Guides, News, & Discussion] diegov89:
???

because I can not write a few pages or respond to posts?

I have a p9 with perfect c432b378 firmware in all, I can not install TWRP and take root with Andoid 7.0. can anyone help me out? (of course I unlocked bootloader, I run regularly change from C900 to C432 and had also made root with Android 6.0 but not anymore): confused:: eek:

*sorry for my english
[Huawei P9 Guides, News, & Discussion] zgfg:
Is it really necessary to revert to the stock recovery before DLOAD ( Iwant to upgrade from b378 to b383, but I have TWRP and root)?

Can it be installed from TWRP, or only via fastboot?
[Huawei P9 Guides, News, & Discussion] Atarii:
Yes you need to restore stock recovery for dload, that one should work fine to install with TWRP
[Huawei P9 Guides, News, & Discussion] zgfg:
Thanks for quick replying - you mean, your b378_recovery_extracted.IMG (from the second quote) will be good to recover stock recovery on b378 via TWRP?
[Huawei P9 Guides, News, & Discussion] Atarii:
Yes :)
[Huawei P9 Guides, News, & Discussion] :
[MENTION=4081738]Atarii[/MENTION] create a thread for the modified boot images and let this thread die please
[Huawei P9 Guides, News, & Discussion] Atarii:
Yarp https://xdaforums.com/p9/development/root-pre-rooted-boot-img-p9-nougat-b378-t3574548
[Huawei P9 Guides, News, & Discussion] ogisha:
Delete.
[Huawei P9 Guides, News, & Discussion] zgfg:
The thread (above) says it's deprecated but there is a vivid discussion about TWRP 3.1.0-1, rooting with modified Chainfire's SuperSU and stuff (AdAway, BusyBox, Viper4Android), etc. in:

https://xdaforums.com/p9/development/twrp-t3565703/
[Huawei P9 Guides, News, & Discussion] Gutito:
sorry, posted it wrong thread[/I]
[Huawei P9 Guides, News, & Discussion] Gutito:
Is it possible to unroot and then use MagiskSU or SuperSU instead?

I've been using the phh root and it's been perfect. But recently I tried to install Magisk Manager to mess around with some things, but I found out that it's gonna install another superuser (MagiskSU). So is there a way to unroot p9 without factory restoring it? I'd also like to know before I do anything if it is possible to use a different superuser like Magisk or even SuperSU in the nougat p9 version.
[Huawei P9 Guides, News, & Discussion] scaniathe:
unroot method is flash magisk uninstaller or unsu unroot with factory reset is bootloop
[Huawei P9 Guides, News, & Discussion] richish:
Yea i flashed data fix, but now its to late :(

Maybe u can help

http://xdaforums.com/p9/how-to/hard-brick-l-19-t3507768
[Huawei P9 Guides, News, & Discussion] thel2dab:
Delete ---
[Huawei P9 Guides, News, & Discussion] :
U didn't hard brick did you? You can still bit into recovery or fastboot right?
[Huawei P9 Guides, News, & Discussion] richish:
only in fastboot
[Huawei P9 Guides, News, & Discussion] :
You can flash twrp and boot into it?
[Huawei P9 Guides, News, & Discussion] fabiosinus:
Sorry for my englisch

i habe a Problem i can not start TWRP
[Huawei P9 Guides, News, & Discussion] richish:
No

I tried to flash TWRP for N or MM but phone is not passing bootloader
[Huawei P9 Guides, News, & Discussion] and-roid007:
when you fastboot flash recovery, did it give you successfull message?

and what do you mean phone is not passing bootloader?

note that you must press power button for seconds to exit fastboot.
[Huawei P9 Guides, News, & Discussion] richish:
flashing is sucess

Phone stays at "Phone is unlocked and cam't be trused"screen, with orange marged site.

Whatever i press

3 sec for enter recovery or power button to boot in system its just not passing that screen.

even if i press VOLUP+POWER to boot in recovery its just stay at screen with txt "Your phone is booting now..."
[Huawei P9 Guides, News, & Discussion] and-roid007:
can you put update.app from rollback package in dload folder of external storage and enter forced update mode? (press three button together same time)?
[Huawei P9 Guides, News, & Discussion] richish:
[/COLOR]

3 button cobmination not working.

Phone dont have recovery or it cant acess it

Flashing new one dosent help.
[Huawei P9 Guides, News, & Discussion] :
Did you try flashing stock recovery? Or stock system.img
[Huawei P9 Guides, News, & Discussion] richish:
yes i tried

read this

http://xdaforums.com/p9/how-to/hard-brick-l-19-t3507768
[Huawei P9 Guides, News, & Discussion] :
Is b322 N? Firmware thought it started with 3xx"?

It looks like you're trying to flash M recovery that's why you won't boot.

Try this recovery https://drive.google.com/file/d/0B9gJ44ME0ZkcSFdySTNBeTlZeTA/view it's from N it's what this twrp is based on
[Huawei P9 Guides, News, & Discussion] richish:
Phone booted i reflashed it with DC-Phoenix

THX for help
[Huawei P9 Guides, News, & Discussion] :
Glad you got it booting I've yet to find a way to root

Yet I haven't found a way.
[Huawei P9 Guides, News, & Discussion] richish:
keep it up
[Huawei P9 Guides, News, & Discussion] :
All I see is swapper]isSystemRooted is 1

Haven't checked logs deep enough since I pulled out from phone
[Huawei P9 Guides, News, & Discussion] :
New twrp version

Download in 1st post

Will let u backup.splash2 (why)?

Because it contains boot fail log s. Kms lastlog and more this is good to find why it dies if we have su.img In data and patched boot
[Huawei P9 Guides, News, & Discussion] kep2008:
Many thanks. :good:

Replaced the hosts file, deodex system, made a small mod...

Everything works fine... :o
[Huawei P9 Guides, News, & Discussion] paratox:
could you share the hosts zip you flashed? i don`t like the no root ad blockers because of bad batterylife. the app DNS66 performs better then the most but hosts is always the best way.
[Huawei P9 Guides, News, & Discussion] and-roid007:
i just stuck at bootloop (error 4 when i tried to resize data) and successfully fixed it by shutdown the phone then entering recovery,mount /data (it may not necessary though)then going to wipe=>advanced=>selecting data=>repair=>resize and everything will be ok!(if you face error 127 or 255 ignore it).
[Huawei P9 Guides, News, & Discussion] :
Oh can u share that mod? Looks promising
[Huawei P9 Guides, News, & Discussion] :
If u get stuck at bootloop check if you use a patched kernel
[Huawei P9 Guides, News, & Discussion] kep2008:
https://yadi.sk/d/MYqtaDJXzjpoT

Unfortunately, as you know, apktool does not work with most files from Huawei. :(

Link to files i gave you in PM. Make post and explain everything in English i would be hard... :D
[Huawei P9 Guides, News, & Discussion] and-roid007:
nope; i use stock kernel
[Huawei P9 Guides, News, & Discussion] :
Then you probably need to flash patched boot
[Huawei P9 Guides, News, & Discussion] :
Yeah I know that. Nags about flag size etc. But it might be a way around it I don't know

Also is it for M or N?
[Huawei P9 Guides, News, & Discussion] kep2008:
If you ask about the mod, it is for the N.
[Huawei P9 Guides, News, & Discussion] :
Oh cool

Added some info in OP. Regarding root, also i ain't going to bother jcase, chainfire and others about helping us out, they got too much questions daily anyway u can feel free to try contact em though
[Huawei P9 Guides, News, & Discussion] and-roid007:
i have fixed it without flashing anything...thanks bro.
[Huawei P9 Guides, News, & Discussion] Atarii:
Has anyone got a log of device not booting after trying to install SuperSu?
[Huawei P9 Guides, News, & Discussion] :
Yes I have.
[Huawei P9 Guides, News, & Discussion] Atarii:
Can you upload or PM and I'll have a look (remove any personal info if there's any first)
[Huawei P9 Guides, News, & Discussion] :
https://mega.nz/#!KpQEFRDQ!c4YP5vStSsGiSeGM1yoL7oa5OHno5vIc5k4cgTldIaI
[Huawei P9 Guides, News, & Discussion] :
[MENTION=631273]Chainfire[/MENTION] what can cause the su.img from causing the phone not to boot? Could it be the kernel or that there's another security feature that has to be patched.

Logs tells that we're rooted. I'm not sure if the su.img must be encrypted?

Trying to mount it to various partitions like cust won't make it boot either. Sure it goes past the splash screen but still fails to boot.

[MENTION=2376614]jcase[/MENTION] you might have an idea as well. The system boots properly if you remove the su.img though so the dm-verity doesn't seem to be the issue
[Huawei P9 Guides, News, & Discussion] Atarii:
Thanks!

So looking at the logs, the bootfail when rooted shows:

Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'int android.security.IKeystoreService.exist(java.lang.String, int)' on a null object reference

IKeystoreService could be (among others) related to the keystore missing and/or modem mismatch. There's a couple of routes to try; checking the presence of the keystore - I'm not sure where these are stored in Nougat, they may even be hardware-backed now? They were in /firmware/image or /system/etc/firmware/ so that's a good place to start.

A more risky thing to try could be using an older modem, but I'd rule out the other route first.
[Huawei P9 Guides, News, & Discussion] Atarii:
This may also be of interest: https://www.xda-developers.com/chainfire-releases-supersu-v2-78-sr5-fixing-some-nougat-bugs/
[Huawei P9 Guides, News, & Discussion] kep2008:
Does not work

http://xdaforums.com/showpost.php?p=69861171&postcount=8204
[Huawei P9 Guides, News, & Discussion] :
That's framework related
[Huawei P9 Guides, News, & Discussion] :
New recovery with f2fs support is coming
[Huawei P9 Guides, News, & Discussion] :
Updated twrp in op
[Huawei P9 Guides, News, & Discussion] and-roid007:
should we resize /data every time we flash new version?
[Huawei P9 Guides, News, & Discussion] :
No since data partition is already fixed you can re install the firmware over and over again without resize the data. So it's not needed to. Also the reason why it needed resize was due to my datafix. And it isn't needed since twrp recognise the data partition
[Huawei P9 Guides, News, & Discussion] BadWolfYe:
what the changes you made?, files, etc..., for BOOT TWRP? i installed the twrp of MM but no work (it's for port to P9 Lite... )
[Huawei P9 Guides, News, & Discussion] richish:
So how is your TWRP???

Does installing it u need still need to flash datafix to get TWRP flash zips.

Just asking,beacuse last time i softbricked my phone and had to reflash all.
[Huawei P9 Guides, News, & Discussion] :
U need to replace the M kernel with N

I think if you read the posts in my thread you'll notice what I done but to be more detailed.

Replaced M kernel with nougat one.

Modified fstabs in etc folder to update some partition details.

If you're unsure how the partitions table should be compare it with original N recovery after decompressing both

Modified sbin mount file so it links to system mount instead of using busybox one which will prevent su zip from installing.

Also modified the fstab in root of the ramdisk to add the new blocks.

And last thing for now I can remember is added f2fs files from stock twrp so it's selectable in twrp.

Probably some more changes I don't remember
[Huawei P9 Guides, News, & Discussion] :
Depends on what zip it is
[Huawei P9 Guides, News, & Discussion] chm1989627:
Fixed data so your internal storage is now mountable. [Needs Reflash!]

What's mean of Reflash ?

1.flash twrp first,

2.boot into recovery,

3.flash twrp again?
[Huawei P9 Guides, News, & Discussion] :
That was if you had earlier version which didn't have the data fix in fstab
[Huawei P9 Guides, News, & Discussion] :
For thus who can't boot after modification. Flash supersu system less. Reboot. Let it reboot automatically (due to mount loop issue) then reboot recovery and remove su. Save your kernel for future use.
[Huawei P9 Guides, News, & Discussion] master':
I dont use older twrp for N. If i use last one what am i doing? Only flash last one or need other sometings.
[Huawei P9 Guides, News, & Discussion] richish:
I think u should add this on TOP.

With steps how to do it.
[Huawei P9 Guides, News, & Discussion] richish:
I'm think install stock apks zip with camera, calendar, flashlight etc
[Huawei P9 Guides, News, & Discussion] and-roid007:
i know that this is off-topic question but how can i know about partition table of p9?
[Huawei P9 Guides, News, & Discussion] and-roid007:
@ LastStandingDroid

can we use f2fs on /data partition? or /cust ?
[Huawei P9 Guides, News, & Discussion] :
And you can't use older either.

Yes I'll also add a patched boot.

?

By unpacking stock recovery you'll get them for p9 that it uses. But actually this works for both. I used p9 ported recovery for our device too. Also I assume your partition is the same

/dev/block/platform/hi_mci.0/by-name/ * the star is whatever is in this folder but mainly we use cust, system,data,vendor,producut,oeminfo,boot,recovery. So u won't need much just decompile both recoveries and compare
[Huawei P9 Guides, News, & Discussion] richish:
http://xdaforums.com/p9/development/beta-android-nougat-7-0-emui-5-eva-t3497628

update_data_full_hw_eu.zip
[Huawei P9 Guides, News, & Discussion] :
Root might be achieved soon

edit darn sh fooled me.
[Huawei P9 Guides, News, & Discussion] and-roid007:
can you explain for us how?
[Huawei P9 Guides, News, & Discussion] :
As I said sh fooled me . Due to lack or permission device booted with su image in data folder.
[Huawei P9 Guides, News, & Discussion] duraaraa:
Just to let you know, I've ported TWRP to the Mate 9. I think the architecture is pretty similar. I used the P9 TWRP from TWRP website, and modified the kernel and fstab.

I suppose your phone and my phone, both are un-rootable at present, even with unlocked bootloader. But I'm curious - I have an issue where if I try to flash SuperSU, the phone reboots pretty quickly after the SuperSU puts out the status message about creating space. Do you guys on the P9/Nougat have this issue?
[Huawei P9 Guides, News, & Discussion] richish:
Hello

Installed newest TWRP, but still can't install zip.

Unable to mount /data ( invalid argument)
[Huawei P9 Guides, News, & Discussion] :
Nope since I removed that mount and linked to /system one instead and or my mount is broken.

You haven't used the data fix. And it'll remove all your data on internal storage. So save everything and flash data fix then wipe data partition.

If it doesn't wipe reboot recovery and try again. But make sure to backup everything on your internal storage.
[Huawei P9 Guides, News, & Discussion] :
The reason why it fails is due to kernel or something else.
[Huawei P9 Guides, News, & Discussion] richish:
U typed that there is no need to flash data fix on last build.

Last time when i tried to flash and whipe data. I got error 4, and phone got softbricked. I had to restore all phone.

What is step back if u got bootloop after trying to flash and whipe data?
[Huawei P9 Guides, News, & Discussion] :
Well that was if you already had installed it before. Since someone asked if you needed to re flash data again after update.

But the thing is that I missed is.

If you install data.then wipe and resize you must install a modified boot image. Or this might only rely on system resize.

But after resizing anything and flash anything after you got it working you must have a patched boot. Else your firmware won't boot. This is what I never mentioned before.
[Huawei P9 Guides, News, & Discussion] :
Also afaik you won't need to use the datafix to actually flash files into data partition. The data fix is to actually get twrp to be able to view the data. Not to make things installable to data. You can still flash systemless su and you'll notice that the su.img will be in data folder because you can't remove it unless you flashed the data fix before or wipe factory reset.
[Huawei P9 Guides, News, & Discussion] duraaraa:
I'm sorry, I don't understand. I know our hardware's mounts are a little bit different (Mate 9 has a system_a that needs to be mounted, not a system), but what mount did you remove / fix and how did you do it?
[Huawei P9 Guides, News, & Discussion] :
Look in system/bin of your phone this is what I use. I don't use the busybox related ones. Also thus I use is 6bytes only due to broken so basically it uses system mount feature.
[Huawei P9 Guides, News, & Discussion] duraaraa:
I see! So the problem is busybox's /system/bin perhaps.

I will try using the /system/bin from the original recovery image.
[Huawei P9 Guides, News, & Discussion] BadWolfYe:
what the lines needed for modify boot.img?

and what files need modify?

(for work with unencrypted DATA PARTITION)
[Huawei P9 Guides, News, & Discussion] :
Oh boot.img I think supersu patches the forceencrypt but can't be sure about it.

But recovery is

Instead of dev/block/dm-0 it needs to be set to /dev/block/platform/hi_mci.0/by-name/userdata

For recovery it is
[Huawei P9 Guides, News, & Discussion] :
Well in recovery it is for flashing su since it seems to be breaking it. Can't tell for sure. But if we use a broken mount in recovery it seems to work
[Huawei P9 Guides, News, & Discussion] richish:
Ok. Now i understand.

But why then i got error when try to flash zip??? (See picture in my erlier post)
[Huawei P9 Guides, News, & Discussion] :
You haven't formated your data after upgrading to n with the data fix. And or in stock recovery
[Huawei P9 Guides, News, & Discussion] richish:
So i still need to flash data fix, format data edit boot.img and only then i will be able to flash zips, but i cant do it all beacuse getting error 4 when try to format data.

Some posts up u said that no need to flash data fix for flashing zips.

Hope u will fix TWRP without flashing data fix.

Keep it up.
[Huawei P9 Guides, News, & Discussion] :
U need to flash data fix then wipe data also check if updater script contains dm-0 block and remove that line
[Huawei P9 Guides, News, & Discussion] thel2dab:
[MENTION=4435346]LastStandingDroid[/MENTION] do you think we can port this to the P9 and the Honor 8?

TWRP Android 7.0 Huawei Mate 9

If we can do you think we may a root option?

Regards

Lee
[Huawei P9 Guides, News, & Discussion] :
Not sure what u want to port since he got twrp recovery working which we do as well

yupp root works for me :) also system mods too cool!
[Huawei P9 Guides, News, & Discussion] thel2dab:
Well with this recovery file on the Huawei Mate 9 they are able to get root access by using phh's superuser.

They have the same struggle with mounting /data so they flash the zip from the external sd card.

I am new to all this so if some one could explain the best way to port this over I am willing to try. I have the stock P9 recovery.img, [MENTION=4435346]LastStandingDroid[/MENTION]'s twrp.img and the Mate 9 twrp.img unpacked and can see the mount points are different in the Mate 9. If i copy the mount points from /etc/twrp.fstab will this be enough to boot or should I take extra steps?

As I say I am still trying to learn all this.

Regards

Lee
[Huawei P9 Guides, News, & Discussion] :
The mount point has nothing to do with the data. Is the fstab and data.img I use to gain access through twrp.

Anyway
[Huawei P9 Guides, News, & Discussion] thel2dab:
How did you manage to get root?
[Huawei P9 Guides, News, & Discussion] :
By the link u shared look at the info ;)
[Huawei P9 Guides, News, & Discussion] thel2dab:
So with Phh's SuperSu?

Also is it possible to flash xposed for sdk23?
[Huawei P9 Guides, News, & Discussion] :
Yes indeed but If u have modified boot image and system don't worry it'll work too. Now I can skip M for sure :)
[Huawei P9 Guides, News, & Discussion] thel2dab:
Excellent! I see you updated the OP with the info, thanks for the credit! :D
[Huawei P9 Guides, News, & Discussion] :
Video of proof https://youtu.be/4guxEWMsoTM
[Huawei P9 Guides, News, & Discussion] thel2dab:
Can confirm! I have root too on 7.0 beta! See attachments......
[Huawei P9 Guides, News, & Discussion] thel2dab:
[MENTION=4435346]LastStandingDroid[/MENTION] now we have root is it possible to install magisk? Can i still flash your properdatafix.zip to do this or is there another way to do it now?
[Huawei P9 Guides, News, & Discussion] :
Nope since the reason why su fails is due to mount issue with loop. That's why su died on boot. But if we can use a similar approach for magisk as su access then yes.
[Huawei P9 Guides, News, & Discussion] thel2dab:
Ok, thanks. One last thing. After i flashed the properdatafix I lost all the Huawei apps, I saw a flashable zip to repair this somewhere but I can't find it.... Do you know where I can find it?
[Huawei P9 Guides, News, & Discussion] :
I'll upload it for you the stock one.
[Huawei P9 Guides, News, & Discussion] thel2dab:
Thank you very much! :)
[Huawei P9 Guides, News, & Discussion] :
Here u go https://mega.nz/#!CoI3EJZD!jwrfi_pZWZgpPii8ZfkkklGu2SEaeBL-03l8oYAMjnw
[Huawei P9 Guides, News, & Discussion] paratox:
yeah we got root! thanks! :good:

now i have to find out how to get viper4android working. i always get I/O error on driver installation in app. maybe incompatibility with phh superuser?
[Huawei P9 Guides, News, & Discussion] chm1989627:
one thing i didn't understand is this:

Fixed data so your internal storage is now mountable. [Needs Reflash!]

after i flash twrp,when i boot into twrp ,what's you mean "reflash "is reflash data or twrp?
[Huawei P9 Guides, News, & Discussion] paratox:
[MENTION=4435346]LastStandingDroid[/MENTION] do you think you could adapt twrp to be able to flash magisk? at now i get a reboot when trying to flash it.
[Huawei P9 Guides, News, & Discussion] :
You need to set seLinux to permissive. Grant access to storage and replace /vendor/etc/audio_effects and system/etc/audio_effects

You need to re flash data partition.

It's a decrypted partition

No since on boot it kills the mount loop for some reason or its broken.

It's Huawei fault not ours. That's why original sbin mount fails too. It's a Huawei problem.

The only way to get magisk working is to a similar approach that this su method uses

Tried mount a loop while running gives losetup failed 1
[Huawei P9 Guides, News, & Discussion] itongx:
this one can you with p9+ ?
[Huawei P9 Guides, News, & Discussion] :
This recovery? You can try can't tell for sure
[Huawei P9 Guides, News, & Discussion] paratox:
after renaming the audio_effects.conf i got one step further and no more I/O error anymore.

but now i`m stuck at wrong / not working busybox error. i`ve installed busybox into different locations but could not get it to work.

could you point me in the right direction?
[Huawei P9 Guides, News, & Discussion] :
I first used this https://play.google.com/store/apps/details?id=com.jrummy.busybox.installer

And installed to system/xbin it might take some tries.

If it won't work then. (v4a)

Install https://play.google.com/store/apps/details?id=stericson.busybox and select install. Just don't remove jrummys busybox before installing Ericssons else it won't install for some reason.
[Huawei P9 Guides, News, & Discussion] paratox:
could you share the v4a zip you used? i`ve tried 1000 times and always get wrong / not working busybox error.

busybox installation always succeeded wirhout an error.

a flashable v4a driver (without in-app busybox installation) would be nice, but did not find one until now.
[Huawei P9 Guides, News, & Discussion] :
I use https://mega.nz/#!Ltwl3SDK!C40OAt7imR2ehVYS_QkXsWGDhqcW2Vbw_yQB2jfWPbM

That one

Push lib files to system/lib and lib64 as well. And the audio effects as mentioned in system/etc and vendor/etc and set se Linux to permissive if you haven't maybe forgot to tell u that?
[Huawei P9 Guides, News, & Discussion] Atarii:
I can get N booting successfully with TWRP :good:, but when I flash update_data_full_hw_eu.zip (to fix missing apps etc.), the device restarts after "write radio image..." (where it's executing 'assert(update_huawei_pkg_from_ota_zip("UPDATE.APP"));') and it seems to loose the /vendor and /product partitions and device goes into a bootloop. After bootlooping a couple of times, Huawei eRecovery kicks in and says /data is corrupted.

Any ideas how to get that working correctly?
[Huawei P9 Guides, News, & Discussion] chm1989627:
i rember one thing .7.0's update.app didn't have userdata.img file . so can i use 6.0'suserdata.img to reflash data ？

Sent using XDA One