admin管理员组文章数量:1542928
使用 NDK 编译可执行文件,即 Android.mk 文件应该是编译 target 应该是 BUILD_EXECUTABLE
include $(BUILD_EXECUTABLE)
假设,编出的目标为 helloworld
1. 将 helloworld push 到手机的 /sdcard 目录下
2. 执行 adb shell
3. 将 /sdcard/helloworld 拷贝到/data/local/tmp
4. 进入到 /data/local/tmp 目录下,并执行 chmod 777 helloworld
5. 执行 helloworld,即 ./helloworld
简而言之,就是这个样子:
jerikc$ adb push helloworld /sdcard/
jerikc$ adb shell
shell@idol:/ $ cp sdcard/helloworld /data/local/tmp/
shell@idol:/ $ cd /data/local/tmp/
shell@idol:/data/local/tmp $ chmod 777 helloworld
shell@idol:/data/local/tmp $ ./helloworld
版权声明:本文标题:android非root状态,修改文件权限,非Root权限的Android上运行可执行文件 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1727081526a1096895.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论