Does anyone know a branch, version or manifest of the aosp sources that run on HiKey970?

Stock images are working but the version they were built from is nowhere to be found. I’m trying to build it out of master for two weeks now without a success or even getting close to building an image that resembles the stock one.

Hi,

I got the following info by using the command

adb shell cat system/build.prop

# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=OC-DR1
ro.build.display.id=hikey970-userdebug P OC-DR1 403 test-keys
ro.build.version.incremental=403
ro.build.version.sdk=26
ro.build.version.preview_sdk=1
ro.build.version.codename=P
ro.build.version.all_codenames=P
ro.build.version.release=P
ro.build.version.security_patch=2017-10-05
ro.build.version.base_os=
ro.build.date=Fri Apr 27 10:33:14 CST 2018
ro.build.date.utc=1524796394
ro.build.type=userdebug
ro.build.user=phisik3
ro.build.host=01-u10-141-107-212.huawei.com
ro.build.tags=test-keys
ro.build.flavor=hikey970-userdebug
ro.product.model=AOSP on hikey970
ro.product.brand=Android
ro.product.name=hikey970
ro.product.device=hikey970
# ro.product.cpu.abi and ro.product.cpu.abi2 are obsolete,
# use ro.product.cpu.abilist instead.
ro.product.cpu.abi=arm64-v8a
ro.product.cpu.abilist=arm64-v8a,armeabi-v7a,armeabi
ro.product.cpu.abilist32=armeabi-v7a,armeabi
ro.product.cpu.abilist64=arm64-v8a
ro.product.manufacturer=unknown
ro.product.locale=en-US
ro.wifi.channels=
# ro.build.product is obsolete; use ro.product.device
ro.build.product=hikey970
# Do not try to parse description, fingerprint, or thumbprint
ro.build.description=hikey970-userdebug P OC-DR1 403 test-keys
ro.build.fingerprint=Android/hikey970/hikey970:P/OC-DR1/403:userdebug/test-keys
ro.build.characteristics=default
# end build properties

#
# ADDITIONAL_BUILD_PROPERTIES
#
dalvik.vm.heapstartsize=16m
dalvik.vm.heapgrowthlimit=192m
dalvik.vm.heapsize=512m
dalvik.vm.heaptargetutilization=0.75
dalvik.vm.heapminfree=512k
dalvik.vm.heapmaxfree=8m
wifi.interface=wlan0
wifi.supplicant_scan_interval=15
ro.config.ringtone=Ring_Synth_04.ogg
ro.config.notification_sound=pixiedust.ogg
ro.carrier=unknown
ro.config.alarm_alert=Alarm_Classic.ogg
ro.dalvik.vm.native.bridge=0
ro.bionic.ld.warning=1
ro.treble.enabled=false
persist.sys.dalvik.vm.lib.2=libart.so
dalvik.vm.isa.arm64.variant=cortex-a73
dalvik.vm.isa.arm64.features=default
dalvik.vm.isa.arm.variant=cortex-a73
dalvik.vm.isa.arm.features=default
dalvik.vm.lockprof.threshold=500
net.bt.name=Android
dalvik.vm.stack-trace-file=/data/anr/traces.txt

From this, it seems the build ID is

ro.build.display.id=hikey970-userdebug P OC-DR1 403 test-keys

However I am still investigating which tag/branch it belongs to.

Regards,
Nishad

Hi,

While investigating the source for the pre-built images,
I came across the following branch as the closest to the version of the pre-built images.

https://android.googlesource.com/platform/manifest/+/pie-dr1-dev

After building the same with source built ramdisk.img, boot.img, system.img, cache.img and userdata.img
the board boots successfully with HDMI display.

Note: Change the size of the userdata image to 24GB from 53GB in “device/linaro/hikey/hikey970/BoardConfig.mk”

file as follows:

include device/linaro/hikey/BoardConfigCommon.mk

TARGET_BOOTLOADER_BOARD_NAME := hikey970
TARGET_BOARD_PLATFORM := hikey970

TARGET_CPU_VARIANT := cortex-a73
TARGET_2ND_CPU_VARIANT := cortex-a73

TARGET_NO_DTIMAGE := false

BOARD_KERNEL_CMDLINE := androidboot.hardware=hikey970 console=ttyFIQ0 androidboot.console=ttyFIQ0
BOARD_KERNEL_CMDLINE += firmware_class.path=/system/etc/firmware loglevel=15
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
ifneq ($(TARGET_SENSOR_MEZZANINE),)
BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_$(TARGET_SENSOR_MEZZANINE)
endif
BOARD_MKBOOTIMG_ARGS := --base 0x0 --tags_offset 0x07a00000 --kernel_offset 0x00080000 --ramdisk_offset 0x07c00000

BOARD_SYSTEMIMAGE_PARTITION_SIZE := 4915724288  # 4688MB
BOARD_USERDATAIMAGE_PARTITION_SIZE := 25769803776 # 24GB
BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456       # 256MB
BOARD_FLASH_BLOCK_SIZE := 512
~                                     

Thanks and regards,
Nishad

Android 9.0 r8, for more information, can search in github

For me Android 9.0 r8 doesn’t build have you try jackzhang1120?

i going to try the nishad_kamdar version
thanks

This version build but when i flash it i get the following error
[ 27.476052] DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[ 27.476095] DEBUG: Build fingerprint: ‘Android/hikey970/hikey970:9/PI/olivier09051648:userdebug/test-keys’
[ 27.476108] DEBUG: Revision: ‘0’
[ 27.476119] DEBUG: ABI: ‘arm64’
[ 27.476133] DEBUG: pid: 2946, tid: 2946, name: surfaceflinger >>> /system/bin/surfaceflinger <<<
[ 27.476148] DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
[ 27.476204] DEBUG: Abort message: ‘failed to get hwcomposer service’
[ 27.476227] DEBUG: x0 0000000000000000 x1 0000000000000b82 x2 0000000000000006 x3 0000000000000008
[ 27.476241] DEBUG: x4 fefffd5eff716472 x5 fefffd5eff716472 x6 fefffd5eff716472 x7 7f7fff7f7f7f7f7f
[ 27.476258] DEBUG: x8 0000000000000083 x9 0000fe60831ba930 x10 fffffff87fffffdf x11 0000000000000001
[ 27.476273] DEBUG: x12 0000ffffe266cff0 x13 ffffffffffffffff x14 ffffffffff000000 x15 ffffffffffffffff
[ 27.476287] DEBUG: x16 0000fe60831f32c0 x17 0000fe6083131260 x18 0000ffffe266c7da x19 0000000000000b82
[ 27.476301] DEBUG: x20 0000000000000b82 x21 0000000000000083 x22 0000fe600204da08 x23 0000000000000000
[ 27.476314] DEBUG: x24 0000fe5ffe056300 x25 0000fe6084d1c5e0 x26 0000ffffe266da40 x27 00000000000f4240
[ 27.476328] DEBUG: x28 0000000000000000 x29 0000ffffe266cf10
[ 27.476341] DEBUG: sp 0000ffffe266ced0 lr 0000fe6083125a18 pc 0000fe6083125a44
[ 27.482710] DEBUG:
[ 27.482712] DEBUG: backtrace:
[ 27.482739] DEBUG: #00 pc 0000000000021a44 /system/lib64/libc.so (abort+124)
[ 27.482754] DEBUG: #01 pc 00000000000080f8 /system/lib64/liblog.so (__android_log_assert+296)
[ 27.482810] DEBUG: #02 pc 000000000006b0e0 /system/lib64/libsurfaceflinger.so (android::Hwc2::impl::Composer::Composer(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&)+1008)
[ 27.482825] DEBUG: #03 pc 00000000000a55f0 /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::init()+936)
[ 27.482839] DEBUG: #04 pc 0000000000002f48 /system/bin/surfaceflinger (main+320)
[ 27.482852] DEBUG: #05 pc 00000000000ae6e8 /system/lib64/libc.so (__libc_init+88)
[ 27.676751] init: Could not find service hosting interface android.hardware.audio@2.0::IDevicesFactory/default
[ 28.681489] DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[ 28.690865] DEBUG: Build fingerprint: ‘Android/hikey970/hikey970:9/PI/olivier09051648:userdebug/test-keys’
[ 28.700572] DEBUG: Revision: ‘0’
[ 28.704010] DEBUG: ABI: ‘arm64’
[ 28.707164] DEBUG: pid: 2998, tid: 2998, name: app_process64 >>> /system/bin/app_process64 <<<
[ 28.715898] DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
[ 28.723226] DEBUG: Abort message: ‘Error creating cache dir /data/dalvik-cache/arm64 : No such file or directory’
[ 28.733580] DEBUG: x0 0000000000000000 x1 0000000000000bb6 x2 0000000000000006 x3 0000000000000008
[ 28.743522] DEBUG: x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 ffffffff7f7f7f7f
[ 28.753459] DEBUG: x8 0000000000000083 x9 0000fc4cb48fa930 x10 fffffff87fffffdf x11 0000000000000001
[ 28.763395] DEBUG: x12 0000000000000001 x13 0000000000000000 x14 0000000000000000 x15 ffffffffffffffff
[ 28.773330] DEBUG: x16 0000fc4cb49332c0 x17 0000fc4cb4871260 x18 0000000000000000 x19 0000000000000bb6
[ 28.783263] DEBUG: x20 0000000000000bb6 x21 0000000000000083 x22 0000acd738867a7f x23 0000acd738867ed0
[ 28.793195] DEBUG: x24 0000acd738883ad8 x25 0000acd738867a9e x26 0000ffffc77bce70 x27 0000ffffc77bdbaf
[ 28.803130] DEBUG: x28 0000000000000005 x29 0000ffffc77bb770
[ 28.809238] DEBUG: sp 0000ffffc77bb730 lr 0000fc4cb4865a18 pc 0000fc4cb4865a44
[ 28.818322] DEBUG:
[ 28.820423] DEBUG: backtrace:
[ 28.823407] DEBUG: #00 pc 0000000000021a44 /system/lib64/libc.so (abort+124)
[ 28.830911] DEBUG: #01 pc 00000000000080f8 /system/lib64/liblog.so (__android_log_assert+296)
[ 28.839888] DEBUG: #02 pc 0000000000002398 /system/bin/app_process64 (main+1704)
[ 28.847767] DEBUG: #03 pc 00000000000ae6e8 /system/lib64/libc.so (__libc_init+88)
[ 29.235055] DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[ 29.242783] DEBUG: Build fingerprint: ‘Android/hikey970/hikey970:9/PI/olivier09051648:userdebug/test-keys’
[ 29.252635] DEBUG: Revision: ‘0’
[ 29.255903] DEBUG: ABI: ‘arm’
[ 29.258906] DEBUG: pid: 3008, tid: 3008, name: app_process32 >>> /system/bin/app_process32 <<<
[ 29.267695] DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
[ 29.275011] DEBUG: Abort message: ‘Error creating cache dir /data/dalvik-cache/arm : No such file or directory’
[ 29.285352] DEBUG: r0 00000000 r1 00000bc0 r2 00000006 r3 00000008
[ 29.292559] DEBUG: r4 00000bc0 r5 00000bc0 r6 ff9bf724 r7 0000010c
[ 29.299786] DEBUG: r8 ff9c1b85 r9 00000001 r10 00000003 r11 00000005
[ 29.306996] DEBUG: ip ff9bf6c0 sp ff9bf710 lr e4e2bf89 pc e4e23dda
[ 29.316993] DEBUG:
[ 29.319089] DEBUG: backtrace:
[ 29.322104] DEBUG: #00 pc 0001cdda /system/lib/libc.so (abort+58)
[ 29.328688] DEBUG: #01 pc 00006ccd /system/lib/liblog.so (__android_log_assert+156)
[ 29.336821] DEBUG: #02 pc 00001ad1 /system/bin/app_process32 (main+1056)
[ 29.344017] DEBUG: #03 pc 0008afad /system/lib/libc.so (__libc_init+48)
[ 29.351100] DEBUG: #04 pc 0000166f /system/bin/app_process32 (_start_main+38)
[ 29.358686] DEBUG: #05 pc 00000306 anonymous:e8845000
[ 32.328081] init: Failed to bind socket ‘pdx/system/vr/display/client’: No such file or directory
[ 32.337322] init: Failed to bind socket ‘pdx/system/vr/display/manager’: No such file or directory
[ 32.346547] init: Failed to bind socket ‘pdx/system/vr/display/vsync’: No such file or directory
[ 32.454735] [drm:kirin_fbdev_mmap] ERROR size=3842048 is out of range(3840000)!
[ 32.470291] init: Could not find service hosting interface android.hardware.audio@2.0::IDevicesFactory/default
[ 32.481192] init: Could not find service hosting interface android.hardware.audio@2.0::IDevicesFactory/default
[ 32.485848] DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[ 32.485914] DEBUG: Build fingerprint: ‘Android/hikey970/hikey970:9/PI/olivier09051648:userdebug/test-keys’
[ 32.485929] DEBUG: Revision: ‘0’
[ 32.485942] DEBUG: ABI: ‘arm64’
[ 32.485958] DEBUG: pid: 3047, tid: 3047, name: surfaceflinger >>> /system/bin/surfaceflinger <<<
[ 32.485972] DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
[ 32.486003] DEBUG: Abort message: ‘failed to get hwcomposer service’
[ 32.486028] DEBUG: x0 0000000000000000 x1 0000000000000be7 x2 0000000000000006 x3 0000000000000008
[ 32.486044] DEBUG: x4 fefffcc7ff716472 x5 fefffcc7ff716472 x6 fefffcc7ff716472 x7 7f7fffff7f7f7f7f
[ 32.486065] DEBUG: x8 0000000000000083 x9 0000fdc9852f8930 x10 fffffff87fffffdf x11 0000000000000001
[ 32.486081] DEBUG: x12 0000fffff410b9a0 x13 ffffffffffffffff x14 ffffffffff000000 x15 ffffffffffffffff
[ 32.486098] DEBUG: x16 0000fdc9853312c0 x17 0000fdc98526f260 x18 0000fffff410b18a x19 0000000000000be7
[ 32.486113] DEBUG: x20 0000000000000be7 x21 0000000000000083 x22 0000fdc90384da08 x23 0000000000000000
[ 32.486128] DEBUG: x24 0000fdc8ff856f80 x25 0000fdc9865b65e0 x26 0000fffff410c3f0 x27 00000000000f4240
[ 32.486144] DEBUG: x28 0000000000000000 x29 0000fffff410b8c0
[ 32.486161] DEBUG: sp 0000fffff410b880 lr 0000fdc985263a18 pc 0000fdc985263a44
[ 32.492746] DEBUG:
[ 32.492748] DEBUG: backtrace:
[ 32.492777] DEBUG: #00 pc 0000000000021a44 /system/lib64/libc.so (abort+124)
[ 32.492803] DEBUG: #01 pc 00000000000080f8 /system/lib64/liblog.so (__android_log_assert+296)
[ 32.492835] DEBUG: #02 pc 000000000006b0e0 /system/lib64/libsurfaceflinger.so (android::Hwc2::impl::Composer::Composer(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&)+1008)
[ 32.492852] DEBUG: #03 pc 00000000000a55f0 /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::init()+936)
[ 32.492867] DEBUG: #04 pc 0000000000002f48 /system/bin/surfaceflinger (main+320)
[ 32.492882] DEBUG: #05 pc 00000000000ae6e8 /system/lib64/libc.so (__libc_init+88)
[ 33.706494] DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[ 33.714233] DEBUG: Build fingerprint: ‘Android/hikey970/hikey970:9/PI/olivier09051648:userdebug/test-keys’
[ 33.724451] DEBUG: Revision: ‘0’
[ 33.727764] DEBUG: ABI: ‘arm64’
[ 33.730943] DEBUG: pid: 3098, tid: 3098, name: app_process64 >>> /system/bin/app_process64 <<<
[ 33.739715] DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
[ 33.747054] DEBUG: Abort message: ‘Error creating cache dir /data/dalvik-cache/arm64 : No such file or directory’
[ 33.757397] DEBUG: x0 0000000000000000 x1 0000000000000c1a x2 0000000000000006 x3 0000000000000008
[ 33.767829] DEBUG: x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 7fffffff7f7f7f7f
[ 33.777805] DEBUG: x8 0000000000000083 x9 0000fd4817cb6930 x10 fffffff87fffffdf x11 0000000000000001
[ 33.787836] DEBUG: x12 0000000000000001 x13 0000000000000000 x14 0000000000000000 x15 ffffffffffffffff
[ 33.797776] DEBUG: x16 0000fd4817cef2c0 x17 0000fd4817c2d260 x18 0000000000000000 x19 0000000000000c1a
[ 33.807744] DEBUG: x20 0000000000000c1a x21 0000000000000083 x22 0000c78da8f65a7f x23 0000c78da8f65ed0
[ 33.817675] DEBUG: x24 0000c78da8f81ad8 x25 0000c78da8f65a9e x26 0000ffffdfad5970 x27 0000ffffdfad5baf
[ 33.827621] DEBUG: x28 0000000000000005 x29 0000ffffdfad4270
[ 33.833728] DEBUG: sp 0000ffffdfad4230 lr 0000fd4817c21a18 pc 0000fd4817c21a44
[ 33.842801] DEBUG:
[ 33.844901] DEBUG: backtrace:
[ 33.847892] DEBUG: #00 pc 0000000000021a44 /system/lib64/libc.so (abort+124)
[ 33.855390] DEBUG: #01 pc 00000000000080f8 /system/lib64/liblog.so (__android_log_assert+296)
[ 33.864372] DEBUG: #02 pc 0000000000002398 /system/bin/app_process64 (main+1704)
[ 33.872216] DEBUG: #03 pc 00000000000ae6e8 /system/lib64/libc.so (__libc_init+88)
[ 34.210515] DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[ 34.218221] DEBUG: Build fingerprint: ‘Android/hikey970/hikey970:9/PI/olivier09051648:userdebug/test-keys’
[ 34.228002] DEBUG: Revision: ‘0’
[ 34.231256] DEBUG: ABI: ‘arm’
[ 34.234281] DEBUG: pid: 3108, tid: 3108, name: app_process32 >>> /system/bin/app_process32 <<<
[ 34.243017] DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
[ 34.250370] DEBUG: Abort message: ‘Error creating cache dir /data/dalvik-cache/arm : No such file or directory’
[ 34.260508] DEBUG: r0 00000000 r1 00000c24 r2 00000006 r3 00000008
[ 34.267700] DEBUG: r4 00000c24 r5 00000c24 r6 ff9803b4 r7 0000010c
[ 34.274868] DEBUG: r8 ff981b85 r9 00000001 r10 00000003 r11 00000005
[ 34.282053] DEBUG: ip ff980350 sp ff9803a0 lr f40eff89 pc f40e7dda
[ 34.291340] DEBUG:
[ 34.293458] DEBUG: backtrace:
[ 34.296453] DEBUG: #00 pc 0001cdda /system/lib/libc.so (abort+58)
[ 34.303024] DEBUG: #01 pc 00006ccd /system/lib/liblog.so (__android_log_assert+156)
[ 34.311139] DEBUG: #02 pc 00001ad1 /system/bin/app_process32 (main+1056)
[ 34.318297] DEBUG: #03 pc 0008afad /system/lib/libc.so (__libc_init+48)
[ 34.325363] DEBUG: #04 pc 0000166f /system/bin/app_process32 (_start_main+38)
[ 34.332952] DEBUG: #05 pc 00000306 anonymous:f58dc000
[ 37.335880] init: Failed to bind socket ‘pdx/system/vr/display/client’: No such file or directory
[ 37.345534] init: Failed to bind socket ‘pdx/system/vr/display/manager’: No such file or directory
[ 37.355080] init: Failed to bind socket ‘pdx/system/vr/display/vsync’: No such file or directory
[ 37.466491] [drm:kirin_fbdev_mmap] ERROR size=3842048 is out of range(3840000)!
[ 37.478456] init: Could not find service hosting interface android.hardware.audio@2.0::IDevicesFactory/default
[ 37.488861] init: Could not find service hosting interface android.hardware.audio@2.0::IDevicesFactory/default
[ 37.494150] DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
[ 37.494187] DEBUG: Build fingerprint: ‘Android/hikey970/hikey970:9/PI/olivier09051648:userdebug/test-keys’
[ 37.494200] DEBUG: Revision: ‘0’
[ 37.494211] DEBUG: ABI: ‘arm64’
[ 37.494227] DEBUG: pid: 3148, tid: 3148, name: surfaceflinger >>> /system/bin/surfaceflinger <<<
[ 37.494243] DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
[ 37.494271] DEBUG: Abort message: ‘failed to get hwcomposer service’
[ 37.494294] DEBUG: x0 0000000000000000 x1 0000000000000c4c x2 0000000000000006 x3 0000000000000008
[ 37.494309] DEBUG: x4 fefff624ff716472 x5 fefff624ff716472 x6 fefff624ff716472 x7 7f7fff7f7f7f7f7f
[ 37.494327] DEBUG: x8 0000000000000083 x9 0000f72612a79930 x10 fffffff87fffffdf x11 0000000000000001
[ 37.494342] DEBUG: x12 0000ffffebac0180 x13 ffffffffffffffff x14 ffffffffff000000 x15 ffffffffffffffff
[ 37.494357] DEBUG: x16 0000f72612ab22c0 x17 0000f726129f0260 x18 0000ffffebabf96a x19 0000000000000c4c
[ 37.494371] DEBUG: x20 0000000000000c4c x21 0000000000000083 x22 0000f7259104da08 x23 0000000000000000
[ 37.494385] DEBUG: x24 0000f7258d056480 x25 0000f72613ded5e0 x26 0000ffffebac0bd0 x27 00000000000f4240
[ 37.494398] DEBUG: x28 0000000000000000 x29 0000ffffebac00a0
[ 37.494411] DEBUG: sp 0000ffffebac0060 lr 0000f726129e4a18 pc 0000f726129e4a44
[ 37.500752] DEBUG:
[ 37.500754] DEBUG: backtrace:
[ 37.500780] DEBUG: #00 pc 0000000000021a44 /system/lib64/libc.so (abort+124)
[ 37.500796] DEBUG: #01 pc 00000000000080f8 /system/lib64/liblog.so (__android_log_assert+296)
[ 37.500820] DEBUG: #02 pc 000000000006b0e0 /system/lib64/libsurfaceflinger.so (android::Hwc2::impl::Composer::Composer(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator> const&)+1008)
[ 37.500835] DEBUG: #03 pc 00000000000a55f0 /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::init()+936)
[ 37.500848] DEBUG: #04 pc 0000000000002f48 /system/bin/surfaceflinger (main+320)
[ 37.500864] DEBUG: #05 pc 00000000000ae6e8 /system/lib64/libc.so (__libc_init+88)

I show the android boot screen but nothing else…
Can you help me ?
Best regards

android-9.0.0_r34 worked perfectly for me

Yes this branch build if you follow this instruction
https://zhuanlan.zhihu.com/p/39259794
You must also apply this patch
https://android-git.linaro.org/device/linaro/dragonboard410c.git/commit/?h=dragonboard&id=dbe30cae1ef227860089e1840aeb1cd140c0003a
But wifi,bluetooth and usb headset doesn’t work

It’s clear that linaro doesn’t give the source code of the real aosp configuration directory the device/linaro directory is a minimum configuration not the one use by the manufacturer

In the linux kernel directories:

$ make menuconfig
then enable the follwing flag

CONFIG_SND_HWDEP=y
CONFIG_SND_USB_AUDIO=y
CONFIG_USB_SERIAL_CH341=y
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_CONSOLE=y
CONFIG_USB_SERIAL_FTDI_SIO=y
CONFIG_USB_SERIAL_PL2303=y

Also aply this patch

olivier@calculateur-ia:/data/dev/hikey970_android/kernel/linux$ cat 0001-Fixe-bluetooth-sound-issue.patch
From cfa77099eac5aa81f036599b5f748682bcf42d4d Mon Sep 17 00:00:00 2001
From: olivier Huet <ohuet74@gmail.com>
Date: Thu, 19 Sep 2019 08:02:21 +0200
Subject: [PATCH] Fixe bluetooth sound issue

---
 arch/arm64/boot/dts/hisilicon/kirin970-hikey970.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/hisilicon/kirin970-hikey970.dts b/arch/arm64/boot/dts/hisilicon/kirin970-hikey970.dts
index 3a7937344ee7..a17299159ebe 100755
--- a/arch/arm64/boot/dts/hisilicon/kirin970-hikey970.dts
+++ b/arch/arm64/boot/dts/hisilicon/kirin970-hikey970.dts
@@ -257,7 +257,7 @@
        nshutdown_gpio = <462>;
        dev_name = "/dev/ttyAMA4";
        flow_cntrl = <1>;
-       baud_rate = <115200>;
+       baud_rate = <921600>;
        /* baud_rate = <3000000>; */
        /* baud_rate = <230400>; ok */
        /* baud_rate = <921600>; ok */
--
2.17.1

then rebuild the kernel, the deice tree,aosp and reflash it
Now the usb headset (and some other usb device) work properly

BR
Olivier

Apply this patch in the device/linaro/hikey of the aosp source code
and the wifi work

From 6772cc1870a487465d41b6627cf995234aa1cbc9 Mon Sep 17 00:00:00 2001
From: olivier Huet <ohuet74@gmail.com>
Date: Wed, 18 Sep 2019 09:37:17 +0200
Subject: [PATCH] Adding the wifi support

---
 device-common.mk            |  9 ++++++---
 hikey970.mk                 |  1 +
 init.common.rc              | 18 +++++++++++++++++-
 init.common.usb.rc          |  3 +++
 manifest.xml                | 22 ++++++++++++++++------
 p2p_supplicant_overlay.conf |  1 +
 sepolicy/hostapd.te         | 11 -----------
 wpa_supplicant_overlay.conf |  3 +++
 8 files changed, 47 insertions(+), 21 deletions(-)
 create mode 100644 p2p_supplicant_overlay.conf
 delete mode 100644 sepolicy/hostapd.te
 create mode 100644 wpa_supplicant_overlay.conf

diff --git a/device-common.mk b/device-common.mk
index 56fedc0e..22eb04dd 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -141,8 +141,8 @@ PRODUCT_PACKAGES += \
 
 endif
 
-# Use Launcher3
-PRODUCT_PACKAGES += Launcher3
+# Use Launcher3QuickStep
+PRODUCT_PACKAGES += Launcher3QuickStep
 
 # Copy hardware config file(s)
 PRODUCT_COPY_FILES +=  \
@@ -161,9 +161,12 @@ $(call inherit-product-if-exists, device/linaro/hikey/wpan/ti-wpan-products.mk)
 
 PRODUCT_COPY_FILES += \
         frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
+        frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \
         frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \
         frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
-        device/linaro/hikey/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf
+        device/linaro/hikey/wpa_supplicant.conf:system/etc/wifi/wpa_supplicant.conf \
+        $(LOCAL_PATH)/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
+        $(LOCAL_PATH)/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
 
 # audio policy configuration
 USE_XML_AUDIO_POLICY_CONF := 1
diff --git a/hikey970.mk b/hikey970.mk
index d0c9e713..8407030b 100644
--- a/hikey970.mk
+++ b/hikey970.mk
@@ -12,6 +12,7 @@ endif
 
 #
 # Inherit the full_base and device configurations
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
 $(call inherit-product, device/linaro/hikey/hikey970/device-hikey970.mk)
 $(call inherit-product, device/linaro/hikey/device-common.mk)
 $(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
diff --git a/init.common.rc b/init.common.rc
index 71c04576..63a5f11d 100644
--- a/init.common.rc
+++ b/init.common.rc
@@ -14,6 +14,16 @@ on init
     write /dev/cpuset/system-background/cpus 0-7
     write /dev/cpuset/top-app/cpus 0-7
 
+    # Create UDS structure for base VR services
+    mkdir /dev/socket/pdx 0775 system system
+    mkdir /dev/socket/pdx/system 0775 system system
+    mkdir /dev/socket/pdx/system/buffer_hub 0775 system system
+    mkdir /dev/socket/pdx/system/performance 0775 system system
+    mkdir /dev/socket/pdx/system/vr 0775 system system
+    mkdir /dev/socket/pdx/system/vr/display 0775 system system
+    mkdir /dev/socket/pdx/system/vr/pose 0775 system system
+    mkdir /dev/socket/pdx/system/vr/sensors 0775 system system
+
     start watchdogd
 
 on fs
@@ -64,6 +74,11 @@ on post-fs-data
     # Set SELinux security contexts for files used by lava.
     restorecon_recursive /data/local/tmp/lava
 
+on zygote-start
+    mkdir /data/vendor/wifi 0770 wifi wifi
+    mkdir /data/vendor/wifi/wpa 0770 wifi wifi
+    mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
+
 on property:sys.boot_completed=1
     # update cpuset now that processors are up
     # Foreground should contain most cores (7 is reserved for top-app)
@@ -95,8 +110,9 @@ service uim /vendor/bin/uim
     oneshot
 
 service wpa_supplicant /system/vendor/bin/hw/wpa_supplicant \
-     -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
      -g@android:wpa_wlan0
+     interface android.hardware.wifi.supplicant@1.0::ISupplicant default
+     interface android.hardware.wifi.supplicant@1.1::ISupplicant default
      socket wpa_wlan0 dgram 660 wifi wifi
      class main
      disabled
diff --git a/init.common.usb.rc b/init.common.usb.rc
index 5d6986b3..aab446ed 100644
--- a/init.common.usb.rc
+++ b/init.common.usb.rc
@@ -13,6 +13,7 @@ on boot
     mkdir /config/usb_gadget/g1/functions/midi.gs5
     mkdir /config/usb_gadget/g1/functions/ffs.adb
     mkdir /config/usb_gadget/g1/functions/ffs.mtp
+    mkdir /config/usb_gadget/g1/functions/ffs.ptp
     mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell
     mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell
     write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
@@ -22,7 +23,9 @@ on boot
     mkdir /dev/usb-ffs/adb 0770 shell shell
     mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
     mkdir /dev/usb-ffs/mtp 0770 mtp mtp
+    mkdir /dev/usb-ffs/ptp 0770 mtp mtp
     mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
+    mount functionfs ptp /dev/usb-ffs/ptp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
     setprop sys.usb.mtp.device_type 3
     setprop sys.usb.configfs 1
     setprop sys.usb.ffs.aio_compat 1
diff --git a/manifest.xml b/manifest.xml
index fb88f0dc..ac22c709 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -44,21 +44,31 @@
             <instance>default</instance>
         </interface>
     </hal>
+
     <hal format="hidl">
-        <name>android.hardware.wifi.supplicant</name>
-        <transport>hwbinder</transport>
+        <name>android.hardware.renderscript</name>
+        <transport arch="32+64">passthrough</transport>
         <version>1.0</version>
         <interface>
-            <name>ISupplicant</name>
+            <name>IDevice</name>
             <instance>default</instance>
         </interface>
     </hal>
     <hal format="hidl">
-        <name>android.hardware.renderscript</name>
-        <transport arch="32+64">passthrough</transport>
+        <name>android.hardware.wifi.hostapd</name>
+        <transport>hwbinder</transport>
         <version>1.0</version>
         <interface>
-            <name>IDevice</name>
+            <name>IHostapd</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.wifi.supplicant</name>
+        <transport>hwbinder</transport>
+        <version>1.1</version>
+        <interface>
+            <name>ISupplicant</name>
             <instance>default</instance>
         </interface>
     </hal>
diff --git a/p2p_supplicant_overlay.conf b/p2p_supplicant_overlay.conf
new file mode 100644
index 00000000..acbace22
--- /dev/null
+++ b/p2p_supplicant_overlay.conf
@@ -0,0 +1 @@
+disable_scan_offload=1
diff --git a/sepolicy/hostapd.te b/sepolicy/hostapd.te
deleted file mode 100644
index 86b985ae..00000000
--- a/sepolicy/hostapd.te
+++ /dev/null
@@ -1,11 +0,0 @@
-# TODO(b/36657258): Remove data_between_core_and_vendor_violators once
-# hostapd no longer directly accesses /data outside /data/vendor.
-typeattribute hostapd data_between_core_and_vendor_violators;
-# hostapd can read and write WiFi related data and configuration.
-allow hostapd wifi_data_file:file rw_file_perms;
-r_dir_file(hostapd, wifi_data_file)
-
-# hostapd wants to create the directory holding its control socket.
-allow hostapd hostapd_socket:dir create_dir_perms;
-# hostapd needs to create, bind to, read, and write its control socket.
-allow hostapd hostapd_socket:sock_file create_file_perms;
diff --git a/wpa_supplicant_overlay.conf b/wpa_supplicant_overlay.conf
new file mode 100644
index 00000000..e1f530db
--- /dev/null
+++ b/wpa_supplicant_overlay.conf
@@ -0,0 +1,3 @@
+disable_scan_offload=1
+p2p_disabled=1
+tdls_external_control=1
-- 
2.17.1

The follwing patch allow to enable the bluetooth

From a3a22f2a59b8a24e1830f16f36a48af160ebfe81 Mon Sep 17 00:00:00 2001
From: olivier Huet <ohuet74@gmail.com>
Date: Wed, 18 Sep 2019 12:54:30 +0200
Subject: [PATCH] Enable BlueTooth

---
 BoardConfigCommon.mk        |  2 ++
 bluetooth/bdroid_buildcfg.h | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 bluetooth/bdroid_buildcfg.h

diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 35e29a2d..f13c9f70 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -18,6 +18,8 @@ USE_OPENGL_RENDERER := true

 # BT configs
 BOARD_HAVE_BLUETOOTH := true
+BOARD_HAVE_BLUETOOTH_TI := true
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/linaro/hikey/bluetooth

 # generic wifi
 WPA_SUPPLICANT_VERSION := VER_0_8_X
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
new file mode 100644
index 00000000..a1a0666a
--- /dev/null
+++ b/bluetooth/bdroid_buildcfg.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2016 The Yudatun Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _YUDATUN_BDROID_BUILDCFG_H_
+#define _YUDATUN_BDROID_BUILDCFG_H_
+
+#define KERNEL_MISSING_CLOCK_BOOTTIME_ALARM TRUE
+
+#endif  // _YUDATUN_BDROID_BUILDCFG_H_
\ No newline at end of file
--
2.17.1

BR