linaro-swg / optee_android_manifest

Android manifest for building OP-TEE in AOSP
38 stars 34 forks source link

Warnings during build for Hikey 960 #50

Closed warraagal closed 5 years ago

warraagal commented 5 years ago

When I try to build for Hikey 960 I get the following warnings related to proprietary files :

device/linaro/hikey/hikey960/device-hikey960.mk:87: warning: TARGET_HISI_CODEC_VERSION () does not match exiting the build (1).
device/linaro/hikey/hikey960/device-hikey960.mk:88: warning: Please download new binaries here:
device/linaro/hikey/hikey960/device-hikey960.mk:89: warning: https://dl.google.com/dl/android/aosp/hisilicon-hikey960-OPR-3c243263.tgz
device/linaro/hikey/hikey960/device-hikey960.mk:90: warning: And extract in the ANDROID_TOP_DIR

Should I ignore them ?

vchong commented 5 years ago

@rounaka Have you tried flashing the images from this build to your board? Are you able to boot to the home screen? Do you mind helping to test? Thanks!

warraagal commented 5 years ago

@vchong I flashed the images. Wifi and playback of Youtube videos are working.

warraagal commented 5 years ago

All tests passed when I ran xtest. Is there anything else I should test ?

vchong commented 5 years ago

@rounaka Thanks for helping to test!

If you feel adventurous, you can also run /data/nativetest64/VtsHalKeymasterV3_0TargetTest/VtsHalKeymasterV3_0TargetTest and /data/nativetest64/VtsHalGatekeeperV1_0Target/VtsHalGatekeeperV1_0Target, but adb should really be working first, otherwise you have to run it from the terminal console directly, and the logs from both normal and secure world will run over each other and make a mess. Having said that, I noticed you removed comments about adb not working, so does that mean it worked for you? If so, were you using adb over wifi, or usb?

warraagal commented 5 years ago

@vchong I did not try adb because it says in the Known Issues section that it does not work for Hikey960. I removed my comment because after posting it I remembered that I can run xtest without adb. I will try the steps in the README and on the page https://bugs.96boards.org/show_bug.cgi?id=502 and inform you whether it worked.

vchong commented 5 years ago

@rounaka ack, thanks

warraagal commented 5 years ago

@vchong I was able to use adb over wifi to push a Firefox APK to the device. The device did not show any prompt when I tried to connect. Is this expected behaviour for ADB over wifi ? I have only used ADB over USB before this, so I expected to see a prompt. Video playback worked within WebView Browser Tester but does not work within Firefox. I think the following error messages are relevant to this :

[79696.416768] type=1400 audit(1545395618.919:7813): avc: denied { read } for pid=2624 comm="HwBinder:2624_1" name="hw" dev="sdd10" ino=69 scontext=u:r:mediacodec:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
[79696.436944] type=1400 audit(1545395897.863:7814): avc: denied { read } for pid=2624 comm="HwBinder:2624_1" name="hw" dev="sdd10" ino=96 scontext=u:r:mediacodec:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
[79696.456937] type=1400 audit(1545395897.863:7814): avc: denied { read } for pid=2624 comm="HwBinder:2624_1" name="hw" dev="sdd10" ino=96 scontext=u:r:mediacodec:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
[79696.477407] type=1400 audit(1545395897.863:7815): avc: denied { read } for pid=2624 comm="HwBinder:2624_1" name="hw" dev="sdd10" ino=69 scontext=u:r:mediacodec:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
[79696.497747] type=1400 audit(1545395897.863:7815): avc: denied { read } for pid=2624 comm="HwBinder:2624_1" name="hw" dev="sdd10" ino=69 scontext=u:r:mediacodec:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
[79696.517852] type=1400 audit(1545395897.899:7816): avc: denied { read } for pid=2624 comm="HwBinder:2624_1" name="hw" dev="sdd10" ino=96 scontext=u:r:mediacodec:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
[79696.538129] type=1400 audit(1545395897.899:7816): avc: denied { read } for pid=2624 comm="HwBinder:2624_1" name="hw" dev="sdd10" ino=96 scontext=u:r:mediacodec:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
[79696.558101] type=1400 audit(1545395897.899:7817): avc: denied { read } for pid=2624 comm="HwBinder:2624_1" name="hw" dev="sdd10" ino=69 scontext=u:r:mediacodec:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
[79699.760255] type=1400 audit(1545395897.899:7817): avc: denied { read } for pid=2624 comm="HwBinder:2624_1" name="hw" dev="sdd10" ino=69 scontext=u:r:mediacodec:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
[79699.780360] type=1400 audit(1545395901.207:7818): avc: denied { read } for pid=2624 comm="HwBinder:2624_1" name="hw" dev="sdd10" ino=96 scontext=u:r:mediacodec:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=0
console:/ # ps -f --pid 2624
UID            PID  PPID C STIME TTY          TIME CMD
mediacodec    2624     1 0 20:00:08 ?     00:00:02 media.codec hw/android.hardware.media.omx@1.0-service
console:/ #

ADB over USB did not work

vchong commented 5 years ago

@rounaka Again thanks for testing!

device did not show any prompt when I tried to connect

You mean there was no prompt when you connected adb over wifi? If so, how were you able to push the apk? Were you just typing blindly?

Video playback worked within WebView Browser Tester but does not work within Firefox.

Any selinux rules required to make Firefox (or any other app for that matter) work it outside the scope of op-tee so I'm afraid we're unable to support it. Sorry.

vchong commented 5 years ago

@rounaka I just tested adb over tcpip on my end and you're right, there's no prompt. Running adb shell or a 2nd adb instance also broke the current adb tcpip connection. I suppose you'll just have to preface all commands with adb shell from the host.

warraagal commented 5 years ago

@vchong I wasn't talking about the shell prompt. I was talking about the prompt that is shown to the user to authorize a PC to connect to the phone for USB debugging. Perhaps prompt is not the right word to use for it. I should have been more clear. I am used to seeing that prompt when using ADB over USB. I don't know whether ADB over Wifi should also result in such an authorization prompt. That is what I was trying to ask.

vchong commented 5 years ago

@rounaka Ok. I've not seen the prompt you described, whether it's over usb or tcpip. The prompt you're used to seeing, are these on dev boards like the hikey or hikey960, or actual phones?

warraagal commented 5 years ago

@vchong I have seen it on actual phones. Hikey960 is my first dev board and I haven't been able to run ADB over USB on it yet. So I don't know whether it is supposed to have the same behaviour as actual phones.

vchong commented 5 years ago

@rounaka Ok. In that case, it's probably a feature/protection on actual phones only and not dev boards.. at least not the ones I've used. I haven't been able to run adb over usb either, so if you're able to find and contribute a fix, it would be very welcome, and also help to make this platform more robust for op-tee on aosp development. Maybe start with checking the kernel for missing configs, and whether the kernel build artifacts are properly included in boot.img or vendor.img.

warraagal commented 5 years ago

Since the master branch now has instructions to download and extract the archive hisilicon-hikey960-OPR-3c243263.tgz containing the proprietary files, I am closing this issue.