No HDMI display AOSP (android-9.0.0_r39) on Hikey LeMaker 6220

I tried to build android-9.0.0_r39 and patch with the kernel that I rebuild(android-hikey-linaro-4.9).

I already patch the HDMI driver in vendor folder.
https://dl.google.com/dl/android/aosp/linaro-hikey-20170523-4b9ebaff.tgz

It seems caused by libGLES_mali.so and some issues with HwcComposer.

Does anyone know if hikey still support Android 9? Any way to fix this HDMI issue?

Thanks.

01-01 00:11:41.217 I/SurfaceFlinger(10565): SurfaceFlinger’s main thread ready to run. Initializing graphics H/W…
01-01 00:11:41.217 I/SurfaceFlinger(10565): Phase offest NS: 1000000
01-01 00:11:41.218 D/vndksupport(10565): Loading /vendor/lib64/egl/libGLES_mali.so from current namespace instead of sphal namespace.
01-01 00:11:41.220 D/libEGL (10565): loaded /vendor/lib64/egl/libGLES_mali.so
01-01 00:11:41.302 I/cameraserver(10562): ServiceManager: 0xf399c100
01-01 00:11:41.303 I/CameraService(10562): CameraService started (pid=10562)
01-01 00:11:41.303 I/CameraService(10562): CameraService process starting
01-01 00:11:41.303 W/BatteryNotifier(10562): batterystats service unavailable!
01-01 00:11:41.303 W/BatteryNotifier(10562): batterystats service unavailable!
01-01 00:11:41.304 E/cutils-trace(10562): Error opening trace file: Permission denied (13)
01-01 00:11:41.306 W/hwservicemanager( 1658): getTransport: Cannot find entry android.hardware.camera.provider@2.4::ICameraProvider/legacy/0 in either framework or device manifest.
01-01 00:11:41.309 W/hwservicemanager( 1658): getTransport: Cannot find entry android.hardware.camera.provider@2.4::ICameraProvider/external/0 in either framework or device manifest.
01-01 00:11:41.311 I/ (10562): Waiting for activity service
01-01 00:11:41.342 I/mediaserver(10563): ServiceManager: 0xf051c1c0
01-01 00:11:41.342 W/BatteryNotifier(10563): batterystats service unavailable!
01-01 00:11:41.367 W/hwservicemanager( 1658): getTransport: Cannot find entry android.hardware.configstore@1.0::ISurfaceFlingerConfigs/default in either framework or device manifest.
01-01 00:11:41.368 I/ConfigStore(10565): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
01-01 00:11:41.369 I/ConfigStore(10565): android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
01-01 00:11:41.369 I/SurfaceFlinger(10565): EGL information:
01-01 00:11:41.369 I/SurfaceFlinger(10565): vendor : Android
01-01 00:11:41.369 I/SurfaceFlinger(10565): version : 1.4 Android META-EGL
01-01 00:11:41.369 I/SurfaceFlinger(10565): extensions: EGL_KHR_get_all_proc_addresses EGL_ANDROID_presentation_time EGL_KHR_swap_buffers_with_damage EGL_ANDROID_get_native_client_buffer EGL_ANDROID_front_buffer_auto_refresh EGL_ANDROID_get_frame_timestamps EGL_EXT_surface_SMPTE2086_metadata EGL_EXT_surface_CTA861_3_metadata EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_fence_sync EGL_KHR_create_context EGL_EXT_create_context_robustness EGL_ANDROID_image_native_buffer EGL_ANDROID_recordable EGL_KHR_partial_update EGL_KHR_create_context_no_error EGL_EXT_yuv_surface
01-01 00:11:41.369 I/SurfaceFlinger(10565): Client API: OpenGL_ES
01-01 00:11:41.369 I/SurfaceFlinger(10565): EGLSurface: 8-8-8-8, config=0x60000016
01-01 00:11:41.370 W/hwservicemanager( 1658): getTransport: Cannot find entry android.hardware.configstore@1.0::ISurfaceFlingerConfigs/default in either framework or device manifest.
01-01 00:11:41.372 I/SurfaceFlinger(10565): OpenGL ES informations:
01-01 00:11:41.372 I/SurfaceFlinger(10565): vendor : ARM
01-01 00:11:41.372 I/SurfaceFlinger(10565): renderer : Mali-450 MP
01-01 00:11:41.372 I/SurfaceFlinger(10565): version : OpenGL ES 2.0 195307
01-01 00:11:41.372 I/SurfaceFlinger(10565): extensions: GL_EXT_debug_marker GL_OES_texture_npot GL_OES_vertex_array_object GL_OES_compressed_ETC1_RGB8_texture GL_EXT_compressed_ETC1_RGB8_sub_texture GL_OES_standard_derivatives GL_OES_EGL_image GL_OES_depth24 GL_ARM_rgba8 GL_ARM_mali_shader_binary GL_OES_depth_texture GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 GL_OES_vertex_half_float GL_EXT_blend_minmax GL_OES_EGL_image_external GL_OES_EGL_sync GL_OES_rgb8_rgba8 GL_EXT_multisampled_render_to_texture GL_EXT_discard_framebuffer GL_OES_get_program_binary GL_ARM_mali_program_binary GL_EXT_shader_texture_lod GL_EXT_robustness GL_OES_depth_texture_cube_map GL_KHR_debug GL_ARM_shader_framebuffer_fetch GL_ARM_shader_framebuffer_fetch_depth_stencil GL_OES_mapbuffer GL_KHR_no_error
01-01 00:11:41.372 I/SurfaceFlinger(10565): GL_MAX_TEXTURE_SIZE = 4096
01-01 00:11:41.372 I/SurfaceFlinger(10565): GL_MAX_VIEWPORT_DIMS = 4096
01-01 00:11:41.374 D/vndksupport(10565): Loading /vendor/lib64/hw/android.hardware.graphics.composer@2.1-impl.so from current namespace instead of sphal namespace.
01-01 00:11:41.378 I/ComposerHal(10565): falling back to gralloc module
01-01 00:11:41.379 E/ComposerHal(10565): failed to open framebuffer device: No such file or directory
01-01 00:11:41.379 F/HwcComposer(10565): failed to get hwcomposer service
01-01 00:11:41.406 E/cutils-trace(10597): Error opening trace file: Permission denied (13)
01-01 00:11:41.426 I/crash_dump64(10598): obtaining output fd from tombstoned, type: kDebuggerdTombstone
01-01 00:11:41.427 I//system/bin/tombstoned( 1750): received crash request for pid 10565
01-01 00:11:41.428 I/crash_dump64(10598): performing dump of process 10565 (target tid = 10565)
01-01 00:11:41.504 I/FastMixerState(10561): sMaxFastTracks = 8
01-01 00:11:41.506 V/MediaUtils(10561): physMem: 2050744320
01-01 00:11:41.507 V/MediaUtils(10561): requested limit: 410148860
01-01 00:11:41.507 V/MediaUtils(10561): actual limit: 410148860
01-01 00:11:41.507 V/MediaUtils(10561): original limits: 4294967295/4294967295
01-01 00:11:41.507 V/MediaUtils(10561): new limits: 410148860/4294967295
01-01 00:11:41.511 I/audioserver(10603): ServiceManager: 0xf051c100
01-01 00:11:41.513 W/BatteryNotifier(10603): batterystats service unavailable!
01-01 00:11:41.514 E/cutils-trace(10603): Error opening trace file: Permission denied (13)
01-01 00:11:41.515 W/hwservicemanager( 1658): getTransport: Cannot find entry android.hardware.audio@4.0::IDevicesFactory/default in either framework or device manifest.
01-01 00:11:41.517 W/hwservicemanager( 1658): getTransport: Cannot find entry android.hardware.audio@2.0::IDevicesFactory/default in either framework or device manifest.
01-01 00:11:41.519 D/vndksupport(10603): Loading /vendor/lib/hw/android.hardware.audio@2.0-impl.so from current namespace instead of sphal namespace.
01-01 00:11:41.528 W/hwservicemanager( 1658): getTransport: Cannot find entry android.hardware.audio@2.0::IDevicesFactory/default in either framework or device manifest.
01-01 00:11:41.529 D/vndksupport(10603): Loading /vendor/lib/hw/android.hardware.audio@2.0-impl.so from current namespace instead of sphal namespace.
01-01 00:11:41.531 W/hwservicemanager( 1658): getTransport: Cannot find entry android.hardware.audio@2.0::IDevicesFactory/msd in either framework or device manifest.
01-01 00:11:41.533 D/vndksupport(10603): Loading /vendor/lib/hw/android.hardware.audio@2.0-impl.so from current namespace instead of sphal namespace.
01-01 00:11:41.533 D/AndroidRuntime(10559): >>>>>> START com.android.internal.os.ZygoteInit uid 0 <<<<<<
01-01 00:11:41.535 W/hwservicemanager( 1658): getTransport: Cannot find entry android.hardware.audio.effect@4.0::IEffectsFactory/default in either framework or device manifest.
01-01 00:11:41.163 I/auditd (10568): type=1400 audit(0.0:1127): avc: denied { module_request } for comm=“ip6tables-resto” kmod=“ip6t_owner” scontext=u:r:netd:s0 tcontext=u:r:kernel:s0 tclass=system permissive=0
01-01 00:11:41.534 I/boot_progress_start(10559): 696564
01-01 00:11:41.538 W/hwservicemanager( 1658): getTransport: Cannot find entry android.hardware.audio.effect@2.0::IEffectsFactory/default in either framework or device manifest.
01-01 00:11:41.539 D/vndksupport(10603): Loading /vendor/lib/hw/android.hardware.audio.effect@2.0-impl.so from current namespace instead of sphal namespace.
01-01 00:11:41.546 I/zygote64(10559): option[0]=-Xzygote
01-01 00:11:41.546 I/zygote64(10559): option[1]=-Xusetombstonedtraces
01-01 00:11:41.546 I/zygote64(10559): option[2]=exit
01-01 00:11:41.546 I/zygote64(10559): option[3]=vfprintf
01-01 00:11:41.546 I/zygote64(10559): option[4]=sensitiveThread
01-01 00:11:41.546 I/zygote64(10559): option[5]=-verbose:gc
01-01 00:11:41.546 I/zygote64(10559): option[6]=-Xms16m
01-01 00:11:41.546 I/zygote64(10559): option[7]=-Xmx512m
01-01 00:11:41.546 I/zygote64(10559): option[8]=-XX:HeapGrowthLimit=192m
01-01 00:11:41.546 I/zygote64(10559): option[9]=-XX:HeapMinFree=512k
01-01 00:11:41.546 I/zygote64(10559): option[10]=-XX:HeapMaxFree=8m
01-01 00:11:41.546 I/zygote64(10559): option[11]=-XX:HeapTargetUtilization=0.75
01-01 00:11:41.546 I/zygote64(10559): option[12]=-Xusejit:true
01-01 00:11:41.546 I/zygote64(10559): option[13]=-Xjitsaveprofilinginfo
01-01 00:11:41.546 I/zygote64(10559): option[14]=-XjdwpOptions:suspend=n,server=y
01-01 00:11:41.546 I/zygote64(10559): option[15]=-XjdwpProvider:default
01-01 00:11:41.546 I/zygote64(10559): option[16]=-Xlockprofthreshold:500
01-01 00:11:41.546 I/zygote64(10559): option[17]=-Ximage-compiler-option
01-01 00:11:41.546 I/zygote64(10559): option[18]=–runtime-arg
01-01 00:11:41.546 I/zygote64(10559): option[19]=-Ximage-compiler-option
01-01 00:11:41.546 I/zygote64(10559): option[20]=-Xms64m
01-01 00:11:41.546 I/zygote64(10559): option[21]=-Ximage-compiler-option
01-01 00:11:41.546 I/zygote64(10559): option[22]=–runtime-arg
01-01 00:11:41.546 I/zygote64(10559): option[23]=-Ximage-compiler-option
01-01 00:11:41.547 I/zygote64(10559): option[24]=-Xmx64m
01-01 00:11:41.547 I/zygote64(10559): option[25]=-Ximage-compiler-option
01-01 00:11:41.547 I/zygote64(10559): option[26]=–profile-file=/system/etc/boot-image.prof
01-01 00:11:41.547 I/zygote64(10559): option[27]=-Ximage-compiler-option
01-01 00:11:41.547 I/zygote64(10559): option[28]=–compiler-filter=speed-profile
01-01 00:11:41.547 I/zygote64(10559): option[29]=-Xcompiler-option
01-01 00:11:41.547 I/zygote64(10559): option[30]=–runtime-arg
01-01 00:11:41.547 I/zygote64(10559): option[31]=-Xcompiler-option
01-01 00:11:41.547 I/zygote64(10559): option[32]=-Xms64m
01-01 00:11:41.547 I/zygote64(10559): option[33]=-Xcompiler-option
01-01 00:11:41.547 I/zygote64(10559): option[34]=–runtime-arg
01-01 00:11:41.547 I/zygote64(10559): option[35]=-Xcompiler-option
01-01 00:11:41.547 I/zygote64(10559): option[36]=-Xmx512m
01-01 00:11:41.547 I/zygote64(10559): option[37]=-Ximage-compiler-option
01-01 00:11:41.547 I/zygote64(10559): option[38]=–instruction-set-variant=cortex-a53
01-01 00:11:41.547 I/zygote64(10559): option[39]=-Xcompiler-option
01-01 00:11:41.547 I/zygote64(10559): option[40]=–instruction-set-variant=cortex-a53
01-01 00:11:41.547 I/zygote64(10559): option[41]=-Ximage-compiler-option
01-01 00:11:41.547 I/zygote64(10559): option[42]=–instruction-set-features=default
01-01 00:11:41.547 I/zygote64(10559): option[43]=-Xcompiler-option
01-01 00:11:41.547 I/zygote64(10559): option[44]=–instruction-set-features=default
01-01 00:11:41.547 I/zygote64(10559): option[45]=-Duser.locale=en-US
01-01 00:11:41.547 I/zygote64(10559): option[46]=–cpu-abilist=arm64-v8a
01-01 00:11:41.547 I/zygote64(10559): option[47]=-Xfingerprint:Android/hikey/hikey:9/PD2A.190115.032/ricky06261125:userdebug/test-keys

Use AOSP Master branch. None of the developer boards (hikey, hikey960, dragonboard845c) have ever been supported on release branches, despite the fact that there appear to be files for them present.

It is certainly possible to make them work on release branches, HOWEVER, to do so would require you to put in a lot of work. They will definitely NOT work “as is”.

Thanks doitright.

But I want to build with Android 9. How can I setup the repo to be Android 9 Master branch?
Or any recommend branch for AOSP Android 9?

Thanks a lot.

There is no such thing as “android 9 master”.
Master is master.
Right now, master consists of android 10 + some of what will become part of android 11 + some of what will become android 12.

There is no way for you to build android 9 without doing a lot of work, and if you need me to explain what you need to do to accomplish that, then I might as well do it myself, which I’m not going to do.

Thank you doitright.

I just need Android 9 for working project. If Hikey can’t work with it, I may consider to get another boards like hikey 960 or 970.

I saw it seems mali driver has some problems with Android 9 so search in the web.

I just saw this thread from https://www.linaro.org/blog/update-on-hikey-hikey960-efforts-in-aosp/.

The kernel version for Android 9 is 4.9.

“making andorid-4.19 the last stop for HiKey in AOSP” <= Does it mean hikey Lemaker can’t support Android 9 any more?

But the sun has begun to set for the HiKey board. It’s not been available via retail for quite some time, the lack of GLES3 support, and the 1GB (then expanded to 2GB) ram size has become quite limiting for the AOSP environment. So in the last few months, documentation on using HiKey has been removed from the public Android web sites, and the needed mali driver support wasn’t added to the android-5.4 kernel, making andorid-4.19 the last stop for HiKey in AOSP.

I think you missed the part where I said that NO dev boards are supported on release branches. 970 isn’t supported in android AT ALL.

Dev boards aren’t dev in the sense of you writing android applications and testing them. Dev boards are dev in the sense of you contributing to the advancement of Android itself, which only makes sense on the master branch.

If you need to test applications you write on Android 9, you should try using retail consumer hardware (for example, a Google Pixel phone – 3A or older if you need Android 9) or the emulator.

And note that the kernel version is NOT tied to the version of Android. For instance, my Pixel 2 XL phone is running kernel 4.4 with Android 10.

Thank you doitright.

Actually I’m trying to port our product (LTE/NR5G module) on Android 9 so that’s why I need to try with hikey AOSP Android 9 and rebuild with my own kernel image.

The HDMI driver linaro-hikey-20170523-4b9ebaff.tgz I got seems too old for Android 9. Is there any way that I can download new driver or any latest SOP for Hikey 6220 with AOSP Android 9?

Thanks for your reply.

I guess it comes down to the difference between “can’t” and “doesn’t”.

It is certainly possible to get the Android 9 release branches running in Hikey but, as @doitright said, this kind of backporting doesn’t really benefit AOSP so the Android 9 product branches aren’t updated with additional board support.

The rough outline is:

  1. Find out when Google released Android 9 :wink:
  2. Check out historic versions of AOSP to find when the master branch was fixed for Hikey after the Google code from Android 9 was merged to the master branch
  3. Looks at the diffs and backport the necessary fixes

From the above list, #2 and #3 sound easy but usually turn out to be fiddly, time consuming and, occasionally, also frustrating. You are certainly welcome to give it a go… but I’m afraid there’s unlikely to be much help on the forum unless you can find somebody who’s already done the backport (and I’m not sure any such people are hanging out on the forums).

Thanks danielt.

Seems somebody got the same issue here.

Just want to update some test results. I tried to build kernel 4.4, 4.9, and 4.14 from hikey kernel branches. Only kernel 4.4 can have the HDMI display, the others 2 are all the same issue with mali driver.

At least I can continue my work with Android 9 + kernel 4.4. Thanks @doitright @danielt

Just to help you understand how much of a problem you are creating for yourself, read this file:

https://android.googlesource.com/device/linaro/hikey/+/refs/heads/master/hikey-common.mk

That file, and a variation of it, has been in the master branch for a few years, not present in any release branch. What it does, is when the kernel version is set to 4.9 or higher, it switches from the obsolete blob mali driver you are struggling with to proper mesa+drm_hwcomposer.

Thanks for your reply. @doitright.

Sorry I’m not familiar with mali driver. I just compared this file in Android 9 codebase and there is no “HIKEY_USE_DRM_HWCOMPOSER := true” in it.

Do you mean I need to add this line to switch for 4.9 or 4.14 kernel in this file if I want to use Android 9?

ifeq ($(TARGET_KERNEL_USE), 3.18)
TARGET_FSTAB := fstab.hikey-$(TARGET_KERNEL_USE)
HIKEY_USE_LEGACY_TI_BLUETOOTH := true
else
ifeq ($(TARGET_KERNEL_USE), 4.4)
HIKEY_USE_LEGACY_TI_BLUETOOTH := true
else
HIKEY_USE_LEGACY_TI_BLUETOOTH := false
endif
TARGET_FSTAB := fstab.hikey
endif

Exactly my point. Like I’ve said before, dev hardware is NOT SUPPORTED IN RELEASE BRANCHES.