How to start an android app with valgrind

℡╲_俬逩灬. 提交于 2019-11-27 06:45:35

You can try to clear the logcat first

prompt# adb logcat -c
prompt# adb logcat

You should be able to see the logs coming in once you triggered your application.

am start -a android.intent.action.MAIN -n com.example.hellojni/.HelloJni

I had problems with my shell script and i used this instead.

adb shell setprop wrap.com.example.hellojni "logwrapper /data/local/Inst/bin/valgrind"

You should be able to pass in the parameter right after valgrind

I encountered this problem too. In my situation, I edit the "val.sh" in windows & adb push it to the emulator, but the shell script could not be executed correctly. Then I use a echo "*" > val.sh style to make the "val.sh" and It works well.

So you should first make sure the "val.sh" could be interpreted correctly.

yes, but you should use

adb shell setprop wrap.com.example.hellojni "logwrapper ./data/local/Inst/bin/valgrind"
/\----for shell (.) is important!!!

also if you wish to use some configure of valgrind tool's - use this:

adb shell setprop wrap.com.example.hellojni "logwrapper ./data/local/Inst/bin/valgrind --tool=massif (...configure massif a.t.c. ...)"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!