Hello. I'm using Hexagon SDK 3.4.2. I compiled calculator project, and pushed it to devices, generated signature, and it run ok from 'adb shell':
/vendor/bin/calculator 0 1000 - starting calculator test - allocate 4000 bytes from ION heap - creating sequence of numbers from 0 to 999 - compute sum on the DSP - sum = 499500 - success
Then I compiled the APK, installed it, run, and got next crash:
2019-02-04 15:30:22.244 13871-13871/com.mycompany.secret.myskel D/CALCULATOR: ENTERING 2019-02-04 15:30:22.246 13871-13871/com.mycompany.secret.myskel V/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1011: /dsp/fastrpc_shell_0 load failed 45, searching... 2019-02-04 15:30:22.248 13871-13871/com.mycompany.secret.myskel V/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:1109: create user pd with attributes 0 domain 0 2019-02-04 15:30:22.285 13871-13934/com.mycompany.secret.myskel E/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:695:Error 45: fopen failed for oemconfig.so. (No such file or directory) 2019-02-04 15:30:22.286 13871-13934/com.mycompany.secret.myskel E/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/apps_std_imp.c:695:Error 45: fopen failed for libcalculator_skel.so. (No such file or directory) 2019-02-04 15:30:22.286 13871-13871/com.mycompany.secret.myskel D/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:720: Error fffffffb: remote handle open domain failed. domain 0, name file:///libcalculator_skel.so?calculator_skel_handle_invoke&_modver=1.0&_dom=adsp, dlerror cannot open oemconfig.so 2019-02-04 15:30:22.286 13871-13871/com.mycompany.secret.myskel D/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:663: Error 8000041d: remote handle invoke failed. domain 0, handle 0, sc 1010200, pra 0xffaac758 2019-02-04 15:30:22.286 13871-13871/com.mycompany.secret.myskel D/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:770: Error 8000041d: remote handle close failed. error oemconfig.so 2019-02-04 15:30:22.286 13871-13871/com.mycompany.secret.myskel D/com.mycompany.secret.myskel: vendor/qcom/proprietary/adsprpc/src/fastrpc_apps_user.c:756: Error fffffffb: remote handle64 open failed. name file:///libcalculator_skel.so?calculator_skel_handle_invoke&_modver=1.0&_dom=adsp 2019-02-04 15:30:22.286 13871-13871/com.mycompany.secret.myskel D/CALCULATOR: Failed to open domain, code -5 2019-02-04 15:30:22.273 13871-13871/com.mycompany.secret.myskel W/.secret.myskel: type=1400 audit(0.0:183): avc: denied { read } for name="libcalculator_skel.so" dev="mmcblk0p16" ino=7203 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:vendor_file:s0 tclass=file permissive=0 2019-02-04 15:30:22.400 13939-13939/? A/DEBUG: #00 pc 00003ea4 /vendor/lib/libcdsprpc.so (verify_local_handle+23) 2019-02-04 15:30:22.400 13939-13939/? A/DEBUG: #01 pc 000031b1 /vendor/lib/libcdsprpc.so (get_domain_from_handle+24) 2019-02-04 15:30:22.400 13939-13939/? A/DEBUG: #02 pc 0000377d /vendor/lib/libcdsprpc.so (remote_handle64_close+28) 2019-02-04 15:30:22.400 13939-13939/? A/DEBUG: #03 pc 00001757 /data/app/com.mycompany.secret.myskel-zrVvAaXvV92TY5Pxx-0vkA==/lib/arm/libcalculator.so (calculator_close+22) 2019-02-04 15:30:22.400 13939-13939/? A/DEBUG: #04 pc 000015e1 /data/app/com.mycompany.secret.myskel-zrVvAaXvV92TY5Pxx-0vkA==/lib/arm/libcalculator.so (Java_com_mycompany_secret_myskel_MainCalculator_sum+528) 2019-02-04 15:30:23.283 1626-13944/system_process W/ActivityManager: Force finishing activity com.mycompany.secret.myskel/.MainCalculator 2019-02-04 15:30:23.324 5850-5880/com.mycompany.secret.platform D/METRICA: reportError: data_app_native_crash:com.mycompany.secret.myskel ys.ch: Process: com.mycompany.secret.myskel Package: com.mycompany.secret.myskel v1 (1.0) Foreground: Yes Build: mycompany/Secret/Secret:8.1.0/8710.1.A.0047-SS.20190125/01251457:userdebug/release-keys *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'mycompany/Secret/Secret:8.1.0/8710.1.A.0047-SS.20190125/01251457:userdebug/release-keys' Revision: '0' ABI: 'arm' pid: 13871, tid: 13871, name: .secret.myskel >>> com.mycompany.secret.myskel <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7 Cause: null pointer dereference r0 ffffffff r1 ffffffff r2 00016e14 r3 ffffffff r4 ffaaca3c r5 ccba7df0 r6 ffffffff r7 ccba7df0 r8 ccba7df0 r9 e710f000 sl ffaacb40 fp ffaacacc ip cccadf90 sp ffaac850 lr ccb911b5 pc ccb91ea4 cpsr a00b0030 backtrace: #00 pc 00003ea4 /vendor/lib/libcdsprpc.so (verify_local_handle+23) #01 pc 000031b1 /vendor/lib/libcdsprpc.so (get_domain_from_handle+24) #02 pc 0000377d /vendor/lib/libcdsprpc.so (remote_handle64_close+28) #03 pc 00001757 /data/app/com.mycompany.secret.myskel-zrVvAaXvV92TY5Pxx-0vkA==/lib/arm/libcalculator.so (calculator_close+22) #04 pc 000015e1 /data/app/com.mycompany.secret.myskel-zrVvAaXvV92TY5Pxx-0vkA==/lib/arm/libcalculator.so (Java_com_mycompany_secret_myskel_MainCalculator_sum+528) #05 pc 0000b121 /data/app/com.mycompany.secret.myskel-zrVvAaXvV92TY5Pxx-0vkA==/oat/arm/base.odex (offset 0xb000)
I tried to run apk provided by Qualcomm the directory calculator_c++_app, and it fails with the same error
I compiled shared object with nextcommand:
make tree V=hexagon_Debug_dynamic_toolv83_v60
I signed the result(libcalculator_skel.so) and pushed to /data/app
my processor is Snapdragon SDM630, with hexagon 642
As I understand, cDSP is not available on my procesor, but library libcdsprpc.so is pointed here, instead of libadsprpc.so
Any help will be really appreciated
Hi
Looks like your app is getting linked to libcdsprpc. You need to change the linker flag in CMakeLists.txt to be able to link libadsprpc. Check line#17 of CMakeLists.txt in \calculator_c++_app\app\.
Regards,
Maitreyi