yashsingh1/xdaforums huggingface dataset:
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
I'll try to support the new kernel until you switch.

Once I'll build your tree flawlessly will try to switch to 13.1

Why did you choose 13.0?

Edit: I see there's no 13.1 branch in their git repository, should I try building 14.1 next? (daydreaming...)
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] fpippo1999:
Installed from B380 stock. Very smooth, nice work dude. Only bug i found (different from the bug in the first post) is that sometimes app like whatsapp or telegram crash
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] adwinp:
The P8 & P8Max (DAV7xxL) have essentially the same hardware; I wonder how much effort would be required to kickstart a CM build on the latter.

We could reuse the stock zImage, & definitely .props.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] user_x25:
Crashes are normal, but I found some bugs. I cant change display temperature and when I charge the device and it's off, the screen with the battery stays on.

Inviato dal mio SM-A500FU utilizzando Tapatalk
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Shamako:
delet
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Daydreaming is supported in cm13 isn't it?. I took the latest stable cyanogenmod 13 branch (this is probably 13.1). It will be quite hard to switch to 14.1

unless everything is opensource

. The vendor libraries are built for android 6 and they are most likely not compatibile. Same goes for 5.0-6.0. Further Android 7 wasn't out yet when I started. When huawei would release a 7.0 rom it would be easier. Otherwise we have to take out almost every vendor file.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
"sometimes"?

I can't get whatsapp to run no matter what. It's an issue for me personally. This happens when veryfiing the phone. So I though about copying the data directory /data/data/~whatsapp to the p8 and noticed I could not write or even read the content of /data/ via any file manager with root access. This may be the reason why it crashes. Eighter it's a problem with groups and owner somewhere in the init script or just due to the lacking userdata partition. I couldn't flash it so far and stopped trying but I will try again.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] fpippo1999:
i can use whatsapp perfectly, sometimes like when i forgot that i don't have the camera and i search to make a photo and it crash. but non always
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Did you flashed userdata as well?

Additionally - which gapps package did you flashed?

Edit:

Just tried again to flash userdata.img (this time with dd). Wasn't probably the best idea. It flashed but was unusuable and corrupted the data partition. I'm glad that I had noted all partition infos and had some dd backups. I will take out the userdata.img for now. Except anyone reports that he flashed it somehow (fastboot refused it for me) and it went fine.

Edit2:

No idea why but now whatsapp starts well now... Only difference was that dd stuff I explained which should have changed absolutely nothing (0bits) at the very end, that I was connected via adb and I'm using the nova pro launcher now. tzz...

Just as a reminder for me:

10-28 12:46:57.367 2853 2853 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-28 12:46:57.367 2853 2853 F DEBUG : CM Version: '13.0-20161026-UNOFFICIAL-hwgra'
10-28 12:46:57.367 2853 2853 F DEBUG : Build fingerprint: 'HUAWEI/cm_hwgra/hwgra:6.0.1/MOB30Z/2eeaf7038a:userdebug/test-keys'
10-28 12:46:57.367 2853 2853 F DEBUG : Revision: '0'
10-28 12:46:57.367 2853 2853 F DEBUG : ABI: 'arm'
10-28 12:46:57.367 2853 2853 F DEBUG : pid: 5631, tid: 5639, name: FinalizerDaemon >>> com.whatsapp <<<
10-28 12:46:57.367 2853 2853 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
10-28 12:46:57.403 2853 2853 F DEBUG : r0 ea388700 r1 ec8f44f8 r2 00000008 r3 00000000
10-28 12:46:57.404 2853 2853 F DEBUG : r4 db313300 r5 00000000 r6 db313300 r7 00000000
10-28 12:46:57.404 2853 2853 F DEBUG : r8 7031b668 r9 ee116d00 sl 22d429a0 fp 22daa880
10-28 12:46:57.404 2853 2853 F DEBUG : ip ec8f4048 sp f4682548 lr f729449f pc f6a32694 cpsr 800f0030
10-28 12:46:57.405 2853 2853 F DEBUG :
10-28 12:46:57.405 2853 2853 F DEBUG : backtrace:
10-28 12:46:57.405 2853 2853 F DEBUG : #00 pc 000b4694 /system/lib/libicui18n.so (_ZN6icu_5513DecimalFormatD1Ev+99)
10-28 12:46:57.405 2853 2853 F DEBUG : #01 pc 000b470d /system/lib/libicui18n.so (_ZN6icu_5513DecimalFormatD0Ev+4)
10-28 12:46:57.405 2853 2853 F DEBUG : #02 pc 729d6c15 /data/dalvik-cache/arm/system@framework@boot.oat (offset 0x1f74000)

We might patch whatever the source of /system/lib/libicui18n.so is.

I guess that's why it sometimes crashes. But let's first fix the other stuff before we start with this.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] fpippo1999:
I have only flashed boot and system for Marshallow and all work perfectly. Pico gapps 6.0 arm64
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Zizo17:
Can I try it with my Huawei Honor 4x model : Che2-L11 with Kirin chipset ??
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
No. It won't work
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Not at all. The phone is different and even when the kernel could start it will fail at almost any point.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] BlueFlame4:
Had a quick look at the sources and found something that might be causing problems. Why is this enabled? I cannot see where you copy a custom init.rc to ramdisk, so maybe disable that option.

Then regarding SEPolicyversion 28 it might be cleaner to ditch that old policy, update the kernel to 30 (relevant commits: this, this, this, this and this) so it's all up to date :)

Regarding camera and blobs in general, have you heard of this? Might be handy ;) Moyster (also on XDA) pointed me to this and I found this rather helpful.

There are loads of system.prop entries which might be useless as well, for example dalvik or heap size tweaks.

The permission folder is redundant as far as I can see - CM framework provides the permissions directly so no need to duplicate them. See this :)

Checking your vendor (proprietary files text file) I see you use rild and libril.so prebuilt as well as librilutils. AFAIK those are built from source anyways but HiSilicon might have messed with them so you might or might not need them prebuilt. Just a reminder if you wanna test to build them from source.

Good luck :)
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
I finally managed to setup my buil environment (had to clone my hdd to a bigger one) and built kernel and recovery. Tomorrow I'll build the whole rom and start some testing.

NO CHANGES FOR NOW

Next step will be try and fix SD and GPS.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Yep the first line about the init may be right. But well the init.rc is generated so I assume it ends up with including a init.<board>.rc in the actual init.rc script which is used. There's a comment in the source. No time to test it without this line yet.

Sepolicy28. Indeed we should update the kernel. However I tried with those commits as far as I remember and that didn't helped. Could try it again some day. Anyway when we drop the support for the old kernel and continue on the official 6.0 one patching it is obsolete. I guess I'm almost the only person who used the old 5.0 rom before. Should be simple to update to 6.0 anyway and then flash this stuff.

The tool linked doesn't do that much more than readelf -d and strings together I'm more conftable using the plain tools than any "simplifier"

Point out the useless init.prop entries? The tweaks are from some xda posts and some from the stock rom. It's not that bad when they don't have any use as long as we don't know certainly which of those are useless.

And yes huawei messed with the ril stuff. At least the default files don't work. There are only two libraries which can be replaced with the one from source. I rather replace the ril stack than making frankenstein which is probably incompatible when it comes to some certain situations.

The permission folder doesn't seem redundant as it did not copied the actual permissions to the build for whatever reason.

Thx I will look at this stuff when the rest is working :)But for the moment let me have a break I don't really have time under the current circumstances until 01.01
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
*Sensors are not working as pointed out in the initial post* They are required for automatically change the disp temperature.

The Screen on on device off with battery icon is normal and expected behavoir. I'm nor sure if this is directly handled by the boot.img or the system.img I think this is a bootloader thing.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
I'm trying to update the rest of my partitions since it seems I'm the only one who uses the old base rom from huawei. I submitted a profile for the gra-l09 to the maintainer of the UPDATE.APP extractor just in case anyone else wan't to do it this way.

For backing up I just did this... may be handy:

adb pull /dev/block/mmcblk0p33 3rdmodem.img
adb pull /dev/block/mmcblk0p14 3rdmodemnvm.img
adb pull /dev/block/mmcblk0p15 3rdmodemnvmback.img
adb pull /dev/block/mmcblk0p27 boot.img
adb pull /dev/block/mmcblk0p34 cache.img
adb pull /dev/block/mmcblk0p39 cust.img
adb pull /dev/block/mmcblk0p32 dfx.img
adb pull /dev/block/mmcblk0p29 dtimage.img
adb pull /dev/block/mmcblk0p5 fastboot.img
adb pull /dev/block/mmcblk0p26 hifi.img
adb pull /dev/block/mmcblk0p35 hisitest0.img
adb pull /dev/block/mmcblk0p36 hisitest1.img
adb pull /dev/block/mmcblk0p37 hisitest2.img
adb pull /dev/block/mmcblk0p3 mcuimage.img
adb pull /dev/block/mmcblk0p19 misc.img
adb pull /dev/block/mmcblk0p30 modem.img
adb pull /dev/block/mmcblk0p31 modem_dsp.img
adb pull /dev/block/mmcblk0p17 modem_om.img
adb pull /dev/block/mmcblk0p10 modemnvm_backup.img
adb pull /dev/block/mmcblk0p6 modemnvm_factory.img
adb pull /dev/block/mmcblk0p11 modemnvm_img.img
adb pull /dev/block/mmcblk0p12 modemnvm_system.img
adb pull /dev/block/mmcblk0p20 modemnvm_update.img
adb pull /dev/block/mmcblk0p7 nvme.img
adb pull /dev/block/mmcblk0p8 oeminfo.img
adb pull /dev/block/mmcblk0p28 recovery.img
adb pull /dev/block/mmcblk0p21 recovery2.img
adb pull /dev/block/mmcblk0p4 reserved0.img
adb pull /dev/block/mmcblk0p16 reserved1.img
adb pull /dev/block/mmcblk0p22 reserved2.img
adb pull /dev/block/mmcblk0p13 securetystorage.img
adb pull /dev/block/mmcblk0p25 sensorhub.img
adb pull /dev/block/mmcblk0p9 splash.img
adb pull /dev/block/mmcblk0p18 splash2.img
adb pull /dev/block/mmcblk0p38 system.img
adb pull /dev/block/mmcblk0p23 teeos.img
adb pull /dev/block/mmcblk0p24 trustfirmware.img
adb pull /dev/block/mmcblk0p40 userdata.img
adb pull /dev/block/mmcblk0p1 vrl.img
adb pull /dev/block/mmcblk0p2 vrl_backup.img
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Kostyan_nsk:
...and get hard brick with board replacement in service.

Non-ext4 images are signed. Bootloader unlocking disables signature verification only for boot and recovery images.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] ka-r-los:
How is this ROM dealing with RSAP support? IS it working in premium mode in VW car(SMS? WIFI)? :)
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
This ROM is a WIP and many things still doesn't work. Feel free to test RSAP and report back ;)
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Oh well that's why '^^ Had backups of them anyway. Had trouble with the data partition after I flashed it via dd out of curiosity.

But then it's not really a hard-brick. One can always flash the recovery and the recovery allows flashing the UPDATE.APP from sdcard which contains all the partitions affected.

Furthermore I wonder If they are signed... dd still only copies the official partitions bit for bit. In Theory it shouldn't cause issues then since the signature should be still valid.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Serious question but what is RSAP (rethoric let me google it)

Edit: Well bluetooth itself is fine. But the ril stack is from the vendor it might have problems. The only one I noticed so far is the wrong reported signal strenght. Just ask someone to test it. I don't have any hardware to test that rsap stuff.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Kostyan_nsk:
You didn't understand.

If signature verification will fail, you won't be able to boot into recovery, the only way your device will be able to boot into is fastboot. How will you flash, for example, mcuimage.img in this case?
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
I understand very well but....

According to what you say signature verification is done for each partition before even booting into the recovery? That doesn't sound that legit to me. What kind of design decision would that be. Is it documented somewhere?

from https://source.android.com/security/verifiedboot/verified-boot.html

And even if it would verify every partition - the raw stock images should not result in an invalid signature.

I'm not going to try hard as long as there's a simpler way but according to the documentation the bootloader only verifies boot and recovery.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Kostyan_nsk:
This documentation is for AOSP bootloader.

Here's an example googled for you:

P.S. Why are you trying to argue if you don't know?
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
I argue because "I think" you are wrong. Read a bit further in the "same" thread you got the image from... Some of them probably scwed up their fastboot partition too which would be indeed fatal. But some of them managed to flash everything back in the way I described it in advance.

You don't know eighter it's just a "I heard it so I tell it" thing as the huawei bootloader has no public documentation. So why should I just believe it out of the box. It's not the common behavoir of an android bootloader and it doesn't make sense in terms of design.

Yes there's a chance it's like you told. To be honest I wouldn't feel conftable to try it. This is more a philosophic question than an argument. Except there's a documentation or reverse engineering project.

However I believe it as soon as a good android and low level dev has done that and was unable to recover from that state or when I tried it by myself. Well probably only the last sentence. I'm pretty stubborn.

One thing remains. The stock partitions / raw imgs have a valid signature. I don't see why their bootloader should deny them.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Kostyan_nsk:
Lol, if you screw up your fastboot partition, you won't see even this screen or boot logo. There will be just blank screen and blinking leds.

http://xdaforums.com/android/help/bricked-huawei-hisilicon-phones-honor-t3175387 I was trying to help this guy and was digging enough about it.

Pay attention to "DX_BIV_SwImageVerification" in logs there. Exec "strings" vs your fastboot image with this function name. Also, take a look here https://github.com/Nexolight/gra_l0...e/android6.0-testing/drivers/hisi/secure_boot - it's a part of bootloader code from device tree.

We can make a bet: I'll pay you 100 euro if you will be able to unbrick your device after flashing via dd signed image that differs from current yours. :D

If you want argue more - make a bet!

Stock images from UPDATE.APP has signature in their 2048-bytes header. When you flash them via fastboot or stock recovery, images are written to emmc without these headers, they are put in a separate partition (vrl.img and vrl_backup.img in your case and unmapped emmc region in my case).

So if you'll flash images from UPDATE.APP (even with your current firmware) using dd as you recommend to do in #302, you will hard brick your phone.

BTW, there's a way to unlock fastboot completely to make it allow to flash all existing partitions (without "Command not allowed" error), but there's another consistency check that prevents from booting and which I can't figure out.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] haahaaah:
dm-verity
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
[MENTION=6152035]Kostyan_nsk[/MENTION]

I'm not gonna try this just to win a stupid argument :) There's a simpler way and this wasn't really a recommendation. I recommended to flash boot and recovery and use the UPDATE.APP. Which works fine.

The line you picked up was just a sidenote. I was't really aware of that thing.

Hmm what about stripping the first 2048 bytes and make 2 images each out of it manually and then flash them via dd ;)

That made me believe it thx :)
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Kostyan_nsk:
And compose manually vrl.img and vrl_backup.img ? Note that one little mistake and you're hard bricked. I think it's not worth it.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Sure it's not worth it. I mean I had no problems updating everything with UPDATE.APP so why should I even try something more complicated that's just theory (hey you promised 100 bucks ;) ).

Only the littlest mistake (which I'd definitely make without your last info) would brick it as you say and there's just one try.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] erayrafet:
I've found a new version of the kernel source for P8.

Here is a direct download link

http://download-c.huawei.com/download/downloadCenter?downloadId=89443&version=347652&siteCode=cn

Website

http://m.huawei.com/cnmobile/consumer/support/downloads/index.htm
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Not sure but isn't it the one someone posted earlier? I'm on the 6.0 kernel release which came from some chinese huawei page.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
erayrafet is "that someone" :) so I guess it's an update ;)

Downloaded. Will give it a try asap. (keep in mind I have some free time only during the weekend)
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
You may want to apply the patches I did so far on the 6.0 kernel branch. I'm pretty sure it isn't ndk buildable otherwise...

Hm I should start naming the branches according to the kernel version...
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
Of course I will.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
The archive contains some external and vendor libs too:

iproute2

iptables

libexif

ntfs-3g

ffmpeg

and also a linaro kernel source tree.

should I use the listed libs? they are different from the ones included in cm tree.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
Can you add a branch from here to your github? According to Makefile it is 3.10.90 while your one and the last one linked in this thread are both 3.10.86.

It is already patched to build with NDK and have some more commitss: no modules, ability to change DDR governor, no KSM and fixed path for slimbus.h

---------- Post added at 04:09 PM ---------- Previous post was at 03:18 PM ----------

!!!! TWRP WARNING!!!!

Twrp seems to save his settings somehow. Before flashing twrp from this thread, if you already have twrp installed, please verify in settings you have screen timeout enabled. If not please enable it or the "screen timeot bug" won't allow you to use it.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
- I don't have time until 01.01.2017 -

By then I will create a proper named organisation and structure [MENTION=6233909]AD2076[/MENTION] I won't follow the invite unless I have organization ownship and can change the names of the repos and organization. I hope you understand that I don't feel like giving the controll over this project to someone else after all unless I decide to quit. For the moment I'd be fine with merging the commits or pull requests.

The kernel in the cm13 branch is 3.10.61 (not sure), the android 6.0 branch is 3.10.86 and well I should add the new. When I do so I will rename the branches.

I would not use the souce provided except the kernel. The idea behin CM isn't to use proprietary source.

We should only use them when it's required because we absolutely have to use one of their prebuilt libraries. But I don't think that's the case up to now.

The linearo was also in the latest posted link. It looks like the raw kernel source without any modification. So no need to care about this. We should just use their new kernel do a new branch, rename all of them according to the version and build future version on top of the latest

Btw... the archiv is a git repo? That would be fantastic... Much easier to update with upstream patches. We could probably update the major version a bit more easy
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
Of course you'll have admin rights in the organization. No problems in renaming reposotories, not sure about organization name though
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Admin=Owner?

About the name i'm looking for something device specific. Assuming we get more devs one day it shouldn't be fancy just functional. Since the rom seems to work on the UL00 as well it should contain "Huawei Ascend P8". I'm creating one.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
I guess so. There's no higher role.

I'll wait an invite in your one :)
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
will take a while had to think about a naming policy for branches and trees (Readme in manifest). I'm renaming the whole stuff according to this. Cant test a whole build from scratch with the manifest but I guess it will be fine. Didn't added the new kernel yet.

Sorry for the circumstances :/

Edit: Ok it's done. https://github.com/CM-Huawei-P8-Development

This should be everything required to build the rom. much cleaner now.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Enabling this setting resolves the bug?

I'd enable it by default then.

Edit: oh ok I see. That's just the timeout duration and when set to disabled screen won't go off and twrp is unusuable. Well wiping data and cache should help (not sure). I'm going to remove the obsolete twrp fstab entries and probably do soemthing about that bug.

Just a question to the community... Why would one downvote (rating 1) one out of only a handful successfull porting threads? I mean common. Tell me at least what's wrong that I can correct it (includes a possible argument - jup sorry for that can't handle myself that good) otherwise I just think someone is pretty ungrateful. Keeping this thread up costs me days while I could just develop for myself.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
[MENTION=6901118]erayrafet[/MENTION] I downloaded the kernel but the version is still 3.10.86 in the Makefile [MENTION=6233909]AD2076[/MENTION] you mentioned something about 3.10.90? I probably didn't understood it very well.

@ all ... Everyone is talking about TWRP 3.0.2 while I notice that I have displayed version 3.0.1 or even 3.0.0. Isn't this https://github.com/TeamWin/Team-Win-Recovery-Project the official repository? Can't find anything higher than 3.0.1. I'd be glad for a link updating it should be a minor task.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
https://github.com/omnirom/android_bootable_recovery

here you go.

building just now :)

3.10.90 is the kernel in the P9 repo: https://github.com/Huawei-Dev/android_kernel_huawei_eva/tree/6.0.1