[英]Adb permission denied when run from Java program
I'm trying to run chimpchat from Java code and I get this error: 我正在尝试从Java代码运行chimpchat,但出现此错误:
Unexpected exception 'Cannot run program "/home/asco/adt-bundle-linux-x86_64/sdk/platform-tools": error=13, Permission denied' while attempting to get adb version from '/home/asco/adt-bundle-linux-x86_64/sdk/platform-tools 意外的异常“无法运行程序” / home / asco / adt-bundle-linux-x86_64 / sdk / platform-tools”:错误= 13,权限被拒绝',尝试从'/ home / asco / adt-bundle获取ADB版本-linux-x86_64 / sdk / platform-tools
I can run adb from the shell as a normal user. 我可以以普通用户身份从Shell运行adb。 I've chmod 777
'ed the adb program. 我已经用chmod 777
编辑了adb程序。 What can I do? 我能做什么? I run Linux Mint 14 (64bit) (have ia32-libs installed) and use java7-openjdk-amd64
. 我运行Linux Mint 14(64位)(已安装ia32-libs)并使用java7-openjdk-amd64
。
When I tried to open the Android SDK from Eclipse I also received the error 当我尝试从Eclipse打开Android SDK时,我也收到错误消息
"...Permission denied' while attempting to get adb version from '..." “ ...权限被拒绝,而试图从中获取adb版本。”
initially, I tried 最初,我尝试
sudo apt-get install ia32-libs sudo apt-get安装ia32-libs
but it did not fix the problem. 但这并不能解决问题。 i had them already. 我已经有他们了。
What fixed the problem was 解决问题的是
sudo chmod -R 777 /name-of-root-directory-containing-SDK 须藤chmod -R 777 /包含根目录的名称-SDK
Recommendation! 建议! Place SDK, JDK and all other manually installed non-system resources in their own root directory. 将SDK,JDK和所有其他手动安装的非系统资源放在其自己的根目录中。 [ example: /resource ] Permissions set on this directory make no change to any critical files. [示例:/ resource]在此目录上设置的权限不会更改任何关键文件。
Warning! 警告! Erroneous use of chmod -R on system directories can lead to "must reinstall OS from scratch" 在系统目录上错误地使用chmod -R可能导致“必须从头开始重新安装操作系统”
it then complains about not finding the adb program 然后抱怨没有找到adb程序
you need to install ia32-libs
package: 您需要安装ia32-libs
软件包:
sudo apt-get install ia32-libs
The error is specifying the directory that contains adb, rather than the adb executable itself. 错误是指定包含adb的目录,而不是adb可执行文件本身。 Check the permissions on the directory, and that your program is attempting to run the proper command (it may be trying to run the directory, which clearly won't work...). 检查目录的权限,并且您的程序正在尝试运行正确的命令(它可能正在尝试运行目录,这显然不起作用...)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.