Tag Archives: ADB shell

[Android test] solution to error closed after ADB shell carriage return

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

Phenomenon 1: when the mobile phone is connected to USB for monkey test, start a CMD window to input again, and error closed appears after the ADB shell returns. In some cases, some mobile phones will appear this phenomenon

Phenomenon 2: when the mobile phone is connected to USB for eclipse debugging or app installation, Eclispe console prompts: failed to install * *. APK on device ‘019417a3’: unable to open sync connection

I think the reasons for the two phenomena are the same

The solution is as follows:

First: restart the computer, then check the mobile phone to the computer and start eclipse

Second: mobile phone – Settings – Application – Development – USB debugging, open and close again

Third: restart the phone, USB debugging on and off again

Fourth: try “ADB kill server” and then “ADB start server” under CMD

In my opinion, the second and third methods are more practical