Open-TEE / opentee-android

Android code/libraries for deploying and running Open TEE code
https://github.com/Open-TEE
Apache License 2.0
50 stars 24 forks source link

The module bundletest is unable to deploy trusted application in android studio 2.2 #4

Closed YangRongAtGit closed 4 years ago

YangRongAtGit commented 8 years ago

Hello Sheep Ray (nice name interpretation BTW),

Thanks for updating the android project recently. I am trying to use the opentee-android by following the guide. The way I choose to try is the first way mentioned in the guide, the bundletest module. In the runtime, the android studio reported an error: E/Open-TEE: no TA to be deployed!.

Any idea what might cause the issue of the zero property loaded?

Here is the full log from an AOSP emulator:

I/art: Not late-enabling -Xcheck:jni (already on)
I/InstantRun: Instant Run Runtime started. Android package is fi.aalto.ssg.opentee.bundletest, real application class is null.
W/art: Suspending all threads took: 19.563ms
W/art: Verification of android.view.View android.support.v7.app.AppCompatViewInflater.createView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean, boolean, boolean, boolean) took 152.938ms
W/art: Suspending all threads took: 9.485ms
I/art: Background partial concurrent mark sweep GC freed 225(115KB) AllocSpace objects, 0(0B) LOS objects, 37% free, 869KB/1381KB, paused 11.016ms total 158.508ms
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
D/worker.class: executor started without context
D/Open-TEE: Ready files for opentee to run
D/worker.class: Copy from : armeabi-v7a/opentee-engine
D/OTUtils.class: Copy to /data/data/fi.aalto.ssg.opentee.bundletest/opentee/bin/opentee-engine
W/art: Suspending all threads took: 13.181ms
D/OTUtils.class: chmod 744 /data/data/fi.aalto.ssg.opentee.bundletest/opentee/bin/opentee-engine
D/worker.class: Copy from : armeabi-v7a/libLauncherApi.so
W/art: Suspending all threads took: 8.630ms
D/OTUtils.class: Copy to /data/data/fi.aalto.ssg.opentee.bundletest/opentee/tee/libLauncherApi.so
D/OTUtils.class: chmod 744 /data/data/fi.aalto.ssg.opentee.bundletest/opentee/tee/libLauncherApi.so
D/worker.class: Copy from : armeabi-v7a/libManagerApi.so
W/art: Suspending all threads took: 26.979ms
D/OTUtils.class: Copy to /data/data/fi.aalto.ssg.opentee.bundletest/opentee/tee/libManagerApi.so
D/OTUtils.class: chmod 744 /data/data/fi.aalto.ssg.opentee.bundletest/opentee/tee/libManagerApi.so
E/Open-TEE: no TA to be deployed!
I/worker.class: {OPENTEE_SOCKET_FILE_PATH=/data/data/fi.aalto.ssg.opentee.bundletest/opentee/open_tee_socket, OPENTEE_STORAGE_PATH=/data/data/fi.aalto.ssg.opentee.bundletest/opentee/.TEE_secure_storage/, LD_LIBRARY_PATH=/data/data/fi.aalto.ssg.opentee.bundletest/lib}
D/worker.class: Run binary /data/data/fi.aalto.ssg.opentee.bundletest/opentee/bin/opentee-engine -c /data/data/fi.aalto.ssg.opentee.bundletest/opentee/opentee.conf.android -p /data/data/fi.aalto.ssg.opentee.bundletest/opentee &
D/worker.class: Output: 
D/Open-TEE: Installation ready
D/OTUtils.class: Copy to /data/data/fi.aalto.ssg.opentee.bundletest/opentee/ta/libta_conn_test_app.so
D/OTUtils.class: chmod 744 /data/data/fi.aalto.ssg.opentee.bundletest/opentee/ta/libta_conn_test_app.so
D/OTUtils.class: Copy from : armeabi-v7a/conn_test_app
W/art: Suspending all threads took: 19.302ms
I/Choreographer: Skipped 34 frames!  The application may be doing too much work on its main thread.
D/OTUtils.class: Copy to /data/data/fi.aalto.ssg.opentee.bundletest/opentee/bin/conn_test_app
D/OTUtils.class: chmod 744 /data/data/fi.aalto.ssg.opentee.bundletest/opentee/bin/conn_test_app
D/worker.class: executor started without context
D/worker.class: Run binary /data/data/fi.aalto.ssg.opentee.bundletest/opentee/bin/conn_test_app &

                [ 10-05 22:15:07.187  7521: 7522 I/libta_conn_test_/data/data/fi.aalto.ssg.opentee.bundletest/opentee/ta/libta_conn_test_app.soOpen-TEE/TAs/ta_conn_test_app/ta_conn_test_app.c:TA_CreateEntryPoint:158  Calling the create entry point

                [ 10-05 22:15:07.187  7521: 7522 D/libta_conn_test_/data/data/fi.aalto.ssg.opentee.bundletest/opentee/ta/libta_conn_test_app.soSTART: storage tests

                [ 10-05 22:15:07.188  7521: 7522 D/libta_conn_test_/data/data/fi.aalto.ssg.opentee.bundletest/opentee/ta/libta_conn_test_app.so----Begin-with-test-cases----
I/Choreographer: Skipped 314 frames!  The application may be doing too much work on its main thread.
D/gralloc_goldfish: Emulator without GPU emulation detected.
D/worker.class: Output: START: conn test appInitializing context: initializedRegistering shared memory: registeredAllocating shared memory: allocatedOpenning session: TEEC_OpenSession failed: 0xffff0000Releasing allocated memory: releasedReleasing registered memory: releasedFinalizing ctx: finalized### ERROR ###Connection test app did found some errors.See our consol output (a couple of last prints) and our machine log.For example you could try: $ tail -f /var/log/syslog^^^ ERROR ^^^
Environment
os Ubuntu 16.04 LTS
android studio version 2.2
ndk version r12b
emulator AOSP on ARM (android 5.1.1, API 22)

Thanks for your time

Rong

sheepray commented 7 years ago

Hi @YangRongAtGit , sorry for the late reply. I haven't checked the issues for a long time :(

  1. First of all, E/Open-TEE: no TA to be deployed! is not supposed to be an error msg but an info msg;

  2. You seems to have error messages when you run the bundletest module based on the log you pasted above. It might be a good idea to fix that before you continue;

  3. The conn_test_app is installed by default. So it won't be mentioned in the output. The E/Open-TEE: no TA to be deployed! just tells you that opentee didn't install your customized app.

Does that make sense? Let me know if you have more question :)

Rui