有没有办法在Android上运行二进制可执行文件(使用NDK编译)?
/* #includes #defines ... */
int main(){
// Do something when this is executed
return 0;
}
我希望它独立于VM运行。就像不在事件中一样,只有直接在proc上运行的二进制文件
最佳答案
adb push exename /data/bin/exename
#next line might be needed if you are developing on Windows
adb shell chmod 777 /data/bin/exename
adb shell /data/bin/exename
但是您的设备必须 Root 。 (它也可以在模拟器上使用。)
关于c++ - 在Android上执行纯二进制文件,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7860874/