Closed uberspot closed 9 years ago
This was from adb logcat after running opentee-engine on a nexus 7 with android 5.1.1. SELinux was permissive. Lunch target was aosp_arm-eng
adb logcat
D/tee_manager(32036): opentee/emulator/opentee-main/main.c:load_lib:166 Failed to load library, /system/lib/libManagerApi.so : dlopen failed: cannot locate symbol "mempcpy" referenced by "libCommonApi.so"... D/tee_launcher(32037): opentee/emulator/opentee-main/main.c:load_lib:166 Failed to load library, /system/lib/libLauncherApi.so : dlopen failed: cannot locate symbol "mempcpy" referenced by "libCommonApi.so"...
$ cat /etc/opentee.conf [PATHS] ta_dir_path = /system/lib core_lib_path = /system/lib subprocess_manager = libManagerApi.so subprocess_launcher = libLauncherApi.so
Output during make:
============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=5.1.51 TARGET_PRODUCT=aosp_arm TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a TARGET_CPU_VARIANT=generic TARGET_2ND_ARCH= TARGET_2ND_ARCH_VARIANT= TARGET_2ND_CPU_VARIANT= HOST_ARCH=x86_64 HOST_OS=linux HOST_OS_EXTRA=Linux-3.11.0-26-generic-x86_64-with-Ubuntu-12.04-precise HOST_BUILD_TYPE=release BUILD_ID=AOSP OUT_DIR=out
Output of LD_TRACE_LOADED_OBJECTS=1 ld libCommonApi.so on the host/linux machine.
LD_TRACE_LOADED_OBJECTS=1 ld libCommonApi.so
linux-vdso.so.1 => (0x00007fffabde1000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f084f9df000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f084f7c8000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f084f4cc000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f084f10e000) /lib64/ld-linux-x86-64.so.2 (0x00007f084fbe3000)
Fixed by pushing the generated libc.so to /system/lib since the local android tree and the tree on the device were diverging. Added relevant documentation in open-tee.github.io.
This was from
adb logcat
after running opentee-engine on a nexus 7 with android 5.1.1. SELinux was permissive. Lunch target was aosp_arm-engOutput during make:
Output of
LD_TRACE_LOADED_OBJECTS=1 ld libCommonApi.so
on the host/linux machine.