Source built AOSP MASTER limitations?

So right now I’m running a build of AOSP master, according to instructions here;
https://source.android.com/setup/devices#960hikey

It works, but there are two issues I’ve observed (so far), and just want to confirm if these are expected;

  1. display performance is terrible (feels like missing hardware acceleration) – and this is on just 1280x800,
  2. wifi not working.

Now the thing I noticed which is a little strange, is that the binaries file provided only includes 2 files, libGLES_mali.so in 32 and 64bit. Is that really enough to make this board fully functional? Or is this binary minimalization gone too far?

This is not expected, do you reproduce the same with latest factory images ?
Could you please share your dmesg/logcat output.

Yes, this is the only additional content you need to download (proprietary user space Mali driver.

Performance is exactly the same on build 333, and the no wifi issue remains.
I need a minute to get the dmesg and logcat.

One thing I’d like to point out for the factory 333; looks like some files referenced in the install script don’t match the file names in the archive (in particular, those 3 files seem to now be named with a prefix “hisi-”);

./flash-all.sh
< waiting for any device >
error: cannot load ‘sec_xloader.img’: No such file or directory
error: cannot load ‘ptable.img’: No such file or directory
error: cannot load ‘fastboot.img’: No such file or directory
rebooting into bootloader…
OKAY [ 0.010s]
finished. total time: 0.060s
< waiting for any device >
target reported max download size of 471859200 bytes
sending ‘nvme’ (128 KB)…
OKAY [ 0.011s]
writing ‘nvme’…
OKAY [ 0.049s]
finished. total time: 0.060s
target reported max download size of 471859200 bytes
sending ‘fw_lpm3’ (212 KB)…
OKAY [ 0.013s]
writing ‘fw_lpm3’…
OKAY [ 0.013s]
finished. total time: 0.027s
target reported max download size of 471859200 bytes
sending ‘trustfirmware’ (145 KB)…
OKAY [ 0.012s]
writing ‘trustfirmware’…
OKAY [ 0.012s]
finished. total time: 0.024s
target reported max download size of 471859200 bytes
sending ‘dts’ (14 KB)…
OKAY [ 0.007s]
writing ‘dts’…
OKAY [ 0.014s]
finished. total time: 0.022s
target reported max download size of 471859200 bytes
sending ‘cache’ (56 KB)…
OKAY [ 0.009s]
writing ‘cache’…
OKAY [ 0.049s]
finished. total time: 0.058s
target reported max download size of 471859200 bytes
sending ‘userdata’ (4888 KB)…
OKAY [ 0.169s]
writing ‘userdata’…
OKAY [ 1.796s]
finished. total time: 1.966s
extracting android-info.txt (0 MB)…
extracting boot.img (9 MB)…
target reported max download size of 471859200 bytes
archive does not contain ‘boot.sig’
archive does not contain ‘dtbo.img’
extracting dt.img (0 MB)…
archive does not contain ‘dt.sig’
archive does not contain ‘recovery.img’
extracting system.img (990 MB)…
archive does not contain ‘system.sig’
archive does not contain ‘vbmeta.img’
archive does not contain ‘vendor.img’

Bootloader Version…: 0.5
Baseband Version…: 0.5
Serial Number…: serialv1.0

checking product…
OKAY [ 0.006s]
sending ‘boot’ (9874 KB)…
OKAY [ 0.342s]
writing ‘boot’…
OKAY [ 0.073s]
sending ‘dts’ (14 KB)…
OKAY [ 0.011s]
writing ‘dts’…
OKAY [ 0.014s]
sending sparse ‘system’ 1/3 (460796 KB)…
OKAY [ 16.482s]
writing ‘system’ 1/3…
OKAY [ 3.310s]
sending sparse ‘system’ 2/3 (421196 KB)…
OKAY [ 15.155s]
writing ‘system’ 2/3…
OKAY [ 2.643s]
sending sparse ‘system’ 3/3 (132564 KB)…
OKAY [ 4.829s]
writing ‘system’ 3/3…
OKAY [ 0.856s]
rebooting…

finished. total time: 43.807s

Logs;

I tried build 331 and then build 300.
331 is exactly the same, 300 has working wifi, but the graphics performance is still terrible.

And all the way back to 239, graphics performance is just terrible. It couldn’t possibly just be that bad, I’ve seen faster graphics out of an HTC Dream.

So I did a slightly modified build of master.
The difference being that I checked out b6a77bc3d4916a12f65520dacef2136e28e6df5c for the kernel. That got wifi working, but broke bluetooth. No change in graphics performance. Still unbearably slow.

Ok, so bluetooth has magically unbroken itself.
No idea why. I didn’t change anything.

I’m getting closer to the graphics problem. It doesn’t appear to actually be anything related to the graphics, but rather when the type-C port is NOT plugged in, there is a funny thing going on with the system;

PID USER PR NI VIRT RES SHR S[%CPU] %MEM TIME+ ARGS
1404 root RT 0 0 0 0 S 31.6 0.0 3:30.38 [type_c_port0]

That’s 32% CPU being consumed by [type_c_port0].

I saw that because I decided to set up ADB-over-IP and added a bluetooth mouse (now that bluetooth magically started working). If the type-C port is plugged in, performance is fine. Unplug it and that process goes bonkers and performance goes down the crapper.

And just to reiterate, I’m running AOSP MASTER, synchronized today, but with the kernel rolled back by 2 commits (4.9.48)

Thanks @doitright

1. Flashing issue

Your’re right, same issue for me, but names are aligned in the Android tree. @guodong, are you aware that factory builds (at least 333) contain an out-of-date flash-all script (missing hisi- prefix)?

2. WiFi issue

Actually I also meet the WiFi issue, note that disabling sepolicy makes it work… (setenforce 0 in console or adb as root), The root cause seems to be the following permission/sepolicy errors:

[ 1185.261032] type=1400 audit(1230769171.407:320): avc: denied { read } for pid=3655 comm=“wpa_supplicant” name=“entropy.bin” dev=“sdd13” ino=131363 scontext=u:r:hal_wifi_supplicant_default:s0 tcontext=u:object_r:wifi_data_file:s0 tclass=file permissive=1
[ 1185.261411] type=1400 audit(1230769171.407:320): avc: denied { read } for pid=3655 comm=“wpa_supplicant” name=“entropy.bin” dev=“sdd13” ino=131363 scontext=u:r:hal_wifi_supplicant_default:s0 tcontext=u:object_r:wifi_data_file:s0 tclass=file permissive=1
[ 1185.261425] type=1400 audit(1230769171.407:321): avc: denied { open } for pid=3655 comm=“wpa_supplicant” path="/data/misc/wifi/entropy.bin" dev=“sdd13” ino=131363 scontext=u:r:hal_wifi_supplicant_default:s0 tcontext=u:object_r:wifi_data_file:s0 tclass=file permissive=1
[ 1185.261508] type=1400 audit(1230769171.407:321): avc: denied { open } for pid=3655 comm=“wpa_supplicant” path="/data/misc/wifi/entropy.bin" dev=“sdd13” ino=131363 scontext=u:r:hal_wifi_supplicant_default:s0 tcontext=u:object_r:wifi_data_file:s0 tclass=file permissive=1
[ 1185.261520] type=1400 audit(1230769171.407:322): avc: denied { getattr } for pid=3655 comm=“wpa_supplicant” path="/data/misc/wifi/entropy.bin" dev=“sdd13” ino=131363 scontext=u:r:hal_wifi_supplicant_default:s0 tcontext=u:object_r:wifi_data_file:s0 tclass=file permissive=1

3. Performance Issue (due to USB)

I don’t reproduce the graphical performance issue on my side which indeed seems due to USB. In your dmesg we can see the USB is in a crazy loop:

[ 426.835892] [I/GPIO_HUB] gpio_hub_switch_to_hub: already switch to hub
[ 426.842511] [I/GPIO_HUB] gpio_hub_change_typec_power: typec power no change
[ 426.849563] [I/hisi_pd] TPC-I:** Unattached.SNK\x0d
[ 427.397175] [I/hisi_pd] TPC-I:[CC_Alert] 0/0\x0d

Ok, thank you.
So what are my options with respect to that USB loop? Its quite debilitating.

Ok, this has to be the weirdest board I’ve ever had. The USB loop seems to have just magically disappeared :frowning:

Edit:
Ooooh… nope. Not magic.
Now I know how to reproduce it, and also how to avoid it.

When I plug an A-to-C cable into the USB-C socket, but it isn’t hooked up at the A side. That’s when the loop happens.

Now I’ll just be sure to use a C-to-C cable, which doesn’t cause the problem.

I am seeing the same issue on my end, have reported the bug https://bugs.96boards.org/show_bug.cgi?id=660

Hey,

I am having the same issue with http://builds.96boards.org/snapshots/hikey960/linaro/aosp-master/393.
This is the latest build.
Can you please help me with this?

Thanks.

Unplug the USB-A to USB-C wire from the hikey960 if the A side is unplugged.

@doitright
Are the USB ports suppose to disable when a USB-C is connected?
Also, can you suggest a Touch Display Panel for Hikey 960?

Thanks.

Since the SoC only has one USB port and can only be in one mode at a time (i.e. device or host), it has to switch between the C (device) and A (host) sockets.

These work;
https://www.chalk-elec.com/?page_id=1280#!/HDMI-interface-LCD-+-touch/c/3094861/offset=0&sort=priceAsc

BUT, you need to be aware that if you pick one that can be powered by USB, you have to supply it with external power until the USB power comes online, otherwise the kernel doesn’t detect it.

Thanks a lot for the help.
Are there any compatible Speakers and Mic for Hike 960?
Has anyone tested it? If so, please guide me.

Best,

It does not have an audio card at all.
You will need a USB audio card.