Forums - phone must be rooted to run calculator sample

3 posts / 0 new
Last post
phone must be rooted to run calculator sample
ranjithbliss
Join Date: 11 May 17
Posts: 3
Posted: Sat, 2017-05-20 06:19

Hi,

I am new to this group.

I have a basic question.

To run the sample application like calculator, should the device be rooted?

From the documentation Qualcomm/Hexagon_SDK/3.2/docs/calculator_android.html:

adb shell mkdir -p /vendor/bin/
adb push android_Debug/ship/calculator /vendor/bin/
adb shell chmod 777 /vendor/bin/calculator
adb push android_Debug/ship/libcalculator.so /system/lib/

I think without root access,  the files cannot be pushed to /vendor/bin/ or /system/lib.

Sometimes even with the root access those files cannot be pushed.

I tried to specify /data/local/tmp path. but when I run calculator executable I gor below error:

CANNOT LINK EXECUTABLE "/data/local/tmp/calculator": library "libcalculator.so" not found
Aborted (core dumped)
 
Finally I want an yes/no answer for this question:
Is it compulsory to push the files to /vendor/bin/ and /system/lib/ ?
  • Up0
  • Down0
chennak
Join Date: 22 Sep 16
Posts: 78
Posted: Mon, 2017-05-29 04:30

you can push libcalculator.so to any path. but if the path is other than /system/lib you need to set LD_LIBRARY_PATH to that location. 

adb shell LD_LIBRARY_PATH=/data/local/temp /data/calculator 0 1 1000

 

 

  • Up0
  • Down0
c_zhet
Join Date: 31 Jul 17
Posts: 23
Posted: Mon, 2017-08-21 02:06

You'd better root the phone, otherwise the android OS may prevent your running binary according to security policy.

Is it not compulsory to push the files to /vendor/bin/ and /system/lib/,but you should push all the libs needed and set ADSP_LIBRARY_PATH before run the binary.(e.g.adb wait-for-device shell ADSP_LIBRARY_PATH=/data/local/ /data/local/calculator 0 0 100000)

 

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