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

本文标签: 权限可执行文件状态文件root