ADB设备命令无法正常工作无法正常、命令、设备、工作

2023-09-14 00:06:11 作者:沵別來丶珴无恙

我运行Ubuntu 10.10 64位。我有与安装IA32-库的Andr​​oid调试桥1.0.26版本。

我的问题(S):

ADB设备 >>> ????????????没有权限 须藤ADB设备 >>>>须藤:亚洲开发银行:找不到命令 亚行外壳 >>>错误:权限设备不足

我想这些都是相关的。以下是相关信息。

  $回声$ PATH
/home/me/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/android-sdk-linux_x86/tools:/opt/android-sdk-linux_x86/platform-tools

$亚行
/ OPT / Android的SDK-linux_x86 /平台工具/ ADB

$ ADB设备
*守护进程没有运行。现在在端口5037启动它*
*守护进程启动成功*
设备名单附后
????????????没有权限

$ sudo的ADB设备
须藤:亚行:命令未找到

$ ADB壳
错误:权限设备不足
 

我得到一个植根摩托的Droid运行CM6.1和根深蒂固的G-Tab键运行CM7为基础的ROM相同的结果。

我已经审议了以下相关文章:

http://forum.xda-developers.com/archive/index.php/t-522827.html http://ubuntuforums.org/archive/index.php/t-1164359.html ADB命令不能在Linux环境中发现

我想大部分(不是全部)的建议,我一直没能解决我的问题。这个事情我没有尝试,似乎不合适。我想AP preciate一些更多的提示,我会继续排除故障。

有一件事我没有尝试在编/etc/udev/rules.d/70-android.rules。那是可能是这个问题?我看不出这会导致命令:亚行:命令未找到。也许我的问题是不是都有关。无论如何,在这一点上我想我需要从其他人的一些意见,因为我不相信我有一个路径问题或与其他帖子讨论的其它常见问题。

编辑:解决感谢EboMike和RivieraKid。这实际上是两个不同的问题:

以上项目#2(须藤:ADB:找不到命令),解决了做一个符号链接如下:

  $ sudo的LN -s /选择/ Android的SDK-linux_x86 /平台工具/亚行的/ usr / local / sbin中/ ADB
 

这让我那么做的EboMike建议,并使用该解决方案 。这样做是需要我的摩托的Droid。 (ADB运行的须藤是的没有的要求对我的优派G-平板电脑,但是。)

我的另外两个项目是通过实现udev规则为RivieraKid建议(从这个链接)。

解决方案   

有一件事我没有尝试在编   /etc/udev/rules.d/70-android.rules。是   这可能是这个问题?

有什么特别的理由,你为什么没有这样做?要回答这个问题 - 是的! udev的规则是什么告诉Ubuntu的你的设备,并允许用户空间的工具,因此访问它。

安卓手机无需root也能 卸载 掉系统自带应用

您将无法使用亚行没有正确遵循说明。

考虑到这一点不过,你不说什么版本的Ubuntu,你正在使用,但我有问题10.10 - 让我知道如果你需要我发表我的规则文件的内容

不要担心通过sudo运行ADB,你不需要它。该 MODE =0666从udev规则允许您访问设备的任何用户。

编辑:

不要忘记添加规则后,重新启动udev的:

 须藤/etc/init.d/ud​​ev重启
 

编辑#2:

由于@Jesse格里克正确地指出,如果亚行是在守护进程模式运行,您还需要重新启动这个工作:

 须藤ADB杀死服务器
 

我用sudo的位置,因为这将确保亚洲开发银行将被杀死,这是官方支持的方式来停止服务器。它会在下一次亚行用于自动重启,但这次用正确的环境。

I'm running Ubuntu 10.10 64 bit. I have ia32-libs installed along with Android Debug Bridge version 1.0.26.

My problem(s):

adb devices >>> ???????????? no permissions sudo adb devices >>>> sudo: adb: command not found adb shell >>> error: insufficient permissions for device

I guess these are all related. Here's the relevant info.

$ echo $PATH
/home/me/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/android-sdk-linux_x86/tools:/opt/android-sdk-linux_x86/platform-tools

$ which adb
/opt/android-sdk-linux_x86/platform-tools/adb

$ adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
????????????    no permissions

$ sudo adb devices
sudo: adb: command not found

$ adb shell
error: insufficient permissions for device

I get the same results with a rooted Moto Droid running CM6.1 and a rooted G-Tab running a CM7-based ROM.

I have reviewed the following related posts:

http://forum.xda-developers.com/archive/index.php/t-522827.html http://ubuntuforums.org/archive/index.php/t-1164359.html adb command not found in linux environment

I tried most (not all) of the suggestions and I have not been able to resolve my issue. The things I didn't try seemed inappropriate. I would appreciate a few more tips and I'll keep troubleshooting.

One thing I didn't try was editing /etc/udev/rules.d/70-android.rules. Is that likely to be the issue? I can't see how that would cause "sudo: adb: command not found". Maybe my problems are not all related. Anyway, at this point I think I need some input from other people because I don't believe I have a path problem or the other common problems discussed in those other posts.

EDIT: SOLVED thanks to EboMike and RivieraKid. This was actually two different problems:

Item #2 above (sudo: adb: command not found) was solved by making a symlink as follows:

$ sudo ln -s /opt/android-sdk-linux_x86/platform-tools/adb /usr/local/sbin/adb

That allowed me to then do as EboMike suggested and use this solution. Doing that was required for my Moto Droid. (Running adb as sudo was not required for my Viewsonic G-Tablet, however.)

My other two items were resolved by implementing the udev rule as RivieraKid suggested (from this link).

解决方案

One thing I didn't try was editing /etc/udev/rules.d/70-android.rules. Is that likely to be the issue?

Any particular reason why you didn't do that? To answer the question - YES! The udev rules are what informs Ubuntu what your device is and allows user-space tools to therefore access it.

You will not be able to use adb without correctly following the instructions.

With that in mind however, you don't say what version of Ubuntu you're using but I had issues with 10.10 - let me know if you need me to post the contents of my rules file.

Don't worry about running adb via sudo, you don't need it. The MODE="0666" from the udev rule allows you to access the device as any user.

EDIT:

Don't forget to restart udev after adding the rule:

sudo /etc/init.d/udev restart

EDIT #2:

As @Jesse Glick correctly points out, if adb is already running in daemon mode, you'll also need to restart it for this to work:

sudo adb kill-server

I've used sudo here, since that will guarantee that adb will be killed , and it's the officially supported method to stop the server. It will be automatically restarted the next time adb is used, but this time with the correct environment.