olrak2 / android_device_huawei_alice

android_device_huawei_alice
2 stars 2 forks source link

It's booting #2

Open olrak2 opened 8 years ago

olrak2 commented 8 years ago

Still a lot of errors but the first step is made booting

olrak2 commented 8 years ago

Screen already better :smile:

screenshot_2016-04-22-11-22-57

screenshot_2016-04-22-11-24-23

XePeleato commented 8 years ago

Nice job! If you could write a list with known bugs, debugging would be easier, I may do it if I have enough time.

olrak2 commented 8 years ago

Known bugs :smiley:

All of them, for the moment nothing is working. No sound, no gps, no wifi, really nothing :smile:

I have rewritten the ramdisk files and all the other stuff to make it bootable. So probably there is somewhere a little thing wrong in the source. Maybe selinux, ramdisk, or other stuff.

muhammadfahadbaig commented 8 years ago

@olrak2 good work. It's better to use Kernel sources instead of prebuilt. It will build all necessary drivers and modules and will improve compatibility with Omni. I have modified your kernel's Android.mk for building and vdso_offsets. I'll push changes when I get time. Change to SELinux to Permissive (add this line in def config CONFIG_SECURITY_SELINUX_BOOTPARAM=y and then add enforcing=0 in boot parameters). CM and maybe OMNI don't like SELinux to be set to enforcing :) I'm also finishing my cm build with the device tree I wrote from scratch. Let's see how it goes.

And yeah! P8 lite's codename is alice (see all alice configurations in etc)

muhammadfahadbaig commented 8 years ago

@olrak2 Not trying to hijack the issue but any idea why my build is failing at:

/media/android/system/out/target/product/hi6210sft/obj/KERNEL_OBJ/usr/include/asm/sigcontext.h:53:2: error: unknown type name '__uint128_t'
  __uint128_t vregs[32];
  ^
external/tinyalsa/mixer.c: In function 'mixer_ctl_set_value':
external/tinyalsa/mixer.c:406:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (value < 0 || value >= mixer_ctl_get_num_enums(ctl))
                                ^
make: *** [/media/android/system/out/target/product/hi6210sft/obj_arm/SHARED_LIBRARIES/libtinyalsa_intermediates/mixer.o] Error 1
make: *** Waiting for unfinished jobs....
external/tinyalsa/pcm.c: In function 'pcm_mmap_commit':
external/tinyalsa/pcm.c:1113:51: warning: unused parameter 'offset' [-Wunused-parameter]
 int pcm_mmap_commit(struct pcm *pcm, unsigned int offset, unsigned int frames)
                                                   ^
make: *** [/media/android/system/out/target/product/hi6210sft/obj_arm/SHARED_LIBRARIES/libtinyalsa_intermediates/pcm.o] Error 1

Fixed it. Never mind :)

muhammadfahadbaig commented 8 years ago

@olrak2 I saw your ramdisk and you have omitted connectivity.bcm43xx and connectivity.hi110x rc files. It's evident here why your WiFi isn't working.

olrak2 commented 8 years ago

Where did you see that :smile:

It's my first build ever for a device so all begin is difficult.

I have changed the entire ramdisk file this morning, will upload later.

muhammadfahadbaig commented 8 years ago

@olrak2 I was thinking if we use some blobs such as surflaceflinger, GLES mali from HiKey Linaro AOSP releases rather than from Huawei?

olrak2 commented 8 years ago

Hikey Linaro first Omnirom :smile:

Very slow at booting but it's booting

https://github.com/olrak2/android_device_linaro_hikey/issues/1

muhammadfahadbaig commented 8 years ago

@olrak2 That's certainly incredible. Did you used any Huawei libs?

olrak2 commented 8 years ago

Nope, not a single huawei lib.

But still there is nothing working. :disappointed_relieved:

I think it will be very very difficult to let wifi, bluethooth and other stuff get working for our device. After working a lot in the code Huawei did some weird things with our hi110x chip. They made some bins (occty and oam_app) to get wifi and bluethooth working. Don't know if we will be able to let it work.

One possible solutions is to disable all drivers in kernel and pass them like in the hikey board.

muhammadfahadbaig commented 8 years ago

@olrak2 This clears one thing. We don't need any Huawei libs to get a bootable ROM. However, there is a reason why WiFi and Bluetooth aren't working. It's just not the libs but also the Sepolicy. I just ran a test on Stock ROM by removing all Huawei and Hisi entries from .rc from ramdisk. The stock ROM booted fine but Bluetooth and Video Decoding didn't worked (I removed their lines on purpose for a testing).

Occty and oam_app are not required for WiFi (because after I removed those bins from system and ramdisk, wifi still worked).

muhammadfahadbaig commented 8 years ago

@olrak2 And one thing about RIL. I decompiled Huawei Framework and found out that our device is using a Hisi RIL class and a Qualcomn one also. I have no damn idea what that Qualcomn class was doing.

olrak2 commented 8 years ago

We are getting closer :smile:

XePeleato commented 8 years ago

@muhammadfahadbaig Sounds interesting, are those from 5.0 or 6.0? Anyway, I'd like to check them out if you want.

olrak2 commented 8 years ago

@XePeleato , you should make a Omnirom :smile:

Less difficult than CM and you can compile and import your own RIL class as in CM.

muhammadfahadbaig commented 8 years ago

@XePeleato Here are both java source code files: https://drive.google.com/folderview?id=0B0LG0AQ4V9FpWnVybENxWDFWOUE&usp=sharing

(HwHisiRIL.java and HwQualcomnRIL.java)

And from Android 6.0

XePeleato commented 8 years ago

Thank you everyone, today I may have some time to test those files, I'll let you know if I achieve something.

XePeleato commented 8 years ago

@muhammadfahadbaig By the way, How have you decompiled them? I fear I'll need the full Huawei framework in order to place those java classes correctly.

muhammadfahadbaig commented 8 years ago

@XePeleato

I don't have time to upload the full framework. (Sorry for that)

However, you can decompile them easily. First deodex the framework, the extract .dex files from the .jar files. Convert .dex to .smali. Finally extract source code from .smali. I can do it for you but after 2 hours after I'm done finishing some work.

XePeleato commented 8 years ago

Alright don't worry, I'll try that, thank you for educating me!

gershgorin commented 7 years ago

Has there been any progress on this?

olrak2 commented 7 years ago

Sold my device for a OnePlus 3. http://forum.xda-developers.com/p8lite/orig-development/rom-unofficial-omnirom-5-1-t3400392

Also another working working tree: https://github.com/P8LiteDev/android_device_huawei_hi6210sft/tree/aosp6.0-staging

gershgorin commented 7 years ago

I've seen that it works on the hi6210sft. I currently have the ALE-L04.

Are the hi6210sft and ale-l04 similar enough that I could use that image on my phone? If so, how? For shits and giggles I tried to use the image provided on xda. TWRP caught it while I was trying to flash.

olrak2 commented 7 years ago

Nope, it won't work on a ALE-L04.

It's build for the HiSilicon Kirin 620 cpu, your device has a Qualcomm MSM8939 Snapdragon 615.

You probably need to pull the stock vendor files from you device and use them.

If you really want to build your own tree it will probably work better than mine because Qualcomm have released all sources for the cpu.

Good luck

gershgorin commented 7 years ago

I've forked an ale-l04 repository. I'm not hellbent on getting cm on my phone, but I am interested in learning the ins and outs and seeing if I can. I'm stuck on making sure I've extracted all of the proprietary blobs.

If you've got any guidance that would be great.

frakman1 commented 5 years ago

Fixed it. Never mind :) @muhammadfahadbaig How did you fix it?