在设备上安装apk时出现“拒绝权限”错误

时间:2022-09-06 21:08:54

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

当我使用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!

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'.

以前它是工作的。但是现在,我用GingerReal 1.2 ROM来展示我的手机,当我试着运行这个应用程序时,它给出了这个错误。我启用了“未知源”和“USB调试”。

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

编辑:不知这是否有帮助。但我尝试直接使用“adb安装”。但仍然失败了。我有以下几点:

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

2 个解决方案

#1


12  

I had the same problem so i checked this folder /data/local/tmp and discovered it didn't have r/w permissions for everyone:
drwxrwx--x shell shell 1970-01-02 03:21 tmp
A simple 'chmod 777 tmp' fixed it, so now i can freely debug from eclipse.
I'm not sure if this relevant for other people because i was working on a beta release of some vendor's device.

我也遇到了同样的问题,所以我检查了这个文件夹/数据/本地/tmp,发现它没有每个人的r/w权限:drwxrwx- x shell 1970-01-02 03:21 tmp一个简单的‘chmod 777 tmp’修复了它,所以现在我可以从eclipse中*地调试。我不确定这是否与其他人相关,因为我正在开发一些厂商的测试版。

#2


0  

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

好的解决了. .它的出现显然是因为adb守护进程不能作为根(http://groups.google.com/group/android- platformform/browse_thread/a8d9df57ecb631689)运行,所以需要进行修改

ro.secure=1 

to:

:

ro.secure=0 

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

在/违约。解决了这个问题。但是我有几个人跟踪它,我想这和ROM有关

#1


12  

I had the same problem so i checked this folder /data/local/tmp and discovered it didn't have r/w permissions for everyone:
drwxrwx--x shell shell 1970-01-02 03:21 tmp
A simple 'chmod 777 tmp' fixed it, so now i can freely debug from eclipse.
I'm not sure if this relevant for other people because i was working on a beta release of some vendor's device.

我也遇到了同样的问题,所以我检查了这个文件夹/数据/本地/tmp,发现它没有每个人的r/w权限:drwxrwx- x shell 1970-01-02 03:21 tmp一个简单的‘chmod 777 tmp’修复了它,所以现在我可以从eclipse中*地调试。我不确定这是否与其他人相关,因为我正在开发一些厂商的测试版。

#2


0  

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

好的解决了. .它的出现显然是因为adb守护进程不能作为根(http://groups.google.com/group/android- platformform/browse_thread/a8d9df57ecb631689)运行,所以需要进行修改

ro.secure=1 

to:

:

ro.secure=0 

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

在/违约。解决了这个问题。但是我有几个人跟踪它,我想这和ROM有关