yashsingh1/xdaforums huggingface dataset:
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] :
In Java it usually means, that one or more classes aren't correctly imported, You should check your imports and file structure (maybe you moved a folder that contained method "obtain" definition)

Sent from Huawei P8
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
I'm java native but this seems more related to jni.

I fixed previous errors like "Failed to register native method android.media.AudioSystem.setLowPowerApk(Z)I" with adding them to the framwork base in the corersponding cpp and java file. But this one is logged as KeyEvent-JNI so it's cpp only? Well copying the vendor files causes erros like this. They are slightly different and I will never ever have the source for it so I have to eighter decompile it from the original, dissasemble and rewrite it or just add some pseudo functions to statisfy the calls. The calls come from android_runtime.so. I cannot use the one built by CM it was required to get the display driver together with surfaceflinger running.

I prefer the last option for getting it to boot. I'm new to cpp (can read it and maybe write some very basic things) and for assembler I'd need a arm64 function and register sheet anyway.

Edit: It's funny this function actually exists within frameworks/base/core/jni/android_view_KeyEvent.cpp and framworks/base/java/android/view/KeyEvent.java

I had a simmilar issue with a native JNI call wich just missed an optional boolean. However here I don't have any info about params. JNI errors which look like this are reportet like this even when just one parameter does not match. in cpp/java file.

Btw. thats the public source available... Someone with some jni knowledge could help very well.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] :
It would have to be a temporary solution, since some of those methods may be important.

I can help you with code, I know both C and C++ pretty good :)

Sent from Huawei P8
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Thx. well here you can watch the latest few commits (from me and gabry who did already some of them). almost all of them added dummy functions. They don't look that important to me. As I said the calls come from a vendor supplied library. I'm not that sure if they are really used at the end.

Feel free to implement those :) I uploaded everything I have to git.

For the error I'm stuck there's already an implementation it just seems to not not find it.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Ok got past that. now I get:

"JNI FatalError called: Native registration unable to find class 'android/hardware/fmradio/FmReceiverJNI';"

It seems that the radiofm was completely removed in cyanogenmod. That's not that nice since the vendor library calls stuff from there....

And again got past that.. however there are probably tons of these errors and I don't know if I'd better don't replace this libandroid_runtime.so and try to get the rest to run somehow else instead.

Edit: ok I'm now on a testing branch before I replaced libandroid_runtime which contains all these calls where I don't have any sourcecode for.

The problems startet from there. Well maybe a bit earlier.

Clarification:

Huweis hwcomposer lacks a few functions which are described as "required" for the hwcomposer api version 1.4. this caused issues with surfaceflinger (segfaults) and because of that I had to replace it as well. However to get surfaceflinger to run I had to replace libgui. Sadly this specific version from the vendor depends on their modified libandroid_runtime which is one of the core libraries to my point of understanding and causes a huge amount of problems when replaced.

What I'm doing now is to try to make the surfaceflinger compatible with their hwcomposer library. I'm not sure what exactly is wrong with this one but mHwc->getActiveConfig and mHwc->setActiveConfig cause segfaults. Theoretically they should be implemented as it reports version 1.4:

I'm not 100% sure how to handle this.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] AD2076:
I already did (vie, eva and frd) and I am sorting up our ramdisk on a local branch.

Will try during the weekend
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Got a few free hours let's see.

Started with the charger stuff.

Edit: charger fixed - thx [MENTION=2335078]surdu_petru[/MENTION]

... Well it doesn't look fancy but the ramdisk has no more space for the vendor animation. I could mount the systempartition and symlink it when the charger is enabled but anyway. It's functional don't need that at the moment.

Edit: trying nfc now (have to compile it that will take an hour)

Still trying I get more and more problems to connect via adb there must be something wrong.

I had a modified ramdisk which enabled it at early boot but that was just a workaround back then.

I mean mtp doesn't work as well. ADB just sometimes.

Have to stop for today. (The adb problem required my attention and fixed itself magically >: | )
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] SuperProHacker:
Hey, could you help this guy in making the rom, i dont want to annoy anyone but im just asking that could you help him?

http://xdaforums.com/p8lite/general/cyanogenmod-14-t3458451
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] 00471:
as you can see he is so bussy he can not work on this rom, not even on other...
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
I know about this guy and his work for the p8lite.

But as much as I know he got a bit further or is

at least

as advanced in this stuff as I am.

And well as [MENTION=4327948]00471[/MENTION] said I'm even to busy to finish the last few features on our rom at the moment. This will change soon. All I can do is probably share my thoughts while I'm traveling.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] lespaul79:
Merry Christmas for all
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
I uploaded the boot.img with the charger fix. Untested but built the same way as my current one (will work).

The NFC chip isn't exactly the same so the commits surdu mentioned just point into the possibly right direction.

I'm working on it this night. Progress here:

https://github.com/CM-Huawei-P8-Development/device_gra_l09/issues/5

Partial success (in terms of functionality). I make a clean build to confirm it.

Edit - Tested and uploaded.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] jask489:
Great work dev, [MENTION=5532236]nexolight[/MENTION]! The ROM looks great so far and I'm so glad you've been able to get most of it working. I won't be installing right now as my P8 is my main driver, but I'm definitely going to be one of the first to install when you can iron out the bugs and release a near-final version!

Just wanted to say thank you for the work you're doing and wish you the best ahead so we can keep this project alive! :)

Edit: Also want to mention I'm using a GRA-UL00, so it will be interesting to see how exactly it works with my model.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] maikeru-chan:
Looking forward to the GPS, Camera, and SD card fix!

And just a short question with no intention of being rude, why didn't you guys went with building a Nougat build instead of an MM build? I do get that the P8's GPU doesn't support Vulkan at the moment but my old LG G3 (with discontinued SD801) is rocking a Nougat ROM and is quite stable without Vulkan. You guys' works are very much appreciated. :)
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] lespaul79:
Happy new year to all and make all your dreams come true
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
The problem is that we're using quite a few .so files from the vendor mm build to get some of the functionalities.

They were built with the code base of mm. As far as I know there is no nougat build for the p8 out there yet.

If we would mix the files from mm and nougat this would (At least I'm pretty sure) lead to major incompatibilities (Segmentation faults) and a lot of the features wouldn't be available at all.

I haven't even tried it simply because of that.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Someone fixed the sdcard for us:

https://github.com/CM-Huawei-P8-Development/device_gra_l09/issues/7#issuecomment-269970937

I will put it in the master branch. Not tested from my side yet but I think this will work as promised.

THX very much :) PaulFasola@github
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] fallen.kn:
but will it support touchplus? (amazing work btw)
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] _skypol0:
My pleasure ;) Keep up the good work !
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Never heard about touchplus - google tells me that it is some kind of screen protection foil. So what is it?
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] erayrafet:
Exactly as you described.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Hm I don't know how that is done. It must be app driven and the app must take over the ui controlls. So basically it should work with any rom; Doesn't it?

Well at least if this works with other cyanogenmod/aosp roms it should be fine I guess. I haven't really touched the vanilla sourcecode.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] fallen.kn:
I think it is a feature from Huawei thats why I've asked, not implemented in cyanogen iirc.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
In this case it won't work.... Unless the sourcecode is somewhere.

But even then I'd rater focus on getting xposed (untested) to work than any oem specific feature.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] ChavezD:
What about Double tap to wake, don't know if it is Huawei specific but i've already Used it on my Old Lumia 920 and heard about it from LG Users.

(Tho Not all devices Support DTTW since something needs to be supported by the Display, but P8 can do so in Stock Rom and the Rom by tecalote)

And do you know what about some Features like douple tap volume Down to Start the camera? Possible via xposed or App?
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Shamako:
DT2W can be implemented at kernel level - however it doesn't make sense asking about those features before the main components are fixed.

The double tap volume down or other hardware key mapping can be done through xposed with Gravitybox [MM].
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] 00471:
true
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Shamako:
Haha my friend :o I only know basic java. I am not a developer that can do something this difficult. Rest assured nexolight and friends are working on this - he is very talented and i'm sure will get a lot more working. Just be patient ;)
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Speedo.thc:
Hi , nexolight , first thx for the hard work for P8 device , it's now on a good way.

at my side , i use this work to port your CM rom to .... Honor 7 , and it's successfull

Bugs i get at start was:

- wifi (fixed)

- bluetooth (fixed)

- GPS ( i managed to activate it with success (surdu pedru method), but no GPS fix now

- SD card , i did the changes from PaulFasola inside ramdisk, now get mounted but only "settings.apk" can read it :(

for root browser it appear as well but "nothing inside" and it don't appear in CM file explorer. (Folder perm is 0700) and even if i try to change this value in ramdisk , it's still 0700 ..

- Dual Sim ( i didn't look at it for now )

- Camera ( i didn't look at it for now )

Now i will follow your progress and apply changes to my port.

Big thx again , and i wish you a very good 2017 year.

Best regards
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] 00471:
oh, i had to missclicked, this was meant for nexolight :D , sorry for that

[MENTION=5532236]nexolight[/MENTION] hello, are you already working on this rom? i hate emui every day more and more and some info would be appreciated
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
After 11.01.2017 I could probably invest 2 days per week for this. So not yet. This will be my free time. I can't do it any longer during my worktime except I'd have nothing else to do.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] 00471:
great, thanks for answer
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] user_x25:
Hello, any news about bugs?
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Thursday or friday probably.

So let's see what I can do. Starting with camera feature

Progress here:

https://github.com/CM-Huawei-P8-Development/device_gra_l09/issues/2

Edit:

I'm not sure how I cold debug the problem I'm facing. I guess ida for arm would be worth a try. I need to know why the state becomes as it is when it fails. Unfortunaly I don't have a private ida licence and I'm not really familiar with other debuggers.

Maybe I could try gdb. It will be time intense for sure.

I'm done with it for today maybe I will look at gps next (maybe tomorrow). I heard fisher6 already had gps working. So it might be easier to get it up.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] adwinp:
Did you ensure you have copied over

/system/lib/hwcam/hwcam.hi3635.m.GRACE.so

?

As the failure is referring to the camera HAL directly & I can't see it in the list of files you copied.

Maybe there are other files in /system/lib/hwcam to copy over as well; can't check as I don't have the device on me atm.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Speedo.thc:
Yes , just checked it , the file "hwcam.hi3635.m.GRACE.so" is present in /system/lib
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] adwinp:
It should be in /system/lib/hwcam/, not in /system/lib/

You can also do a readelf to check which libraries it's further linked with.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Speedo.thc:
...my mystake, its inside hwcam folder.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
It is already in the prorietary-files6.0.txt

So I didn't mentioned it. The files mentioned there are on top of what the current state is.

(Except perfhub the stuff is commited in the feature branch to proprietary-files6.0.txt)

I know the tools like readelf, ldd strace and up to some point (less expirience) how to handle a debugger.

The reason it fails Is to my understanding not a missing library. There's a constant which is null and should not be null. The question is why is that.

It can't come from the vendor libraries as they do work on stock.

So it must be caused by another slightly different system library which is already available.

However there are many libraries involved. I could limit them by observing the calls.

( I remember that libexif was delivered in one of the opensource dls by huawei )

Another possibility could be that the vendor lib accesses some property or config and set this value based on that.

A missing library would show up in strace as well as logcat. missing symbols also.

Edit:

I wrote a shortcut to see the librarys which rely on a given one.

I was right libexif is required by the camera libs and when I remember right they provided the sourcecode for it which basically means they have altered this library.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Hm got a bit further I guess I will try to download their libexif source and compile it

It somehow looks pretty much like the camera would come up but the os then fails because I took their libexif.so blob for testing.

Oke it recompiles the whole framework due to the changed libexif source. I guess I need to install the full build again.

It's my daily driver I don't like doing this during tests but anyway. Gonna try it. I'm optimistic somehow.

The ram usage during compilation is insane... Need some new hardware near future

Edit:

Well the included libexif sourcecode is the same as the original sourcecode... just version 0.6.20 instead 0.6.21. The compiled version of what they have included causes the same error message while the vendor blob gets further. "well"... Just another way to violate the GPL. Let's include to original source they won't notice it anyway...
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Got perfhub and HwCamCfgSvr to run without crashing

But the camera doesn't work yet. It is all reconized but the device freezes/crashes due to some memory related errors when opening the app.

Edit: The device doesn't crash anymore but the camera app still refuses to work.

The logs are a bit too big to attach. Maybe I will upload them on pastebin.... Need some sleep now worked 18hrs straight on it.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Speedo.thc:
Hi, i've send you the fix for MTP (MP), it work on Honor7 as well , i thinck it will be OK for P8 too.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] user_x25:
Hi! Any news about camera bug? I'm so happy, i only need camera and then i

'll flash the rom! Thanks so much for your awesome work!
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
2 days per week max x) I will investigate further on thursday but that's not a promise (... that stuff is time consuming and I need a free day for this)

[MENTION=5300098]Speedo.thc[/MENTION]

thx I will check it out
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Speedo.thc:
Hi , another interest thing to fix LTE 3G 2G choice in "overlay/frameworks/base/core/res/res/values/config.xml":

+ <!-- The RadioAccessFamilies supported by the device. + Empty is

+ viewed as "all". Only used on devices which + don't support

+ RIL_REQUEST_GET_RADIO_CAPABILITY + format is UMTS|LTE|... -->

+ <string translatable="false" name="config_radio_access_family">GPRS|EDGE|UMTS|HSDPA|HSUPA|HSPA|LTE|HSPAP|GSM|TD_SCDMA|WCDMA</string>

+

https://github.com/Huawei-Dev/andro...mmit/36cfbf74502cd285e147735bae196b3dc5f93119
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] user_x25:
Nice! There are only a few bugs now! Thanks from all of us!
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Speedo.thc:
another one :

need "persist.fw.force_adoptable=true" in system.prop (build.prop)

After this (fix SD card by Paulfasola) and the other fix for MTP , i have success for SD card rw and MTP mount on computer !

:good::good::good::good:
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
I will test and add it :)

Well I can't test the sdcard I don't have one atm. But as I said I think the fix will be fine.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
Hm The choice works but I can't switch back to 4g there's only 2g and 3g. It's probably just a setting issue I will play around a bit. Maybe a gsm guy could tell us what we should put there. I'm not familiar whit all of those technologies.

I couldn't get mtp to run yet. What I know is that in twrp everything is fine. WIthout any special vendor lib. Why is that that's the question. [MENTION=5300098]Speedo.thc[/MENTION] you've sent me a zip with some modifications but 2 out of 3 files are generated and I'm not sure what exactly you have changed there. Would be nice to know :)

And well somehow there's another issue. It seems like I have to enable adb from time to time with setprop sys.usb.config adb. (only sometimes) and well sys.usb.config adb,mtp or whatever else doesn't work. Also the Menu options reset itself when I try to change it there.

[MENTION=535343]all[/MENTION] Does someone knows for what atcmdserver is good for? (Edit: usbmodem?)

I could get it to run. It's a service in init.manufacture.rc. It uses libraries like openssl, teecd, networking related libraries, and listens on port 5713, 5750,5312. It talks about /dev/nve0 and /dev/ttyHwGS1.

I suspect some spy library (call me paranaoid but they also have embeded speech recognition somewhere hidden). It could however also be a service required for something else.

Edit: [MENTION=5300098]Speedo.thc[/MENTION] I took your usb config and altered the services according to my device then added it as separate init file loaded after the cm init. MTP does work now. Is this one from the original huawei init? A few key things are different but anyway. looks fine.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
I still can't find what's wrong with the network signal selection. It even works on the hidden menu. It also works with the types added to the overlay config. But there is only 2g & 3g listed nothing else. (they do work) where could I change the listing there? I find tons of end user posts but no documentation about that.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Speedo.thc:
Hi :i founded the "init.usb.huawei.rc" at debbiche Ghithub original name was "init.chip.usb.rc" i changed the name to be near "init.usb.rc" (who import it) in my ramdisk.

https://github.com/debbiche/android_device_huawei_p8/tree/master/ramdisk

same solution was adopted here :

https://github.com/papsi177/Honor_7_device/tree/master/root

- today i'll try to activate atcmdsercer to see what hapen ..

- for MTP in settings/dev menu , i get it working by click it many times (2-3 or more) but it don't survive a reboot ...

- I want to work more on GPS , it activate but i have a "IPC communication error" and "LIBFLP cannot communicate with a GPSD" ( for me gps is more important than camera ) ..

- About camera : i did follow and apply your job on ghitub , no success for now , but if you could provide me yours related shim_libs to try more again ..

Have a nice day !!
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
[MENTION=5300098]Speedo.thc[/MENTION]

Well The shimlib I mentioned in terms of the cam is simply the one from the vendor rom (renamed). The one for the HWC is reversed (cm lib as shimlib)

Apart from that I don't really make use of them.

I know this init.chip.usb.rc from somewhere but don'r remember from where. Anyway it does work. Pretty well. Ok RNDIS doesn't yet but the USB mode switch does work. The device is reconized it's just that it states "network cable disconnected". Would need to investigate.

I'm not done with camera yet and haven't looked at gps so far.

Btw: someone told me the atcmd server uses the ports of the hisuite. So when you haven't done the init script I'm pretty sure we can take out that part without any issues.

About your gpsproblem. There's a binary in /system/bin/~gpds~ Not sure about the exact name anymore. Might help to start it.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
I fixed the 4g/3g/2g selection in the NetworkManager.

There was an option in packages/services/Telephony/res/values/config.xml to overlay.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] nexolight:
[MENTION=5300098]Speedo.thc[/MENTION] We don't need atcmdserver for mtp I tested it. And well my guess it's just a part of the hisuite we don't want.

I'm done for now. Maybe on I will start again on monday.
[Huawei P8 ROMs, Kernels, Recoveries, & Other Devel] Speedo.thc:
[MENTION=5532236]nexolight[/MENTION], very well , and I'm happy if you got chance on Monday.

I've did all surdu pedru changes for GPS in ramdisk, flashed all necessary files , but still stuck , I'm pretty sure It's coz I do not compile it. So I must wait for your advance. Now I start to do some cleaning in build.prop, many things are related to EMUI

Have a nice Weekend

Best regards.