“运行 adb 设备时未列出 Android 设备 (ubuntu 10.10)”
运行 adb 设备时,我的 Android 设备 Ly-706 未列出。
我可以使用 eclipse 运行模拟器并在模拟器上安装应用程序 使用adb,除了在真实设备上
我添加:
SUBSYSTEM=="usb", SYSFS{idVendor}=="040d", MODE="0666"
在 /etc/udev/rules.d/90-android.rules
中,仍然没有运气
三星 Galaxy 3(供应商 id ="04e8")的结果相同
我安装了 GNU/Linux (ubuntu 10.10),因为它没有在 Windows 中列出。
我缺少什么?
My Android device Ly-706 is not listed while running adb devices.
I can run emulator using eclipse and install application on emulator
using adb except on Real device
I added:
SUBSYSTEM=="usb", SYSFS{idVendor}=="040d", MODE="0666"
in /etc/udev/rules.d/90-android.rules
,still no luck
Same result for samsung galaxy 3(vendor id ="04e8")
I installed GNU/Linux (ubuntu 10.10) because it is not listing in windows.
What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
我总是第一次以 root 身份运行 adb,之后以普通用户身份运行。但我运行了一个暂停的虚拟机,因此我不必经常这样做。
您的想法是正确的,解决方案肯定是您需要规则目录中文件的权限。我能提出的唯一建议是您使用了错误的供应商 ID。
查找此处
此外,确保您在下运行正确的 adb root,运行两者:
之前:
我发现仅运行一个并不总是有效。
I always run adb as root the first time, and as normal user thereafter. But I run a virtual machine that I suspend so I don't have to do it often.
ou have the right idea, the solution is most definately that you need the permission in the file within rules directory. The only suggestion I can make is that you are using the wrong vendor id.
Look it up here
Also, to make sure you're running the correct adb under root, run both of:
before:
I have found just running the one doesn't always work.
作为临时解决方法,您可以尝试以 root 身份启动 adb 守护进程:
sudo adb Kill-server
sudo adb devices
这对我有用,直到我设法正确设置 udev。
As a temporary workaround you could try starting the adb daemon as root:
sudo adb kill-server
sudo adb devices
This worked for me until I managed to get udev set up properly.
正如特洛伊木马的建议值得尝试,但我想,无论如何,你在中间做了一些重新启动。
在将设备插入 USB 之前,您是否尝试过重新启动 adb 服务器?这帮助了我。
as suggestend by trojanfoe is worth trying, but i guess, you did some restarts in between anyways.
Did you try to restart the adb server BEFORE you usb-plug your device? That helped me out.
就我而言,它突然停止检测我的设备,但有时它会检测到它,这让我发疯。
经过多次杀机和重启后,最终发现是USB线的问题。更改它解决了问题,但我不知道为什么会发生这种情况。
In my case it suddenly stopped detecting my device, but from time to time it detected it, which drived me crazy.
After many kills and restarts, it ended up being something wrong with the USB cable. Changing it solved the problem, tho I have no clue why this could happen.
规则
SUBSYSTEM=="usb", SYSFS{idVendor}=="040d", MODE="0666"
实际上会授予对设备的访问权限,但问题可能是您的用户可能没有权限访问设备的权限。因为您没有为规则提供组,所以我不知道哪个组将具有对设备的默认访问权限(我猜也许
udev
组将拥有它),并且如果您将遵循 google 的设备设置路径(请参阅第 3 节,第三点,a 小节),您会发现您错过了规则中的 GROUP 子句。所以基本上你的规则应该是。
还可以使用命令
groups
检查您是否在plugindev
组中。否则只要你在组里你就可以给那里任何东西The rule
SUBSYSTEM=="usb", SYSFS{idVendor}=="040d", MODE="0666"
would actually give access to the device, but the problem might be that your user may not have the permission for accessing the device.Because you are not giving the groups for the rule, I don't know which group will have the default access to the device (i'm guessing maybe the
udev
group will have it), and if you would have followed the google's path of device setup (see section 3, third point, subsection a), you will realize that you have missed out the GROUP clause in the rule.So basically your rule should be.
also check if you are in the group
plugindev
using the commandgroups
. else you can give there whatever as long as you are in the group在 Ubuntu 10 LTS 之前,正确的命令只是将 Google SDK 附带的 adb 复制到 /bin 目录,根据您的设备插入该行,
然后重新启动 udev 和 adb
这似乎在 Ubuntu 11 中发生了变化,也可能有有可能让 Ubuntu 读取您指定的任何文件 .rules,我只是还不知道如何操作。
Until Ubuntu 10 LTS the correct command is simply copying the adb which comes with the Google SDK, to /bin directory, insert the line according to your device in
Then restart udev and adb
It seems to change in Ubuntu 11, also, there is probably a possibility to make Ubuntu read any file you specify .rules, I just don't know how yet.
在编辑 sudoers 之前,我遇到了同样的错误。
您可以获取 android SDK 的平台工具和工具文件夹的路径以及
输入:
添加完成那里的路径并享受。
I was getting the same error until I edited sudoers.
You can get path of your platform-tools and tools folder of android SDK and
type :
add complete the path there and enjoy.