It’s actually pretty disgusting and common. Baidu on a lot of simple tutorials are called you, Android phone link computer, and then open the developer options on the phone, open the debugging switch, and then will pop up a pop-up window whether to allow this computer link, select yes after. Adb Devices on your computer, you can see the device.

But in practice, we often have all kinds of abnormal conditions. I will use simple words to tell you how to deal with this problem step by step, what is the reason ~

Windows is also a truth, but directories and so on different.

Case 1:

Performance:

  1. The phone is already connected to the MAC by cable
  2. There is no play dialog box prompt on the mobile phone whether uniformly allow…. This dialog
  3. The device is not available under ADB Devices

Solution:

1. When you find the usb connection option on your phone, check whether you choose charging only. This should be changed to file transfer mode.

2. You can check whether the device can be seen in the device linked by the computer.

                       system_profiler SPUSBDataType

If you see an Android copy its Vendor ID and write the Vendor ID value to the /User/ your username /.android/adb_usb.ini file. If the file does not exist, create a new one.

(Photo credit network)

Restart adb service:

                                            adb kill-server

                                            adb start-server

The tutorial: blog.csdn.net/timeve/arti…

 

Of course, if you can’t see the Android, you don’t have to think about it, and quickly change a data line! Try more. This is 99% data cable problems. Basically, after you change to a better data line, ADB Devices directly normal. And that whole “all permission” popover. Don’t say that the data line clearly used yesterday, today is broken this kind of words, yes, it is such a coincidence.

 

Situation 2:

Symptom: THE DEVICE is displayed on ADB Devices, but the status is not online for the device, but is unauthorized

 

Solution: This condition is an unauthorized offline state. Just authorize it.

But how to authorize? In fact, the normal situation is that when you plug in this mobile phone for the first time, the mobile phone will display the uniform permission dialog box. If you agree, it will be authorized. But this situation is disgusting disgusting, mobile phone does not play this dialog box, you can not go to authorize.

Baidu many tutorials are to let you re-open the mobile phone debugging mode, and then play the dialog box to be allowed. This is the “f * * k p”, anyone who can search this question has stopped playing the dialog box.

The solution is very simple. It depends on two configuration files (public and private keys) on the computer. If the configuration file has written the authorization record of this phone before, it will never play again. Even though the authorization failed, ADB Devices kept saying it was not authorized. So we just have to

  1. Turn off ADB: ADB kill-server
  2. Unplug the phone
  3. Find and delete the two configuration files (one is /Users/ your username /.android/adbkey and the other is /Users/ your username /.android/adbkey.pub)
  4. Start ADB: ADB start-server
  5. Insert phone

 

After this operation, 99% of the phone will pop up the valuable all permission dialog box. Check it and confirm, then ADB Devices will definitely work.