“运行 adb 设备时未列出 Android 设备 (ubuntu 10.10)”

发布于 2024-10-10 19:30:16 字数 373 浏览 10 评论 0原文

运行 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

弥繁 2024-10-17 19:30:16

我总是第一次以 root 身份运行 adb,之后以普通用户身份运行。但我运行了一个暂停的虚拟机,因此我不必经常这样做。

您的想法是正确的,解决方案肯定是您需要规则目录中文件的权限。我能提出的唯一建议是您使用了错误的供应商 ID。

查找此处

此外,确保您在下运行正确的 adb root,运行两者:

sudo adb kill-server
adb kill-server

之前:

sudo adb start-server

我发现仅运行一个并不总是有效。

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:

sudo adb kill-server
adb kill-server

before:

sudo adb start-server

I have found just running the one doesn't always work.

熊抱啵儿 2024-10-17 19:30:16

作为临时解决方法,您可以尝试以 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.

逐鹿 2024-10-17 19:30:16
sudo /etc/init.d/udev restart

正如特洛伊木马的建议值得尝试,但我想,无论如何,你在中间做了一些重新启动。

在将设备插入 USB 之前,您是否尝试过重新启动 adb 服务器?这帮助了我。

sudo /etc/init.d/udev restart

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.

陌上青苔 2024-10-17 19:30:16

就我而言,它突然停止检测我的设备,但有时它会检测到它,这让我发疯。

经过多次杀机和重启后,最终发现是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.

梦亿 2024-10-17 19:30:16

规则 SUBSYSTEM=="usb", SYSFS{idVendor}=="040d", MODE="0666" 实际上会授予对设备的访问权限,但问题可能是您的用户可能没有权限访问设备的权限。

因为您没有为规则提供组,所以我不知道哪个组将具有对设备的默认访问权限(我猜也许 udev 组将拥有它),并且如果您将遵循 google 的设备设置路径(请参阅第 3 节,第三点,a 小节),您会发现您错过了规则中的 GROUP 子句。

所以基本上你的规则应该是。

UBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE=="0666", GROUP="plugindev"

还可以使用命令 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.

UBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE=="0666", GROUP="plugindev"

also check if you are in the group plugindev using the command groups. else you can give there whatever as long as you are in the group

扭转时空 2024-10-17 19:30:16

在 Ubuntu 10 LTS 之前,正确的命令只是将 Google SDK 附带的 adb 复制到 /bin 目录,根据您的设备插入该行,

/etc/udev/rules.d/70-persistent-net.rules:

#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"

然后重新启动 udev 和 adb

sudo service udev restart
adb kill-server ; adb kill-server

这似乎在 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

/etc/udev/rules.d/70-persistent-net.rules:

#Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
#Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666"
#Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666"
#Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="091E", MODE="0666"
#Google
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
#HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666"
#Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
#Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666"
#LG
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666"
#Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666"
#Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666"
#Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="10A9", MODE="0666"
#Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666"
#Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666"
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
#ZTE
SUBSYSTEM=="usb", ATTR{idVendor}=="19D2", MODE="0666"

Then restart udev and adb

sudo service udev restart
adb kill-server ; adb kill-server

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.

不回头走下去 2024-10-17 19:30:16

在编辑 sudoers 之前,我遇到了同样的错误。
您可以获取 android SDK 的平台工具和工具文件夹的路径以及
输入:

sudo gedit /etc/sudoers
edit line `<<<<<      Defaults      secure_path=" >>>>>` 

添加完成那里的路径并享受。

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 :

sudo gedit /etc/sudoers
edit line `<<<<<      Defaults      secure_path=" >>>>>` 

add complete the path there and enjoy.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文