在设备上安装apk时出现"Permission Denied"错误

sin*_*ohn 9 android opengl-es opengl-es-2.0

当我使用Eclipse将Opengl ES应用程序部署到设备时,我得到以下错误

[2011-09-19 15:56:40 - SimpleCube] Failed to install SimpleCube.apk on device 'S5830bfcc8426': Permission denied
[2011-09-19 15:56:40 - SimpleCube] com.android.ddmlib.SyncException: Permission denied
[2011-09-19 15:56:40 - SimpleCube] Launch canceled!
Run Code Online (Sandbox Code Playgroud)

以前曾经工作过.但现在我用GingerReal 1.2 ROM刷了我的手机,当我尝试运行应用程序时,它发出了这个错误.
我启用了"未知来源"和"USB调试".

编辑:不知道这是否有帮助..但我尝试直接使用"adb install".但它仍然失败了.我得到以下内容:

sinu@ubuntu:~$ ./adb install /home/sinu/programs/SimpleCube.apk
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
failed to copy '/home/sinu/programs/SimpleCube.apk' to '/data/local/tmp/SimpleCube.apk': Permission denied
Run Code Online (Sandbox Code Playgroud)

小智 12

我有同样的问题,所以我检查了这个文件夹/ data/local/tmp,发现它没有r/w权限给大家:
drwxrwx - x shell shell 1970-01-02 03:21 tmp
一个简单的'chmod 777 tmp'修复了它,所以现在我可以从eclipse中自由调试了.
我不确定这是否与其他人相关,因为我正在开发一些供应商设备的测试版.


sin*_*ohn 0

好的解决了..它显然是因为 adb 守护进程无法以 root 身份运行而发生的 - http://groups.google.com/group/android-platform/browse_thread/thread/a8d9f57ecb631689 所以改变

ro.secure=1 
Run Code Online (Sandbox Code Playgroud)

到:

ro.secure=0 
Run Code Online (Sandbox Code Playgroud)

在 /default.prop 中
解决了这个问题。但我还有其他几个人关注它,我想这与 ROM 有关