Skip to content Skip to sidebar Skip to footer

Valgrind Cannot Execute Memcheck Tool On Android OS?

I've compiled Valgrind for ARM using this with minor alterations. After installing on a phone with the method specified, I get the following error: # /data/local/Inst/bin/valgrind

Solution 1:

I recently ran into the exact same problem. On my device /data/local/Inst and all of its content is owned by a user named "shell". Strange enough, when I try to execute valgrind with the root user, I get the above-mentioned error, but as soon as I log in with the unprivileged user, I can run valgrind without any issues.

From the information you posted, I take, that you installed valgrind as the root user, and I assume you also executed it as root.

So here are the steps that got it working for me:

  • /data/local/Inst is owned by an unprivileged user
  • Install valgrind with the same unprivileged user
  • Again, execute valgrind with the same user

Hope this helps.


Solution 2:

Normally, this indicates some files (either lib or config files) lack the permission to you. Most likelihood is when you install the Valgrind with root, the umask may exclude the rx for others. It is easy to solve this by adding the rx permission for others:

find /usr/local -name "*valgrind*" -exec chmod o+rxt {} \;


Solution 3:

If you use Valgrind on Android, at least there are three way to solve the problem. (You must root your Android phone first.)

On your PC

cmd
adb shell
$su
#cp /data/local/Inst/bin/valgrind /system/bin/

Note: Remember to chmod. For example chmod 777 valgrind.

On your Android phone

Install an app "Root Explorer". Copy valgrind to /system/bin/ with the app.

Write a shell script

This is a example: Can't run a Java Android program with Valgrind

Chinese Comments: 我本人曾不止一次英语考试不及格。写英文回贴真的很不舒服。不过自我学Android开始,就从http://stackoverflow.com 这里得到过很多帮助。 知恩回报是中华民族的传统美德,所以 就硬首头皮写了这个E文回贴。


Post a Comment for "Valgrind Cannot Execute Memcheck Tool On Android OS?"