How to put a TA and secure applciation onto a board

With this you end up with a files named uuid.{ta,elf,dmp,map} etc in the ta folder where you did the build.

I’m currently getting a ta working with the settings core app. Right now i don’t know how to get the ta onto the board. i’m able to compile the ta and i get the uuid products. I found in the faq that says that the ta files are put in /arm/tz is that in the build directory or the aosp? also what do i do with elf dmp and map? How do i refer to the secure world in my application?

Just adb push the out/target/product/<board>/vendor/lib/optee_armtz/<uuid>.ta file on your PC to /vendor/lib/optee_armtz/ of your board. The rest (elf, dmp, map, etc) are not needed to run the TA.

The counter part of the TA, called the CA (client application i think), are in e.g. out/target/product/<board>/vendor/bin/optee_example_hello_world. You adb push this to /vendor/bin/ of your board, and just run it, it will ‘call’ the TA.

so i only need to push the TA i guess. My host is just a modified version of a android package app (so i’m using jni). So all i have to do is to build the host application and refer to it like this.

LOCAL_PATH := $(call my-dir)
CFG_TEEC_PUBLIC_INCLUDE = /home/jsherman/devel/optee/optee_client/public

and also i’ll need to import the file

> include $(CLEAR_VARS)
> LOCAL_MODULE := libteec
> LOCAL_SRC_FILES := <path_to_libteec_so>

So you managed to build an app for this? That’s great! Perhaps you can help by giving some comments on this thread too?

i mean i’m just modifying the android settings app not making a app from scratch.
The reason why i find it a bit difficult is that sometimes the intrusctions are not quite applicable to me

i would just like to know how to integrate the ta in my context


so i know i need to include the ta .h file

CFG_TEEC_PUBLIC_INCLUDE = /home/jsherman/devel/optee/optee_client/public

doe this mean i also need to include the directory where (but the problem is that this thread talks about buildling on a pc on the board).

for reference my file looks like this:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := libteec
LOCAL_SRC_FILES := /storage/optee_android/out/target/product/hikey/system/lib64/
CFG_TEEC_PUBLIC_INCLUDE = /home/test/devel/optee/optee_client/public

LOCAL_MODULE    := libhello-jni
LOCAL_SRC_FILES := hello-jni.c