Reputation: 1221
I'm trying to use valgrind
on android, and have some problems. When I launch app under valgrind
I got following errors(in logcat):
logwrapper W type=1400 audit(0.0:73): avc: denied { execute } for name="start_valgrind.sh" dev="dm-1" ino=654102 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:system_data_file:s0 tcla ss=file permissive=0
E executing /data/local/start_valgrind.sh failed: Permission denied
start_valgrind.sh I executing /data/local/start_valgrind.sh failed: Permission denied
I start_valgrind.sh terminated by exit(255)
Preconditions:
adb shell setprop wrap.$PACKAGE \"logwrapper /data/local/start_valgrind.sh\"
(start_valgrinds.sh script
from below link) chmod -R 777 /data/local/Inst/
(location for valgrind bin). chmod 777 /data/local/start_valgrind.sh
(start script, see 2 item)adb shell am start -a android.intent.action.MAIN -n $PACKAGE/.MainActivity
Maybe problem that logwrapper
can not start script /data/local/start_valgrind.sh
due to that fact that it does not have enouph permissions, but how to add those permissions.?
Upvotes: 5
Views: 900
Reputation: 41
The logwrapper can't execute the shell script as it has SELinux permission issue. Try to disable teh SELinux enforcement with below command
setenforce 0
Upvotes: 3