Unanthorized issues when using adb

Source: Internet
Author: User

Unanthorized issues when using adb

ADB devices a unanthorized issue when ADB starts up.

    1. Check if USB debugging is turned on.
    2. Reseat the USB cable for an authorization prompt
    3. Restart adb:adb kill-server and adb start-server
    4. If none of the above methods are possible, use the following steps
  1. Delete Adbkey and adbkey.pub under C:\Users\wangbaoqun1\.android

  2. Turn off USB debugging

  3. Reopen a DOS command window and enter the ADB

  4. First adb kill-server turn off adb driver, then enter ADB start-server to open ADB service

  5. Plug in the USB cable, turn on USB debugging, appear in slices, only the second picture in the serial number, ADB can be paired successfully. Click OK, the public key pairing succeeds, as long as the second picture appears, regardless of pairing, local C:\Users\wangbaoqun1\.android will appear new two files Adbkey and adbkey.pub

  6. Enter ADB devices, open the ADB service successfully,
    1. Solution principle:

It turns out that when we start the Adb.exe process on the window computer, ADB generates a bunch of adbkey (private keys) and adbkey.pub (public key) locally; "The computer's RSA key fingerprint is:xxxx" according to the box , you can see that the key is a pair of RSA algorithms, where the public key is used to send to the phone, and when the "adb shell" is executed, Adb.exe will send the current PC PC's public key (or public key) hash value (fingerprint) to the Android device, this is, if Android has saved the public key of this PC, then match the corresponding public key to authenticate, establish ADB connection; If the p is not saved on Android C's public key, you will be prompted to confirm whether the machine is allowed to connect to ADB, and when you click Allow Authorization, Android will save the PC's Adbkey.pub (public key);

    1. Storage locations for Adbkey and Adbkey.pub,

      For the window System , when we first start Adb.exe, a ". Android" directory is generated in the directory of the current user of the C drive, Where Adbkey and adbkey.pub are in this directory, (Adb.exe will read the two files at startup (if no build is regenerated), so if you delete or modify the two files, you must close the Adb.exe process, restart before it takes effect);

      Second, on the Android system, the PC's public key is saved in a file "/data/misc/adb/adb_keys";

Unanthorized issues when using adb

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.