日期:2014-05-16  浏览次数:20739 次

安卓底层
在ubuntu交叉编译的c程序在(加-static 静态编译了) ,adb shell运行遇到下面的情况sh: ./hello: Permission denied(已经切换到root且chmod +x) su 程序运行后没显示?

谁给解释下?
------解决方案--------------------
没人回复。我也不懂
------解决方案--------------------
这个问题我2个月前刚刚搞定。如果真的是静态编译的,应该不会出现你说的问题。
可以去我写的文章看看,这里面介绍的是动态库的程序。应该静态的实在是太简单了没有介绍。
http://blog.csdn.net/fly_qj/article/details/8309130

------解决方案--------------------
ls -l 看看执行权限先。
------解决方案--------------------
楼主的chmod是busybox的,而不是toolbox的?
如果是toolbox的,应该会报错才对啊?
# ls -l testsh
-rw-rw-rw- root     root            0 2013-02-21 04:04 testsh
# chmod +x testsh
Bad mode

# ls -l testsh
-rw-rw-rw- root     root            0 2013-02-21 04:04 testsh
# chmod 777 testsh
# ls -l testsh
-rwxrwxrwx root     root            0 2013-02-21 04:04 testsh