Android solves phone unauthorized error

Source: Internet
Author: User

Transferred from: http://blog.csdn.net/quicksand201/article/details/19190821

Phone developer Options USB debugging is turned on, enter ADB devices under PC command line, show phone not certified

D:\DEVELOP\ANDROIDROOT\ADT-BUNDLE-WINDOWS-X86-20131030\SDK\PLATFORM-TOOLS>ADB devices
* Daemon not running. Starting it now on Port 5037 *
* Daemon started successfully *
List of devices attached
42f7f2230e4cafe7 Unauthorized

Online Search a lap, after tossing, what ADB kill-server/start-server, re-switch USB debugging, recall the USB error-free authorization, even the pit dad's heavy brush mobile phone system have tried, also did not fix.

No way, toss the ADB source code to go, look here

Https://android.googlesource.com/platform/system/core/+/d5fcafaf41f8ec90986c813f75ec78402096af2d

Source did not see, first saw a large section of English, English level general, directly moved the original text:

Adb:add public key authentificationsecure ADB using-a public key authentication-to-Allow USB debuggingonly from Authoriz Ed hosts. When a device was connected to an unauthorized host, the ADB daemon sendsthe user public key to the device. A popup is shown to ask the user Toallow debugging once or permanantly from the host. The public key is isinstalled on the device in the later case. Other keys is Installedat build time. On the host, the user public/private key pair are automatically generated,if it does not exist, when the ADB daemon starts and is stored In$home/.android/adb_key (. pub) or in $ANDROID _sdk_home on Windows. If needed,the Adb_keys_path env variable May is set to a:-separated (; underwindows) List of private KEYS, e.g. company-w IDE or vendor keys. On the device, vendors public keys is installed at build time In/adb_keys. user-installed keys is stored In/data/misc/adb/adb_keys. ADB Protocol Change:if The device needs to authenticate the host, it replies-Cnxnpackets withAn AUTH packet. The AUTH packet payload is a random token. The host signs the token with one of their private keys and sends an AUTH (0) packet. If The signature verification succeeds, the device replies witha CNXN Packet. Otherwise, it sends a new AUTH packet with a new token sothat the host can retry with another private key. Once the host has triedall it keys and it can send an AUTH (1) packet with a public key aspayload. ADBD then sends the public key to the framework (if it had beenstarted) for confirmation.

View Android_sdk_home on your computer's win7 system, command line Echo%andriod_sdk_home%

God, point to a nonexistent directory, which rogue software is dry

Remove the andriod_sdk_home from the computer environment variable, re-run ADB devices, the authorization prompt appears on the phone, and the problem is resolved.

D:\DEVELOP\ANDROIDROOT\ADT-BUNDLE-WINDOWS-X86-20131030\SDK\PLATFORM-TOOLS>ADB devices
List of devices attached
42f7f2230e4cafe7 Device

Android solves phone unauthorized error

Related Article

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.