The ADB command installs APK, and the installation problem is solved by daemon not running. Starting it now on port 5037

Programmer algorithm practice must read, common Java API skills to share>>>

To test the client application on the mobile phone through the mobile phone, it is generally necessary to install the tested application APK into the mobile phone first. The installation steps are as follows:

[preset conditions]

1. Through “start” of PC, enter CMD in the running box and press enter to open the edit interface of CMD

2. If the mobile phone is connected to the PC, the PC can recognize the mobile phone. Enter ADB devices in the CMD editing interface and press enter to check whether the current mobile phone is connected. If the device information is displayed, the identification is connected, as follows:

C:\Users\posuo> adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
TWG0115A27000150 device

[installation command]

ADB install – R xxxx (APK local storage path)

Success will be prompted if the installation is successful

Where: – R: indicates that the installation can be covered

Possible problems: the computer does not recognize the mobile phone, the solution:

1. After the mobile phone is connected to the computer, make sure that the driver of the mobile phone has been installed on the computer

2. In the mobile phone “Settings” – “developer options”, open “USB debugging”

(if you can’t see “developer options” in mobile phone settings, enter “Settings” – about mobile phone, and click the version number column many times – this method is common for Huawei mobile phones.)

3. Enter ADB devices in the CMD editing interface. If the following error is reported, it is caused by the occupation of port 5037. Find out the application occupied by the port and kill the application process

C:\Users\posuo> adb devices
* daemon not running. starting it now on port 5037 *
ADB server didn’t ACK
* failed to start daemon *
error: cannot connect to daemon


First of all, find out the application (process) whose port 5037 is occupied, and input in the CMD interface:

C:\Users\posuo> netstat -ano | findstr “5037”

Note: 12476 is the process number of 5037

Then, kill the process and enter:

C:\Users\posuo> Taskkill – F – PID 12476
success: the process with PID 12476 has been terminated

This is the end

You can input ADB devices in the CMD interface to check whether the mobile device is recognized by the computer. If not, the connected mobile device information will be displayed

If the above method is still unable to identify the mobile phone, delete the application similar to pea pod in the computer and mobile phone, and then carry out the above problem solving steps

Similar Posts: