Skip to content Skip to sidebar Skip to footer

How To Start An Android App With Valgrind

I've been searching for the last week trying to find an answer to this question. How do I start an Android app with valgrind? I know I can start an app with the 'am' command, but

Solution 1:

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

Solution 2:

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.

Post a Comment for "How To Start An Android App With Valgrind"