Vargrind Android APK

Source: Internet
Author: User
Tags valgrind

The upper level is Android, the lower layer is called C + + library


1, will vargind according to the official website method to download the source code compiled Inst directory 2, through the win under the Android SDK Platform-tools in the ADB push Inst to/data/local 3, the Adb.exe directory can be set to the system environment variable 4, in CMD in the execution of ADB push INST/DATA/LOCAL/5, adb shell into the Android phone Environment 5, chmod-r 777 directory, change the corresponding directory permissions chown-r Root.root *

Writing scripts

Var.sh:
#!/system/bin/shvgparams= '--error-limit=no--leak-check=full--track-origins=yes--log-socket=192.168.1.153:12345 ' Export Tmpdir=/data/data/org.blexec/data/local/inst/bin/valgrind $VGPARAMS $*

Save:

Where 192.168.1.153:12345 is to receive the Vargrind log redirected IP address and port, (so you can write a listener to listen to the output of vargrind, output can be printed or write files)

/DATA/DATA/ORG.BL the path to the Java package on the phone

/data/local/inst/bin/valgrind the Vargrind path on the phone


Push var.sh through ADB to/data/local/tmp/

chmod 777 var.sh


SetProp Wrap. ORG.BL "logwrapper/data/local/val.sh"

am start -a android.intent.action.main -n org.bl /org.bl . apjsuaactivity 

(org.bl Java package name, apjsuaactivity Java Package class name )


ps view valgrind   program is started, if started, wait 3-5 minutes after the interface appears, after the operation to watch the Vargrind output log information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.