android 终端无法运行C程序,该如何解决
android 终端无法运行C程序
各位好,刚开始学习android, 现在按照这个网址:http://blog.****.net/satiling/article/details/6914466(其实就是安装编译器,然后编译helloworld程序)
把一个helloworld 程序编译成二进制,然后 push到虚拟机中,在终端运行,发现即使我把权限改成 chmod 777 testhello ,然后./testhello还是提示说:permission denied
请问下 这个是怎么回事,谢谢!
------解决方案--------------------
你要执行这个文件需要在/system/bin下面用./<文件名>
那么你为什么不能运行呢?
首先,在进adb push之前先设置权限:adb root试试,如果不行那么你在adb push之前设置:adb remount。这样应该就能push进去了。
各位好,刚开始学习android, 现在按照这个网址:http://blog.****.net/satiling/article/details/6914466(其实就是安装编译器,然后编译helloworld程序)
把一个helloworld 程序编译成二进制,然后 push到虚拟机中,在终端运行,发现即使我把权限改成 chmod 777 testhello ,然后./testhello还是提示说:permission denied
请问下 这个是怎么回事,谢谢!
------解决方案--------------------
你要执行这个文件需要在/system/bin下面用./<文件名>
那么你为什么不能运行呢?
首先,在进adb push之前先设置权限:adb root试试,如果不行那么你在adb push之前设置:adb remount。这样应该就能push进去了。