简体   繁体   English

ADB错误= 13,来自ADB的权限被拒绝,存在= true-Android SDK设置

[英]ADB error=13, Permission denied from ADB, exists=true - Android SDK Setup

This is a recurrent question, and it seems it has several reasons. 这是一个经常性的问题,似乎有几个原因。 I cannot discover mine, even after googling. 即使经过谷歌搜索,我也找不到我的。 Several people had answered this question, though. 不过,有几个人回答了这个问题。

The problem is that when I try to run an android project with Eclipse and ADB, I get: 问题是当我尝试使用Eclipse和ADB运行android项目时,我得到:

Failed to get the adb version: Cannot run program "/extraHD/android/android-sdk-linux/platform-tools/adb":
error=13, Permission denied from '/extraHD/android/android-sdk-linux/platform-tools/adb'
- exists=true

Some data: 1) /extraHD is my second HD, 180GB free, where I have full permissions 2) adb executable has full permission 777 3) If, after 'cd /extraHD/android/android-sdk-linux/platform-tools', I run any of these (no adb process running): 一些数据:1)/ extraHD是我的第二个HD,180 GB可用空间,其中我具有完全权限2)adb可执行文件具有完全权限777 3)如果在“ cd / extraHD / android / android-sdk-linux / platform-tools”之后,我运行以下任何一个(不运行adb进程):

./adb 
./adb shell
./adb start-server
./adb kill-server
./adb shell kill you
./adb root
./adb remount

I get the very same answer: 我得到完全相同的答案:

bash: ./adb: Permission denied

And same answer when executing as root! 和以root身份执行时的答案相同! I can create/delete files in that directory, even as a normal user... 即使是普通用户,我也可以在该目录中创建/删除文件...

Same problem after reinstalling ADB, both through Eclipse and zip file. 通过Eclipse和zip文件重新安装ADB之后,同样的问题。

Rebooting didn't work either. 重新启动也不起作用。

I get the same problem with /extraHD/android/android-sdk-linux//tools/emulator. 我在/ extraHD / android / android-sdk-linux // tools / emulator中遇到了同样的问题。

Tried fsck, reinstalled Eclipse, reinstalled Tools and Platform-tools (adb in particular), reinstalled the APIs. 尝试了fsck,重新安装了Eclipse,重新安装了工具和平台工具(特别是adb),重新安装了API。 Same thing. 一样。

Clues?? 线索?

I had a similar problem and I solved it by doing the following (mounting the sdk partition at boot time and changing permissions in fstab in order to allow writing in Windows NTFS partition): 我遇到了类似的问题,并通过执行以下操作(在启动时安装sdk分区并在fstab中更改权限以允许在Windows NTFS分区中写入)解决了该问题:

  1. Open a terminal, you can use Ctrl+Alt+t 打开终端,可以使用Ctrl + Alt + t

  2. Use 'blkid' to list the block devices and print the universally unique identifiers (UUID) 使用“ blkid”列出块设备并打印通用唯一标识符(UUID)

     sudo blkid 
  3. Locate the line with the label of your SDK partition and copy the UUID value: 找到带有SDK分区标签的行,然后复制UUID值:

    /dev/sXX: LABEL="secondHD" UUID=" copy_this " TYPE="ntfs" / dev / sXX:LABEL =“ secondHD” UUID =“ copy_this ” TYPE =“ ntfs”

  4. Add a new line at the end of the fstab file so the partition will be mounted during boot: 在fstab文件末尾添加新行,以便在引导过程中挂载该分区:

     sudo gedit /etc/fstab 
  5. Remember to customize the "your.." values, the order it's important, fields on each line are separated by tabs or space; 记住要自定义“ your ..”值,这是重要的顺序,每一行的字段都用制表符或空格分隔; type man fstab for further information). 输入man fstab以获取更多信息)。 Save and exit. 保存并退出。

    UUID="yourValueCopied" "yourPartitionPath&Name" ntfs users,uid="YourGroup",gid="YourUserGroup",umask=0022,exec,permissions,auto 0 2 UUID =“ yourValueCopied”“ yourPartitionPath&Name” ntfs用户,uid =“ YourGroup”,gid =“ YourUserGroup”,umask = 0022,exec,permissions,auto 0 2

  6. Restart the computer and try another time adb :) 重新启动计算机,然后再次尝试adb :)

Seems that It's a ntfs partition issue: 似乎是ntfs分区问题:

https://askubuntu.com/questions/207180/changing-permissions-in-fstab-in-order-to-allow-writing-in-windows-ntfs-partitio https://askubuntu.com/questions/207180/changing-permissions-in-fstab-in-order-to-allow-writing-in-windows-ntfs-partitio

A very good explanation of fstab-permission-masks: fstab-permission-masks的一个很好的解释:

http://www.omaroid.com/fstab-permission-masks-explained/ http://www.omaroid.com/fstab-permission-masks-explained/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM