Hi,
I have build shred library for corner_app sample example and link with android application jni module. Below is my android.mk file content:
-----------------------------------start file--------------------------------------------
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := cornerApp
LOCAL_SRC_FILES := libcornerApp.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := adsprpc
LOCAL_SRC_FILES := libadsprpc.so
include $(PREBUILT_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_PRELINK_MODULE:= false
LOCAL_CFLAGS := -Wno-write-strings
LOCAL_LDFLAGS:= -Wl,--no-fix-cortex-a8
LOCAL_MODULE := libCornerApp2Jni
LOCAL_CFLAGS := -Werror
LOCAL_SRC_FILES := \
CornerApp2Jni.c
LOCAL_LDLIBS := -lcornerApp \
-ladsprpc \
-llog
LOCAL_SHARED_LIBRARIES := cornerApp \
adsprpc \
liblog
LOCAL_MODULE_OWNER := ei
LOCAL_PROPRIETARY_MODULE := true
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
----------------------------end file---------------------------------------------
I have built both libcornerApp.so and libadsprpc.so and link through this make file. Then I put hexagon builded libcornerApp_skel.so to /system/lib/ in to snapdrgon android device. But when I call dsp function from my android application I got following error:
E/adsprpc (30828): remote.c:27:Invoking stubbed routine - Return failure
E/adsprpc (30828): remote.c:32:Invoking stubbed routine - Return failure
So it may not found the hexagon libcornerApp_skel.so file.
Please help me to solve this error.
can you please refer <SDK_ROOT>/docs/FastCV/cornerApp.html
and
<SDK_ROOT>examples\fastcv\cornerApp\cornerApp_walkthrough.py
Hi chenna,
In those documents, there is procedure for how to run cornerApp application from command line. But what if I want to call that method from my android application from jni.
What environment should I set on my andriod device to call that hexagon method successfully.
Thanks..
Can you try this adb shell ADSP_LIBRARY_PATH=/system/lib/ <application name> ?
Hi, Chenna
we also encounter similar issue while using android application from jni
error message is list :
=========================================================================
E/adsprpc: remote.c:25:Invoking stubbed routine - Return failure
remote.c:30:Invoking stubbed routine - Return failure
=========================================================================
already try your feedback about set ADSP_LIBRARY_PATH in JNI
setenv("ADSP_LIBRARY_PATH", "/vendor/lib/rfsa/adsp/", 1 /*override*/);
but issue still exist, is there any thing we can try to fix ? Thanks.
Hi bigcat11,
We also met the same issue. The error message is exactly same as yours. Have you fixed it? I am looking forward to your reply. Thank you very much.