Why is an error reported when you enter the ADB shell command in the doscommand line?

Source: Internet
Author: User

in command line (that is, start-run-input cmd) mode, if you enter the ADB shell command, two errors are generally reported. One is that" ADB is not an internal command or an external command, it is neither a running Program or a batch file. The second is "error: device not found ".

for the first error, the environment variable is not configured. The environment variables used by each application need to be used. In this case, the paths for pathstores, path.exe, And. Bat programs are not configured. When you enter a command in the command line, the computer will first report "ADB is not an internal command or an external command in the current directory (generally c: \ User \ Program, it is not a running program or batch file "error. There are two solutions: one is to add the adb.exetoken to the pathpattern, And the adb.exe is located in the platform-tools directory under the SDK directory. For example, if my android SDK file is located under D: \ Android, the correct path should be "D: \ Android-SDK-Windows \ platform-tools ". Append this string to the path of the system or user environment variable. Second, enter the patform-tools directory in the DOS environment. Take my machine as an example, run the "cd d: \ Android-SDK-Windows \ Users" file, and then run the "ADB shell" command.

for the second error, because the android virtual machine is not enabled. Because the ADB shell command is actually used to operate the current virtual machine, you need to enter the file structure of the current virtual machine. If you do not open the VM, this command will certainly report "error: device not found" (that is, the device is not found) error. The solution is to open the Virtual Machine and ensure that the first error has been solved. Enter ADB shell to enter the structure of the android virtual machine.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.