Android adb 不允许我输入命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10318564/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android adb won't let me enter commands
提问by willmer
I'm trying to deal with some SQLiteDB issues and wanted to use the ABD tool to access my emulators database. When I click on the adb file in the platform-tool file, it opens up but very quickly throws a bunch of text on the window and then closes. Its so fast I can't even tell what it is doing. I tried running as administrator and it didn't change. I'm using Vista if that has anything to do with it.
我正在尝试处理一些 SQLiteDB 问题,并希望使用 ABD 工具访问我的模拟器数据库。当我单击平台工具文件中的 adb 文件时,它会打开,但很快就会在窗口上抛出一堆文本,然后关闭。它太快了,我什至无法分辨它在做什么。我尝试以管理员身份运行,但没有改变。如果这与它有关,我正在使用 Vista。
Any suggestions for how I can even get it to stop from closing so I can enter a command?
关于如何让它停止关闭以便我可以输入命令的任何建议?
回答by zapl
You start the command shell (WindowsKey+ R, enter cmd
in the window that appears and hit Enter.), then use it from there. adb shell
is probably the command you need.
您启动命令外壳(WindowsKey+ R,cmd
在出现的窗口中输入并按 Enter。),然后从那里使用它。adb shell
可能是您需要的命令。
C:\> cd \Path\to\platform-tools
C:\Path\to\platform-tools\> adb shell
C:\> cd \Path\to\platform-tools
C:\Path\to\platform-tools\> adb shell
if you add the path to your environment PATH
you don't need to cd
there. [This] should be a good example how to do that.
如果您将路径添加到您的环境中PATH
,则不需要在cd
那里。[这] 应该是如何做到这一点的一个很好的例子。
回答by Tech Agent
As mentioned by zapl, you need to launch command prompt, add adb directory to path and then running adb commands. You may also be able to pull the trick with DDMS.
正如 zapl 所提到的,您需要启动命令提示符,将 adb 目录添加到路径,然后运行 adb 命令。您也可以使用 DDMS 来解决问题。
回答by redevill
In the answer, it was not clear that you have to run a windows cmd.exe terminal program first. Make sure you are in the correct directory, Then start ADB from within this cmd program.
在回答中,不清楚您必须先运行 Windows cmd.exe 终端程序。确保您位于正确的目录中,然后从此 cmd 程序中启动 ADB。
To ensure that windows can find adb.exe ("being in the correct directory), you can either navigate to the location of the adb.exe (usually Platform tools) manually using "cd" command, or update your path statement so that windows can find it regardless of where your cmd.exe prompt is pointing.
为了确保 Windows 可以找到 adb.exe(“在正确的目录中”),您可以使用“cd”命令手动导航到 adb.exe(通常是平台工具)的位置,或者更新您的路径语句,以便 Windows无论您的 cmd.exe 提示指向何处,都可以找到它。