Android,在logwrapper下启动时启动valgrind权限被拒绝

Naz*_*arK 5 shell android valgrind native adb

我正在尝试valgrind在 android上使用,但遇到了一些问题。当我在valgrind下面启动应用程序时出现以下错误(在 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)
Run Code Online (Sandbox Code Playgroud)

先决条件:

  1. 我在我的机器上构建了 valgring valgrind-3.13.0 并将其推送到 root 的 nexus 6P、8.1.0 操作系统上。(我也用过模拟器 8.0 + valgrind-3.11.0 - 效果一样)
  2. 我设置了道具adb shell setprop wrap.$PACKAGE \"logwrapper /data/local/start_valgrind.sh\"(下面链接中的 start_valgrinds.sh 脚本)
  3. 我使用了这里的说明 /sf/answers/1346480761/
  4. 我做了chmod -R 777 /data/local/Inst/(valgrind bin 的位置)。
  5. 我做了chmod 777 /data/local/start_valgrind.sh(启动脚本,见 2 项)
  6. 我启动了这样的应用程序: adb shell am start -a android.intent.action.MAIN -n $PACKAGE/.MainActivity
  7. 我使用 Hello world 原生 JNI 应用程序。

也许是因为它没有足够的权限而logwrapper无法启动脚本的问题/data/local/start_valgrind.sh,但是如何添加这些权限。?

Fox*_*Fox -1

尝试将start_valgrind.sh移动到/system/bin并设置模式755