Forums - problem on running android application of corner app sample

6 posts / 0 new
Last post
problem on running android application of corner app sample
dhrumil488
Join Date: 3 Jun 16
Posts: 7
Posted: Thu, 2016-07-07 03:57

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.

  • Up0
  • Down0
chenna
Join Date: 4 Feb 16
Posts: 54
Posted: Thu, 2016-07-07 05:06

can you please refer <SDK_ROOT>/docs/FastCV/cornerApp.html

and

<SDK_ROOT>examples\fastcv\cornerApp\cornerApp_walkthrough.py

  • Up0
  • Down0
dhrumil488
Join Date: 3 Jun 16
Posts: 7
Posted: Thu, 2016-07-07 05:13

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..

  • Up0
  • Down0
chenna
Join Date: 4 Feb 16
Posts: 54
Posted: Thu, 2016-07-07 07:12

Can you try this adb shell ADSP_LIBRARY_PATH=/system/lib/ <application name> ? 

  • Up0
  • Down0
bigcat11
Join Date: 15 May 18
Posts: 1
Posted: Wed, 2018-09-12 04:55

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.

  • Up0
  • Down0
allison.ma
Join Date: 3 Sep 18
Posts: 2
Posted: Wed, 2018-10-24 02:17

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.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.