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

sgspluss commented 8 years ago

Maybe in this case it would be the best to test it with cm base at first. Right it could be that the QMI fix doesn't work due to chipset, so we'll have to find an other solution sadly...

muhammadfahadbaig commented 8 years ago

@XePeleato did you checked the kernel source code. There might be some modem or RIL configurations. Another bet could be to edit them and compile the modified modules and make them compatible with AOSP.

muhammadfahadbaig commented 8 years ago

@XePeleato Since you switched to Android 5.1.1. Does it boots (I believe it'll boot fine)? Secondly, which release version you are using? There are so many releases r1 to r25 to r.... Does picking right release matters?

XePeleato commented 8 years ago

It boots x I am using r1

VenityZ commented 8 years ago

@XePeleato First of hello , I have been watching this project for a while and I see you make a lot of progress. Nicely done. I would like to try it out if it's ok for you. Could you tell me everything I need in order to build it? The newest Kernel Source of you I guess? And which vendor?

muhammadfahadbaig commented 8 years ago

@VenityZ You don't need Kernel Sources. A prebuilt kernel is included with this repository. Secondly, you have to extract vendor files yourself from your device. At the moment, a script to automatically extract the needed vendor files is not included. Therefore, see aosp_hi6210sft.mk to get a list of the vendor files needed and where they have to be placed.

XePeleato commented 8 years ago

I forgot to upload the blobs, since you can get them from your device, I'll post them whenever I can.

VenityZ commented 8 years ago

@muhammadfahadbaig Thanks. Saw the Kernel wasn't sure about that. A little Challenge for me.

XePeleato commented 8 years ago

Since I can't seem to get RIL working, I guess I'll post the Alpha version of the rom in order to build up interest. A true shame.

muhammadfahadbaig commented 8 years ago

@XePeleato Don't say "True Shame". The problem with Huawei is the lack of community of developers who are willing to spare time and devote in development. You are a lone ranger who took the interest in development and got this far. Now that's a true achievement. Also, you're the first one to create a bootable 5.1.1 ROM for Huawei HiSilicon chipsets. We need people to gain interest in this project and maybe someone who has enough experience shines some light in this regard. However, even if you have decided to upload the ROM, make sure to warn people about the ROM's current state. You might not want a flood of comments saying A is crashing, B doesn't opens, etc.

XePeleato commented 8 years ago

Well, not really, the help I received here was essential to develop the rom, I am a C developer and I have stuff to work on and I have never developed an android rom before, so I just used the office Build server and my spare time. I don't really want to release the rom, because it isn't finished but we need as much help as possible.

Now, I have discovered that hwframework (I don't remember the full name of it) invokes RIL and manages it, that framework is developed by Huawei, Will CM fix this? I really doubt it, however we'll know pretty soon. Anyway it looks like we'll have to patch our framework, and I don't even know where to start.

muhammadfahadbaig commented 8 years ago

CM won't fix this but CM is relatively easier in fixing bugs (thanks to it's large community support) but very difficult in getting it to boot.

VenityZ commented 8 years ago

Does the RIL effect 3g and etc. I don't know if I can help but you need someone who has Java knowledge. I have mush but not in things such this , gonna have a look and try to find someone who knows what to do.

muhammadfahadbaig commented 8 years ago

The first step would be to deodex the framework files. Due to Android ART Runtime, the framework classes are stored in a boot.oat file. So the actual framework files contain nothing useful as most of the classes are pulled away and stored in a separate file. I'll edit this post as soon as I get the deodexed framework.

muhammadfahadbaig commented 8 years ago

@VenityZ RIL (Radio Interface Layer) manages the complete baseband and modem. Simply, your cellular network. It is a means of transport or whatever else between the software and hardware.

VenityZ commented 8 years ago

@muhammadfahadbaig Already knew this but thx anyway. On my old device it had a more important role. @XePeleato If you need help , I could make a public post with a full explanation of the project and with its problems where I search for people to help. If you give me a yes I will make one.

muhammadfahadbaig commented 8 years ago

@XePeleato Did you decompiled the hwframework.jar? I would upload it right now if's not.

muhammadfahadbaig commented 8 years ago

@XePeleato in aosp_hi6210sft.mk add these libraries /vendor/lib/libreference-ril.so, /vendor/lib64/libreference-ril.so, /vendor/lib/librilutils.so and /vendor/lib64/librilutils.so. Also I've got 3 other Anonymous developers to look into this RIL problem :)

XePeleato commented 8 years ago

I really appreciate your help,thank you! But unfortunately it doesn't work

sgspluss commented 8 years ago

Could it be have someting to do with this?

Stock: -#BOARD_RIL_CLASS := ../../../device/HUAWEI/hi6210sft/ril/

Edit in yours: +BOARD_RIL_CLASS := src/java/com/android/internal/telephony

Maybe not vaild path or else?

XePeleato commented 8 years ago

@sgspluss That's because I have moved it,however that RIL class just fixes the signal strength and other minor bugs, so even if it's not loading correctly, it's not causing the problem.

sgspluss commented 8 years ago

@XePeleato thanks for clearify this. Then will hold my eyes open again for this ril problem. Dont have much experiances with rom (just few small one) more with kernel, but anyway try my best to help out whenever i can. ;-)

muhammadfahadbaig commented 8 years ago

If anyone here knows anything about Java development, I have uploaded the disassembled hwframework.jar here: https://drive.google.com/file/d/0B0LG0AQ4V9FpN0xmZERsbEdVQTg/view?usp=sharing. The file uploaded is a .zip file. Inside it are .smali files which can be edited using any text editor (such as Notepad++). This framework can be used as a reference to patch AOSP framework (which unfortunately I don't know how to)

olrak2 commented 8 years ago

@XePeleato , you already done a very good job, you are my hero :smile:

But could you please tell us how you were able to build? I tried to build from your tree, it worked after adjusting some settings but got an error when i booted. adb error. Maybe a little manual :wink:

Never been able to get a full boot. Always stuck on boot.

I would like to help with the ril problem but if i can't make a build it's not easy

muhammadfahadbaig commented 8 years ago

@olrak which Android repo you're using?

olrak2 commented 8 years ago

@muhammadfahadbaig , i have tried all of them. Android 5.0, Android 5.1 R1, etc...

I always get this error : http://pastebin.com/raw/F1744gqG

muhammadfahadbaig commented 8 years ago

@olrak2

  1. Downgrade back to Android 5.1.1 (if you are on Android 6.0) i.e. flash stock Huawei Android 5.1.1.
  2. The stock boot.img won't work. Netd (Network Daemon) is failing maybe because @XePeleato made some changes to kernel (NETFILTERS???) and init.rc in ramdisk. Compile a boot.img yourself using this repository kernel and ramdisk files.
VenityZ commented 8 years ago

@muhammadfahadbaig of which vesion is the Framework?

muhammadfahadbaig commented 8 years ago

@VenityZ It's stock Huawei Framework Android 5.1.1. EMUI 3.1

VenityZ commented 8 years ago

@muhammadfahadbaig I don't know if it changes something. But you were using B008 I guess theres a newer 5.1.1. I think the frameworks are different need update pakage? Also are the permissions in the ueventd.rc right not familiar the modem.

muhammadfahadbaig commented 8 years ago

@VenityZ Actually, we don't need any EMUI framework patches. We only need how hwframework invokes and manages RIL. You may compare all RIL classes in my uploaded version to any other Android 5.1.1 EMUI version. I think it would be the same.

XePeleato commented 8 years ago

@muhammadfahadbaig Nice job! Let me play around with it, and let's see if I can understand it.

ghost commented 8 years ago

i manage to got worked boot.img with adb too compiled under cm-12.1, and also i have an idea want to apply after see first boot to get worked ril without patches, keep in touch :+1:

muhammadfahadbaig commented 8 years ago

@hak86 @XePeleato All fighting for one common cause.... to free everyone from the horribly designed (although with many great features and addons) EMUI.

ghost commented 8 years ago

@muhammadfahadbaig sure bro, our device will be faster with a stable rom i think :)

muhammadfahadbaig commented 8 years ago

@olrak2 So were you able to get it to boot?

muhammadfahadbaig commented 8 years ago

@XePeleato About the RIL issue, I was able to find RIL libraries for HiKey boards. And HiKey Board is compatible with AOSP. Any chance they might work?

XePeleato commented 8 years ago

@muhammadfahadbaig No idea, where did you find them? I could try.

muhammadfahadbaig commented 8 years ago

@XePeleato Here is the link for complete AOSP ROM for HiKey: https://builds.96boards.org/snapshots/hikey/linaro/aosp/218/ . Download system.img.tar.xz. Also for a list of libs and other files included in this distribution, see installed-files.txt I think the libs would work. GPS, Bluetooth, and maybe RIL, I hope they'll work.

muhammadfahadbaig commented 8 years ago

@XePeleato I built from your sources. Unfortunately, my device is stuck on Huawei logo. It doesn't even goes to bootscreen. Any idea why? (using the boot.img compiled from sources)

muhammadfahadbaig commented 8 years ago

@olrak2 @XePeleato I confirm the bug faced by @olrak2 . Stuck at Net.d starting.... http://pastebin.com/eyVhnnAE

olrak2 commented 8 years ago

@muhammadfahadbaig, after looking in the system.img from @XePeleato , you need to copy the entire bin, etc, lib, lib64 dir's to the out directory of your build. You need to put it all in the system folder. After copying the dir's you can build your rom.

Tomorrow i post a scrypt that you can put in your Android.mk file.

muhammadfahadbaig commented 8 years ago

@olrak2 Yeah, I figured that out. The reason of Net.d is crashing was either because of init.rc in ramdisk or because of the Android Runtime crashing. The latter is caused because of incompatible libraries being used in the ROM which are not compatible with AOSP. @XePeleato It would be great if you upload the vendor files you're using. It seems that some vendor files which I'm using are not compatible with AOSP and hence the Android Runtime crashing. It would be great if you upload the vendor files to ensure compatibility and that anyone who is trying to build from your source atleast gets a bootable build.

XePeleato commented 8 years ago

It's not a good idea to copy the whole folders, I'll upload it this afternoon

muhammadfahadbaig commented 8 years ago

@XePeleato Right about that! I'm using Android 5.1.1 r37 and I would not like to face some major crashes. Also, it's good you uploaded the 5.1.1 system.img on XDA. I'll extract the libs from that and then I'll create a repository here on github.

muhammadfahadbaig commented 8 years ago

@XePeleato @olrak2 Here are the vendor files :) https://github.com/muhammadfahadbaig/vendor_device_hi6210sft

XePeleato commented 8 years ago

Development is officially resumed!

olrak2 commented 8 years ago

@XePeleato Good news

If you need something, just call.

My working tree for omnirom 5.1 is on my github. (https://github.com/olrak2/android_device_huawei_alice)

FelipeBR28 commented 8 years ago

How's everything going? And what about the RIL?

XePeleato commented 8 years ago

There's still work to be done, the RIL stack won't work until I patch the framework.