Solve the problem that adb devices cannot connect to the device

Students often ask me:

My adb devices cannot connect to the device, what should I do?

In fact, there will be many situations. Here I will talk about the possible situations in detail, so that students can locate the problem.

1. The developer options are not turned on.

Generally, if you are a new device, or a device that has been flashed, you will not see this option in the settings. You need to go to About Phone, click your Android version or baseband 4 or 5 times in a row (it may be other options, if one doesn’t work, try other options, click 4 or 5 times in a row), and then you can open the developer options.

2. Turn on usb debugging in the developer options.

After turning on the developer options, you need to turn on the developer options again, and then turn on usb debugging. At this time, most mobile phones will be connected, and there will be a prompt on the computer side, whether to trust the device, and then choose to trust it.

3. If the usb debugging is turned on, but the device still cannot be connected, then revoke the usb authorization.

Under usb debugging, there should be an option to revoke usb authorization. If you still can’t connect to the device, then the usb authorization may not be effective. Then click revoke usb authorization, then open the developer option, and then usb debugging. At this time, it should be ok The device is reconnected.

4. The sdk version is too low.

If the sdk version on your computer is too low, but your device version is relatively high, then you need to download a higher version of sdk on your computer to support your Android device.

5. There is no driver on the computer side

There is no driver for your Android version on the computer, so it may not be able to connect.

You need to go to the official website to download the corresponding driver, and then you can.

Finally, you can re-plug and re-plug the device more, and turn on the usb debugging more, I hope it can help everyone. ~~

Sometimes when you run appium and install apk, WebDriverException: Message: A new session could not be created. (Original error: Command failed: adb: failed to install D:\zidonghua\Appium\node_modules\appium\build\ settings_apk\settings_apk-debug.apk: Failure [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]

)

Sometimes you need to go to the settings of the Android device and turn on the permission to install the application through usb. Some devices will have this option, which is quite tricky and must be turned on.

Finally:  In order to give back to the die-hard fans, I have compiled a complete software testing video learning tutorial for you. If you need it, you can get it for free 【保证100%免费】

 

 How to obtain the full set of materials: Click the small card below to get it yourself

 

Guess you like

Origin blog.csdn.net/weixin_57794111/article/details/131738633