在设备上安装APK时出现“权限被拒绝"错误

在设备上安装APK时出现“权限被拒绝

问题描述:

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

When I use Eclipse to deploy an Opengl ES app to device I get following error

[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!

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

It used to work before. But now I flashed my phone with GingerReal 1.2 ROM and when I try to run the app it gives out this error.
I have enabled 'Unknown Sources' and 'USB Debugging'.

Dunno是否有帮助.但是我尝试直接使用"adb install".但是仍然失败了.我得到以下信息:

Dunno whether this helps.. but i tried using "adb install" directly. But still it failed. I got the following:

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

好吧,解决了它..显然是因为adb守护进程不能以root用户身份运行-

Okay solved it.. it apparently occurs because adb daemon can't run as root- http://groups.google.com/group/android-platform/browse_thread/thread/a8d9f57ecb631689 So change

ro.secure=1 

收件人:

ro.secure=0 

/default.prop
中的

它解决了这个问题.但是我跟随其他几个人,我想它与ROM有关

in /default.prop
It solved this problem. But i got several others following it and I suppose it has got something to do with the ROM