简体   繁体   English

Android:adb shell,找不到命令 adb

[英]Android : adb shell, no command adb found

I am simply trying to run the adb shell so I can kill a process for testing purposes.我只是想运行 adb shell 以便我可以终止一个进程以进行测试。 I am in the directory platform-tools and the adb executable is in there.我在目录平台工具中,并且 adb 可执行文件在那里。 When I try to run the shell it says adb command not found.当我尝试运行 shell 时,它说找不到 adb 命令。 I am running eclipse (through Ubuntu) and using an emulator.我正在运行 eclipse(通过 Ubuntu)并使用模拟器。 Not sure whats going on.不知道发生了什么。 Thanks a lot.非常感谢。

Run it like that ./adb shell (note the ./ )像这样运行它./adb shell (注意./

By default, local folder is not in the path.默认情况下,本地文件夹不在路径中。

adb is not in your path. adb 不在您的路径中。 It's easy enough to add it to your path though, if you're using the latest version of the sdk, open up your.profile file (in your home directory, that's (dot) profile) and add the lines:不过,将它添加到您的路径很容易,如果您使用的是最新版本的 sdk,请打开 your.profile 文件(在您的主目录中,即(点)配置文件)并添加以下行:

PATH=/path/to/sdk/android-sdk-linux_86/tools:$PATH
PATH=/path/to/sdk/android-sdk-linux_86/platform-tools:$PATH

You can create a link for adb like this: ln -s adb /usr/local/sbin/adb then you can run adb anywhere您可以像这样为 adb 创建一个链接: ln -s adb /usr/local/sbin/adb 然后您可以在任何地方运行 adb

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

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