XePeleato / android_device_huawei_p8lite_alel21

AOSP for Huawei P8 Lite (ALE-L21)
33 stars 22 forks source link

Progress.. :) #1

Open powerpaul17 opened 8 years ago

powerpaul17 commented 8 years ago

Hello! Sorry for starting this as an issue but I can't find a way to write messages to users on Github (maybe it doesn't exist..)

I found your repository for the P8 Lite yesterday and since I am also trying to compile a AOKP ROM for this device I wanted to ask if your device configuration is working. I also saw that you already included the Mali libraries, is this working too. So far I couldn't get my phone to boot correctly..

Thanks and maybe we can combine our efforts..?

Greetings, Paul

XePeleato commented 8 years ago

Hi there, the build works, but the device won't boot to android due to some GPU issues that I am trying to fix. As far as I can tell, the device configuration is fine, the current issue is with the Mali GPU, but the libs get loaded by the device.

Feel free to contribute, some help would be awesome!

concept0 commented 8 years ago

Hello! I am very glad that you are working on CM for alel21. Can the USB Host / OTG support for him? Unfortunately I'm still a noob and cant do it myself. Sincerely, Alexander.

powerpaul17 commented 8 years ago

Hey, thanks for the reply. I also have the same problem with the GPU, it seems to boot but the graphics do not get initialized.

Did you use a stock kernel? Maybe it has something to do with this, I am currently trying to compile the kernel too. I also wrote to someone on xda-developers who seems to have accomplished to compile the kernel.

XePeleato commented 8 years ago

Well, first I am trying to get working pure Android, whenever that's done, I'll start with Cm.

XePeleato commented 8 years ago

@powerpaul17 The kernel gets compiled from source, I am pushing that commit right now.

XePeleato commented 8 years ago

@powerpaul17 I'd love to see your logcat output, mine is this

http://pastebin.com/iRMw1SBS

Is surfaceflinger also crashing on your end?

powerpaul17 commented 8 years ago

sorry, I haven't saved the logcat, but it looks pretty much the same.. it also crashed at the same point with the same stacktrace. I also tried to use the surfaceflinger binary from the stock rom but then it doesn't even get started.

I start to believe it might have something to do with the kernel. Maybe the stock kernel is not compatible with AOSP, I am trying to compile the kernel from the sources but I still got some issues.

XePeleato commented 8 years ago

I think I've reached a major milestone :P dsc00164

powerpaul17 commented 8 years ago

Nice.. :) So is it booting? Did you manage to compile the kernel? I am still trying..

XePeleato commented 8 years ago

@powerpaul17 It's almost booting. What's that kernel issue? Are you using Linaro toolchain?

powerpaul17 commented 8 years ago

I am using the toolchain which gets compiled or prepared from the "repo" system (just started with Android development.. ;) ). The kernel finished compiling now using the sources from Huawei but I haven't tested yet. What are your boot issues?

XePeleato commented 8 years ago

@powerpaul17 zygote is crashing, at least surfaceflinger loads properly, it looks like I'll need to change some libs.

olrak2 commented 8 years ago

Any progress ?

thx in advance.

XePeleato commented 8 years ago

@olrak2 Well, I have compiled the kernel succesfully, and now the "rom" itself is my obejctive, if there's any major progress I'll post it here or wherever I find it convenient.

Have a nice day!

XePeleato commented 8 years ago

Just a quick update for those of you who are waiting, I have spent all of the weekend working on this, I have compiled more than 40 images so far just in the weekend, I have solved some issues but the rom is not finished yet. Now I am not stuck with the graphics system anymore, but there are more issues to fix, I won't surrender.

olrak2 commented 8 years ago

Good luck with the problems :) I'm very glad you won't surrender. We need a rom for our Little P8

XePeleato commented 8 years ago

Alright, got it, the rom boots to android, I am not too excited about it since some services crash and the rom is not functional, since you are spammed with "service XXX stopped working" warnings, but at least, it boots :) I'll upload some pics later

olrak2 commented 8 years ago

I'm very excited to hear that. Those warning's can't be worse than EMUI :) Let those pics come :)

XePeleato commented 8 years ago

screenshot_2016-03-07-20-00-26 1

screenshot_2016-03-07-20-00-21 1

There are lots of bugs (as expected), but there's the proof!

ghost commented 8 years ago

wow, congrats, so it was libs issue?

XePeleato commented 8 years ago

Kind of @hak86 I also disabled selinux and modified the ramdisk, I'll submit a pull request in the afternoon to your tree, since I have spotted something weird.

ghost commented 8 years ago

@XePeleato i think you need to remove everything used by emui, second we should make a ril.java file to let it works, we can try with honor 6 one, it's use kirin920 if not wrong but i'm not sure ;)

XePeleato commented 8 years ago

@hak86 True, since the phone doesn't even ask me to unlock the SIM card. I didn't had much luck following the Honor 6 config. I removed every Huawei file inside 'framework', so there's no trace of Huawei code (just the libs used to get the camera/wifi/bluetooth/display..) working.

ghost commented 8 years ago

one question, does get in the out like root/res? needed for the charger? @XePeleato because my own boot won't boot without them....pretty weird...

XePeleato commented 8 years ago

@hak86 Yes, I copied them from the original ramdisk, it's not updated here because I am building everything again from scratch.

XePeleato commented 8 years ago

UPDATE: I am switching from AOSP to CM, because AOSP doesn't let me configure some things that CM does, and at the moment, I don't have the time to figure out how to do them on my own, so the Build machine is now compiling, allow some hours for a new update.

Have a nice weekend!

XePeleato commented 8 years ago

Well, it looks like it wasn't as easy as just switching sources, now it doesn't even boot.

ghost commented 8 years ago

i fix copying blobs into build and now should copy them with any rom, for the boot.img i still don't understand why in the out/target/product/hi6210sft/root, give me only sbin and res, should be folder like data, dev, system and many other..bah.. @XePeleato

XePeleato commented 8 years ago

Well, you can copy them by hand in order to check if it works @hak86 Mine copied that files just fine.

olrak2 commented 8 years ago

@XePeleato Can you update your source? I also want to test aosp and try to boot up my P8 lite. One thing i find weird. How does it come your build number is the same as the original stock build number? It should be a total different number than the stock one, no?

XePeleato commented 8 years ago

@olrak2 It doesn't work that way, the build number is written into a file, I uses the file that came with the device, so it isn't so surprising

olrak2 commented 8 years ago

Good to know :) I don't know anything about building. Still learning. Is your tree up to date so i can test on it?

XePeleato commented 8 years ago

@olrak2 Kind of, however you can download it and test it, but let me remind you that it isn't even finished, and you'll need to use my kernel in order to get it working, also, folders "vendor" and "etc" are not copied, since I am doing it by hand because I am testing those files at the moment, However you can still copy them yourself

XePeleato commented 8 years ago

I'm getting closer :)

screenshot_2016-03-23-13-00-46

ghost commented 8 years ago

nice, i just finish a build too, let's see :+1:

XePeleato commented 8 years ago

Update.

I have been talking to codeworkx and it looks like the whole RIL stack isn't compatible with the AOSP framework. As I see it, We have three options.

  1. We can decompile Huawei's framework
  2. We can develop a hack
  3. We can beg Huawei

Any Java developer is up to a challenge?

ghost commented 8 years ago

did you try to call the command like adb shell > rild to see if drivers are missed?

XePeleato commented 8 years ago

Yes, however it worked. 'adb logcat - b radio' was more explicit

muhammadfahadbaig commented 8 years ago

@XePeleato Remove the third option. 3. We can beg Huawei I have done that already and too much...

muhammadfahadbaig commented 8 years ago

@XePeleato which sources you used to compile RIL

XePeleato commented 8 years ago

The RIL daemon is the original one, and the libs are also from Huawei. If you mean the Java class, it's just used to fix signal strength and some other minor bugs.

muhammadfahadbaig commented 8 years ago

@XePeleato Talking about codeworks, he did compiled CM 11 for Honor 6. Any tip from him? I am seriously not good in Java (even I am below moderate in C/C#). You mentioned, decompiling Huawei Framework. Any idea from where to start? I know someone who may take a look.

olrak2 commented 8 years ago

@XePeleato Why not try omnirom or cyanogenmod again?

Probably also a good idea is to update your source tree so everybody can build from your source.

I gave tried to build but could not boot to android.

There were a couple of weird things in your tree that i needed to fix before i could build:

Could you please also upload your vendor files so we can use them. I have seen a dir /vendor/huawei/p8litekirin/ and a dir /vendor. Where did you place the vendor files?

Here was my catlog file from my bootup: http://pastebin.com/raw/F1744gqG

Many thanks for the work that you already done. :smiley:

XePeleato commented 8 years ago

The tree is updated, I'll upload the vendor files in the evening. Thanks!

olrak2 commented 8 years ago

No, thank you @XePeleato

sgspluss commented 8 years ago

@XePeleato would it be helpfull to take a look into huawei p6? They fix ril problems, maybe this will helps you to fix it to. Just search "huawei p6 ril fix" in google.

XePeleato commented 8 years ago

@sgspluss Since it doesn't support Lollipop, I don't think it'll work.

However thank you for your suggestion!

sgspluss commented 8 years ago

I know it didnt has lollipop but maybe it will be helpful anyway @XePeleato, hope you can fix it finger-cross

sgspluss commented 8 years ago

@XePeleato, just search a bit around and found following things, all for CM12.1...

https://github.com/ShevT/vendor_huawei_U9500/commit/0de7be416167dab5ac53677cfdbff1044347e4be

https://github.com/ShevT/device_huawei_U9500/commit/625ed001a380605584de526c3cd006cdc90c737d#

http://forum.xda-developers.com/showpost.php?p=62770987&postcount=7

The last link sounds that the ril fix for CM11 should work bur just for single sim, dual sim have problems. Well however hope that links can help to find the problem for our device...

muhammadfahadbaig commented 8 years ago

@sgspluss It still will be difficult. Apart from the RIL blobs, the QMI blobs won't work for our device. QMI is a protocol developed by Qualcomn and is only available on Qualcomn Chipsets. Our best bet would be to,

  1. Patch the Modem Images to make them compatible.
  2. Switch to CM base.
  3. Or maybe give that QMI fix a try :) Atleast nothing bad would happen.