Hikey960 and Hikey Android TV Build Target Upstreamed

The AOSP master branch now contains two more targets

  • hikey_tv
  • hikey960_tv
    both result in an AOSP TV build for the respective devices

To build follow this guide: https://source.android.com/setup/build/devices
replace lunch hikey960-userdebug with lunch hikey960_tv-userdebug or lunch hikey-userdebug with lunch hikey_tv-userdebug

I will be writing a proper guide later this week.

Minor issues:

  • WiFi connection UI doesn’t have a “next” button.
    To be able to connect we have to use third-party apps
  • hikey boots to UI with kernel 4.4 or less

gerrit commit in case anyone is interested: https://android-review.googlesource.com/c/device/linaro/hikey/+/755308

Neat. I’ll have to pick up some hikey’s for this to replace my Nexus player and add a couple more. The 960 is definitely overkill for the purpose and far too expensive to justify.

I have built images from master branch and flashed on Hikey Board, When I connected to TV or through vysor, there is no display. I see a crash in streamHAL. has anyone seen this issue?

01-01 00:08:21.155 10534 10534 I zygote : option[42]=-Xfingerprint:Android/hikey_tv/hikey:Q/PI/svkr52101030503:userdebug/test-keys
01-01 00:08:21.157 10592 10592 F DEBUG :
01-01 00:08:21.157 10592 10592 F DEBUG : backtrace:
01-01 00:08:21.157 10592 10592 F DEBUG : #00 pc 00000000000734dc /system/lib64/libsurfaceflinger.so (android::FramebufferSurface::FramebufferSurface(android::HWComposer&, int, android::spandroid::IGraphicBufferConsumer const&)+292)
01-01 00:08:21.157 10592 10592 F DEBUG : #01 pc 00000000000abdf8 /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::processDisplayChangesLocked()+2392)
01-01 00:08:21.157 10592 10592 F DEBUG : #02 pc 00000000000a376c /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::processDisplayHotplugEventsLocked()+1212)
01-01 00:08:21.157 10592 10592 F DEBUG : #03 pc 00000000000a5894 /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::onHotplugReceived(int, unsigned long, HWC2::Connection)+340)
01-01 00:08:21.157 10592 10592 F DEBUG : #04 pc 0000000000077c2c /system/lib64/libsurfaceflinger.so (_ZN4HWC212_GLOBAL__N_122ComposerCallbackBridge9onHotplugEmN7android8hardware8graphics8composer4V2_117IComposerCallback10ConnectionE$a5b8efe6c13b353e4aafd2b294349a04+36)
01-01 00:08:21.157 10592 10592 F DEBUG : #05 pc 00000000000260f8 /system/lib64/android.hardware.graphics.composer@2.1.so (android::hardware::graphics::composer::V2_1::BnHwComposerCallback::_hidl_onHotplug(android::hidl::base::V1_0::BnHwBase*, android::hardware::Parcel const&, android::hardware::Parcel*, std::__1::function<void (android::hardware::Parcel&)>)+208)
01-01 00:08:21.157 10592 10592 F DEBUG : #06 pc 0000000000026c80 /system/lib64/android.hardware.graphics.composer@2.1.so (android::hardware::graphics::composer::V2_1::BnHwComposerCallback::onTransact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+680)
01-01 00:08:21.157 10592 10592 F DEBUG : #07 pc 0000000000016224 /system/lib64/libhwbinder.so (android::hardware::IPCThreadState::executeCommand(int)+516)
01-01 00:08:21.157 10592 10592 F DEBUG : #08 pc 0000000000016e84 /system/lib64/libhwbinder.so (android::hardware::IPCThreadState::waitForResponse(android::hardware::Parcel*, int*)+148)
01-01 00:08:21.157 10592 10592 F DEBUG : #09 pc 0000000000012db4 /system/lib64/libhwbinder.so (android::hardware::BpHwBinder::transact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+132)
01-01 00:08:21.157 10592 10592 F DEBUG : #10 pc 000000000002b310 /system/lib64/android.hardware.graphics.composer@2.1.so (android::hardware::graphics::composer::V2_1::BpHwComposerClient::_hidl_registerCallback(android::hardware::IInterface*, android::hardware::details::HidlInstrumentor*, android::spandroid::hardware::graphics::composer::V2_1::IComposerCallback const&)+336)
01-01 00:08:21.157 10592 10592 F DEBUG : #11 pc 000000000006ad8c /system/lib64/libsurfaceflinger.so (android::Hwc2::impl::Composer::registerCallback(android::spandroid::hardware::graphics::composer::V2_1::IComposerCallback const&)+44)
01-01 00:08:21.157 10592 10592 F DEBUG : #12 pc 0000000000074340 /system/lib64/libsurfaceflinger.so (HWC2::Device::registerCallback(HWC2::ComposerCallback*, int)+200)
01-01 00:08:21.157 10592 10592 F DEBUG : #13 pc 00000000000a2a08 /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::init()+1000)
01-01 00:08:21.157 10592 10592 F DEBUG : #14 pc 000000000000418c /system/bin/surfaceflinger (main+316)
01-01 00:08:21.157 10592 10592 F DEBUG : #15 pc 000000000007fed4 /system/lib64/libc.so (_libc_init+108)
01-01 00:08:21.162 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.286 10541 10563 I chatty : uid=1041(audioserver) HwBinder:10541
identical 11 lines
01-01 00:08:21.297 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.304 10592 10592 E crash_dump64: unable to connect to activity manager: Connection refused
01-01 00:08:21.305 2025 2025 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_19
01-01 00:08:21.309 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.320 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.321 10542 10542 E ComposerHal: failed to send onHotplug: Status(EX_TRANSACTION_FAILED): 'DEAD_OBJECT: ’
01-01 00:08:21.321 10542 10542 D ComposerHal: destroying composer client
01-01 00:08:21.322 10542 10542 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 10542 (composer@2.1-se), pid 10542 (composer@2.1-se)
01-01 00:08:21.332 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.340 10533 10533 D ICU : Time zone APEX file found: /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
01-01 00:08:21.343 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.354 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.362 10605 10605 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
01-01 00:08:21.363 2025 2025 I /system/bin/tombstoned: received crash request for pid 10542
01-01 00:08:21.363 10605 10605 I crash_dump64: performing dump of process 10542 (target tid = 10542)
01-01 00:08:21.365 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.369 10605 10605 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-01 00:08:21.370 10605 10605 F DEBUG : Build fingerprint: ‘Android/hikey_tv/hikey:Q/PI/svkr52101030503:userdebug/test-keys’
01-01 00:08:21.370 10605 10605 F DEBUG : Revision: ‘0’
01-01 00:08:21.370 10605 10605 F DEBUG : ABI: ‘arm64’
01-01 00:08:21.370 10605 10605 F DEBUG : Timestamp: 1970-01-01 00:08:21+0000
01-01 00:08:21.370 10605 10605 F DEBUG : pid: 10542, tid: 10542, name: composer@2.1-se >>> /vendor/bin/hw/android.hardware.graphics.composer@2.1-service <<<
01-01 00:08:21.370 10605 10605 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
01-01 00:08:21.370 10605 10605 F DEBUG : Cause: null pointer dereference
01-01 00:08:21.371 10605 10605 F DEBUG : x0 0000007dece48700 x1 0000000000000000 x2 0000000000000001 x3 0000000000000000
01-01 00:08:21.371 10605 10605 F DEBUG : x4 0064657374000000 x5 0000000080000000 x6 1101041300000000 x7 0000008013040111
01-01 00:08:21.371 10605 10605 F DEBUG : x8 0000007dece16b40 x9 27ec2cd7812b182f x10 0000007ffa4ad200 x11 000000000000001b
01-01 00:08:21.371 10605 10605 F DEBUG : x12 0000007ffa4ad338 x13 0000000000000003 x14 0000000000000008 x15 00000627855552d0
01-01 00:08:21.371 10605 10605 F DEBUG : x16 0000007debebdeb0 x17 0000007debeb1de8 x18 0000007deddac000 x19 0000000000000000
01-01 00:08:21.371 10605 10605 F DEBUG : x20 0000007dece48700 x21 0000007dece36200 x22 0000000000000001 x23 0000007deded8188
01-01 00:08:21.371 10605 10605 F DEBUG : x24 0000007dece16540 x25 0000007dece16b40 x26 0000000000000000 x27 0000000000000000
01-01 00:08:21.371 10605 10605 F DEBUG : x28 0000000000000000 x29 0000007ffa4ad730
01-01 00:08:21.371 10605 10605 F DEBUG : sp 0000007ffa4ad6d0 lr 0000007debeb1e98 pc 0000000000000000
01-01 00:08:21.393 10605 10605 F DEBUG :
01-01 00:08:21.393 10605 10605 F DEBUG : backtrace:
01-01 00:08:21.393 10605 10605 F DEBUG : #00 pc 0000000000000000
01-01 00:08:21.393 10605 10605 F DEBUG : #01 pc 000000000001de94 /vendor/lib64/hw/hwcomposer.drm.so (android::DrmHwcTwo::RegisterCallback(int, void*, void ()())+172)
01-01 00:08:21.393 10605 10605 F DEBUG : #02 pc 000000000001ff78 /vendor/lib64/hw/hwcomposer.drm.so (ZN7android9DrmHwcTwo10DeviceHookIiMS0_FN4HWC25ErrorEiPvPFvvEEXadL_ZNS0_16RegisterCallbackEiS4_S6_EEJiS4_S6_EEET_P11hwc2_deviceDpT2+8)
01-01 00:08:21.393 10605 10605 F DEBUG : #03 pc 0000000000008964 /vendor/lib64/hw/android.hardware.graphics.composer@2.1-impl.so (android::hardware::graphics::composer::V2_1::passthrough::detail::HwcHalImplandroid::hardware::graphics::composer::V2_1::hal::ComposerHal::unregisterEventCallback()+36)
01-01 00:08:21.393 10605 10605 F DEBUG : #04 pc 000000000000c86c /vendor/lib64/hw/android.hardware.graphics.composer@2.1-impl.so (android::hardware::graphics::composer::V2_1::hal::detail::ComposerClientImpl<android::hardware::graphics::composer::V2_1::IComposerClient, android::hardware::graphics::composer::V2_1::hal::ComposerHal>::~ComposerClientImpl()+100)
01-01 00:08:21.393 10605 10605 F DEBUG : #05 pc 000000000000c7ec /vendor/lib64/hw/android.hardware.graphics.composer@2.1-impl.so (_ZTv0_n24_N7android8hardware8graphics8composer4V2_13hal6detail18ComposerClientImplINS3_15IComposerClientENS4_11ComposerHalEED0Ev+36)
01-01 00:08:21.393 10605 10605 F DEBUG : #06 pc 000000000000f6b8 /system/lib64/vndk-sp-Q/libutils.so (android::RefBase::decStrong(void const
) const+112)
01-01 00:08:21.393 10605 10605 F DEBUG : #07 pc 000000000006efe8 /system/lib64/vndk-sp-Q/libhidltransport.so (android::hidl::base::V1_0::BnHwBase::~BnHwBase()+192)
01-01 00:08:21.393 10605 10605 F DEBUG : #08 pc 000000000003399c /system/lib64/vndk-Q/android.hardware.graphics.composer@2.1.so (android::hardware::graphics::composer::V2_1::BnHwComposerClient::~BnHwComposerClient()+196)
01-01 00:08:21.393 10605 10605 F DEBUG : #09 pc 0000000000033afc /system/lib64/vndk-Q/android.hardware.graphics.composer@2.1.so (_ZTv0_n24_N7android8hardware8graphics8composer4V2_118BnHwComposerClientD0Ev+36)
01-01 00:08:21.393 10605 10605 F DEBUG : #10 pc 000000000000f6b8 /system/lib64/vndk-sp-Q/libutils.so (android::RefBase::decStrong(void const*) const+112)
01-01 00:08:21.393 10605 10605 F DEBUG : #11 pc 00000000000167d0 /system/lib64/vndk-sp-Q/libhwbinder.so (android::hardware::IPCThreadState::processPendingDerefs()+88)
01-01 00:08:21.393 10605 10605 F DEBUG : #12 pc 0000000000016904 /system/lib64/vndk-sp-Q/libhwbinder.so (android::hardware::IPCThreadState::joinThreadPool(bool)+60)
01-01 00:08:21.393 10605 10605 F DEBUG : #13 pc 00000000000011a8 /vendor/bin/hw/android.hardware.graphics.composer@2.1-service (main+344)
01-01 00:08:21.393 10605 10605 F DEBUG : #14 pc 000000000007fed4 /apex/com.android.runtime/lib64/libc.so (libc_init+108)
01-01 00:08:21.387 10541 10563 I chatty : uid=1041(audioserver) HwBinder:10541
identical 2 lines
01-01 00:08:21.399 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.402 10534 10534 D ICU : Time zone APEX file found: /apex/com.android.tzdata/etc/icu/icu_tzdata.dat
01-01 00:08:21.410 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.444 10541 10563 I chatty : uid=1041(audioserver) HwBinder:10541
identical 3 lines
01-01 00:08:21.455 10541 10563 W StreamHAL: Error from HAL stream in function get_presentation_position: Operation not permitted
01-01 00:08:21.462 1850 1850 I ServiceManager: service ‘media.audio_flinger’ died
01-01 00:08:21.462 10541 10541 I r_submix: adev_close()
01-01 00:08:21.463 1850 1850 I ServiceManager: service ‘media.log’ died
01-01 00:08:21.479 10534 10534 I zygote : Explicit concurrent copying GC freed 191(25KB) AllocSpace objects, 0(0B) LOS objects, 98% free, 22KB/1558KB, paused 105us total 8.735ms
01-01 00:08:21.488 10534 10534 I zygote : Explicit concurrent copying GC freed 5(32KB) AllocSpace objects, 0(0B) LOS objects, 98% free, 22KB/1558KB, paused 75us total 8.358ms
01-01 00:08:21.488 10534 10534 D Zygote32Timing: PostZygoteInitGC took to complete: 18ms
01-01 00:08:21.489 10534 10534 D Zygote32Timing: ZygoteInit took to complete: 18ms
01-01 00:08:21.510 10605 10605 E crash_dump64: unable to connect to activity manager: Connection refused
01-01 00:08:21.510 2025 2025 E /system/bin/tombstoned: Tombstone written to: /data/tombstones/tombstone_20
01-01 00:08:21.512 10534 10534 I Zygote : Accepting command socket connections
01-01 00:08:21.513 1850 1850 I ServiceManager: service ‘media.player’ died
01-01 00:08:21.513 1850 1850 I ServiceManager: service ‘media.resource_manager’ died
01-01 00:08:21.541 1850 1850 I ServiceManager: service ‘netd’ died
01-01 00:08:21.632 1850 1850 I ServiceManager: service ‘wificond’ died
01-01 00:08:21.845 10623 10623 I wificond: wificond is starting up…
01-01 00:08:21.839 10623 10623 W wificond: type=1400 audit(0.0:1457): avc: denied { read } for name=“enabled” dev=“sysfs” ino=4368 scontext=u:r:wificond:s0 tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
01-01 00:08:22.584 10626 10626 W cmd : Can’t find service package
01-01 00:08:22.657 10631 10631 W cmd : Can’t find service package
01-01 00:08:22.929 10637 10637 W cmd : Can’t find service package
01-01 00:08:22.996 10641 10641 W cmd : Can’t find service package

Thanks,
Krishna.

I think you can ignore the streamhal errors. I see those in my automotive builds, which work properly.

Have you tried it with other displays? TV’s are often very sensitive to timing, which the hikey960 is not good at. For example, when you call for a 60 Hz refresh rate, the Hikey960 will produce 58 Hz. A lot of TV’s will reject this and display nothing.

I’m not sure what is up with your surfaceflinger errors. Those could be a consequence of the link failure with the TV, or they could be your actual problem.

Don’t waste your time with vysor. If your display isn’t lighting up, then vysor won’t be able to work anyway.

@ric96
Please let us know which third-party apps you used to be able to correct Wi-fi on Hikey-960.
LiveTV app on that ASOP TV version is also in problem, cannot be run.
Below is the issue I’ve seen so far:

01-05 19:35:04.668 4490 4490 E LoadedApk: java.lang.ClassNotFoundException: Didn’t find class “android.support.v4.app.CoreComponentFactory” on path: DexPathList[[zip file “/system/priv-app/LiveTv/LiveTv.apk”],nativeLibraryDirectories=[/system/priv-app/LiveTv/lib/arm64, /system/priv-app/LiveTv/LiveTv.apk!/lib/arm64-v8a, /system/lib64, /system/lib64]]

this one https://f-droid.org/en/packages/org.secuso.privacyfriendlywifimanager/

1 Like