linaro-swg/optee_android_manifest

Where does the secure world output in Android APP?

tulipper opened this issue · 2 comments

Hello there!
I have a question that
If run the optee_example_* in the console, we can got the output message in console like this:
D/TC:? 0 tee_ta_init_pseudo_ta_session:276 Lookup pseudo TA 8aaaf200-2450-11e4-b D/TC:? 0 load_elf:827 Lookup user TA ELF 8aaaf200-2450-11e4-abe2-0002a5d5c51b () D/TC:? 0 load_elf:827 Lookup user TA ELF 8aaaf200-2450-11e4-abe2-0002a5d5c51b () D/TC:? 0 load_elf:827 Lookup user TA ELF 8aaaf200-2450-11e4-abe2-0002a5d5c51b () D/TC:? 0 load_elf_from_store:795 ELF load address 0x40005000 D/TC:? 0 tee_ta_init_user_ta_session:1017 Processing relocations in 8aaaf200-24b Invoking TA to increment 42 TA incremented value to 43 D/TC:? 0 tee_ta_close_session:380 tee_ta_close_session(0x3f099960) D/TC:? 0 tee_ta_close_session:399 Destroy session D/TC:? 0 tee_ta_close_session:425 Destroy TA ctx
some of these come from the host and others comes from the ta.
but when I compile the host source as a shared library using ndk and call jni from android app. It appears nothing in console or adb logcat although it run normally. I cannot figure out the operation situation without these debug message from the native code.
In the host code, I use printf() to log the function's process while the macro DMSG() or something like this in ta code. Where is the printed message in Android app situation.

Hello, now I know how to show the log in ndk code
just follow this page, it works pretty well!
https://stackoverflow.com/questions/10274920/how-to-get-printf-messages-written-in-ndk-application

Thanks for sharing the solution!