android-valgrind icon indicating copy to clipboard operation
android-valgrind copied to clipboard

Reworked scripts for improved reliability and utility (needs validation)

Open CJxD opened this issue 4 years ago • 0 comments

Changes:

  • The start_valgrind.sh script has been renamed to valgrind_wrapper.template.sh to reflect its actual purpose.
  • bootstrap_valgrind.sh has been renamed to start_valgrind.sh to reflect its actual purpose.
  • valgrind_wrapper.template.sh is impregnated with the app package, log file output, and tool name prior to being written.
  • start_valgrind.sh accepts multiple options to set the package name, activity name, log path, and Valgrind tool, rather than modifying the script to enter those.
  • start_valgrind.sh now cleans up after itself by listening for a SIGINT (Ctrl + c) - on reading this, it clears the wrap property on the app and deletes the valgrind_wrapper.sh script.
  • start_valgrind.sh doesn't need an activity manually provided to run.

There is one issue I still haven't been able to get around though which I would like to be tested. I get the following in logcat when running the script:

05-28 16:22:05.280  3534  3534 E logwrapper: executing /data/local/tmp/valgrind_wrapper.sh failed: Permission denied
05-28 16:22:05.280  3532  3532 I valgrind_wrapper.sh: executing /data/local/tmp/valgrind_wrapper.sh failed: Permission denied
05-28 16:22:05.281  3532  3532 I valgrind_wrapper.sh: valgrind_wrapper.sh terminated by exit(255)

The script has 0777 permissions on it, so not sure why that could be. See if it happens for you.

Also, I have not been able to successfully run my app by manually passing an activity via the -a flag: see if that works for you too, as the actual start command hasn't changed.

CJxD avatar May 28 '21 15:05 CJxD