When debugging Android development and connecting mobile phones, it is clear that the development mode has been turned on and USB debugging is allowed. After connecting the mobile phone, the device still cannot be found, and an error is reported after inputting the ADB shell in the console error:device not found。 The methods on the Internet can be roughly divided into:
1. ADB kill server to kill the ADB process, and then use the ADB start server command to start it;
2. Detect port 5037( adb.exe Whether the default port is occupied or not adb.exe For processes that occupy port 5037, restart the ADB service:
2.1. ADB nodeamon server: check whether port 5037 is occupied;
2.1 2.2, netstat – ano | findstr “5037”: check which process occupies port 5037;
2.3, tasklist | findstr “21152”: check which program created this process (21152 is the PID of a process occupying port 5037);
2.4, taskkill/F/PID 21152: turn off the process;
2.5, ADB devices: display the current connected devices.
Another solution is provided here, by manually viewing the hardware ID and installing Google native Android debug driver;
1. Right click my computer – & gt; management – & gt; device management – & gt; Android phone. Here we can see the corresponding Android device driver.
2. Right click the attribute of the driver, select the hardware ID in the attribute (P) option under the details option, and record the information in the following value (V). For example, the value of a device is:
USB\VID_2A45&PID_0C02&REV_????&MI_01
USB\VID_2A45&PID_0C02&MI_01
Focus on 2a45 and 0c02.
3. Find the SDK directory of Android development and download (assuming you have downloaded it through the SDK manager) in the computer, and enter into the system of ⁃ extras ⁃ Google ⁃ USB_ In the driver folder, find Android_ winusb.inf This is a Google configuration file for Android. Found in file[ Google.NTx86 ](for 32-bit platform, 64 bit is the same as adding) in this line, you can see a lot of Android device driver information below, for example:
;Google Nexus One
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0D02&MI_01
Here, we only need to copy the driver information in the format of this file, and modify it with 2a45 and 0c02 obtained in 2, as follows:
;MEIZU metal
%SingleAdbInterface% = USB_Install, USB\VID_2A45&PID_0C02
%CompositeAdbInterface% = USB_Install, USB\VID_2A45&PID_0C02&MI_01
Save and close.
4. Uninstall the original driver and restart the computer. Make sure that the mobile phone has entered the developer mode and allows USB debugging. Select the connection mode to transfer files. Then right click computer – & gt; manage – & gt; device management – & gt; other devices again. You can see a question mark on the ADB interface option, indicating that the driver is not installed correctly. Select the ADB interface and right-click to select Update Driver Software – & gt; browse the computer to find the driver software. In browsing, select Android, the hardware device driver information file that we added before_ winusb.inf The folder of (d): – Android – SDK – Extras – Google – USB_ In this case, you only need to select a folder, not a file). Next, choose always install.
5. After successful installation, an Android phone option will appear in device management.
Read More:
- Solution to error: no devices found in ADB command
- adb shell error: device offline [How to Solve]
- [Android test] solution for error closed after the carriage return of the ADB shell
- [Solved] adb shell error: error: device unauthorized
- [Solved] adb shell error: no devices/emulators found
- Solution to the error $’\ R’: command not found when executing shell script under Linux
- Command not found: ADB appears on Mac
- Android ADB command adb devices error: protocol fault (no status)
- Error: ADB prompts device unauthorized
- Error BC: command not found when git bash runs shell script
- When executing shell script, $’r ‘: command not found appears
- Shell script running error bash: JPS: command not found
- Adb error: more than one device/emulator error handling
- How to eliminate ADB error “more than one device and emulator”
- Linux basic command execution error: the solution of command not found
- After adb is connected to an android phone, remount failed: operation not permitted when adb remount is a roundabout solution
- MacOS WGet ‘command not found’ solution
- Solution not found by JPS command
- The ADB server port is changed to 10001, and appium cannot connect to the device
- Mac command not found solution