ADB Android Device Unauthorized
It's likely that the device is no longer authorized on ADB for whatever reason.
1. Check if authorized:
<ANDROID_SDK_HOME>\platform-tools>adb devices
List of devices attached
4df798d76f98cf6d unauthorized
2. Revoke USB Debugging on phone
If the device is shown as unauthorized, go to the developer options on the phone and click "Revoke USB debugging authorization" (tested with JellyBean & Samsung GalaxyIII).
3. Restart ADB Server:
Then restarted adb server
adb kill-server
adb start-server
4. Reconnect the device
The device will ask if you are agree to connect the computer id.
You need to confirm it.
5. Now Check the device
It is now authorized!
adb devices
<ANDROID_SDK_HOME>\platform-tools>adb devices
List of devices attached
4df798d76f98cf6d device
How to solve ADB device unauthorized in Android ADB host device?
Get the public key from the client phone (adb host)
cat /data/.android/adbkey.pub
copy the above public key to the target phone's
/data/misc/adb/adb_keys
location. (you may need to stop the adb daemon first withstop adbd
)cat /data/misc/adb/adb_keys
verify both cat
outputs match.
try restarting adb daemon on target start adbd
or just reboot them.
If you are having problems reading or writing to ADB KEYS in above steps, try setting environment variable ADB_KEYS_PATH
with a temporary path (eg: /data/local/tmp
). Refer to that link it goes into more details
"On the host, the user public/private key pair is 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 be set to a :-separated (; under
Windows) list of private keys, e.g. company-wide or vendor keys.
On the device, vendors public keys are installed at build time in
/adb_keys. User-installed keys are stored in /data/misc/adb/adb_keys"
Android ADB devices unauthorized
Thankgod xda developers exist : http://forum.xda-developers.com/verizon-lg-g3/help/unable-to-access-adb-t2830087
Just had to delete adbkey file in C:Users/$Name/.android adbkey.pub was missing.
Restart after this and both files are there.
If this does not work :
- Try Revoke USB DEBUGGING Authorization.
- Enable USB debugging again.
Android 8.0 adb device keeps unauthorized after authorisation
If you're using Windows follow these steps, after i tried every solution and almost gave up i found the following and it worked.
- First things first:
- Phone: Check if you have a file called adb_keys located at: /data/misc/adb/adb_keys. If you have it, i would recommend you to backup the file. (I didn't have it.)
Windows: You'll need to have a file called adbkey.pub located at C:/users/UserAccount/.android/
Boot into recovery mode.
- Plug your phone into PC.
Open cmd and run
adb devices
. It would show "recovery" instead "unauthorized".Create a new file called adb_keys file on your PC:
type NUL > adb_keys
Now you need to copy the contents from the adbkey.pub to adb_keys, the new file you just created:
adbkey.pub is located at C:/users/UserAccount/.android/
(Needless to say you need to replace "UserAccount" when running the command)type c:\users\UserAccount\.android\adbkey.pub > adb_keys
Upload the adb_keys file to your phone:
adb push adb_keys /data/misc/adb/adb_keys
Reboot and run adb devices. It should be working now.
Thank mnoguti from this post on XDA-Developers for this answer.
If you have Linux that's the same solution with Unix commands.
Android adb device unauthorized
Okay, yeah its Kali issues..
Supposed workaround is here:
https://github.com/offensive-security/kali-nethunter/issues/341
Last message is probably the bet workaround to try first..if you do not have a 2nd real device use an emulator and follow the same directions
emulator-5554 unauthorized for adb devices
I got my mac system to deploy a react-native build to my physical phone by following Edit 2 in the question.
I got my mac system to deploy a react-native build to my emulator by following Edit 3 in the question.
I think the issue was generally caused by moving my project from a Windows dev area to Mac dev area. Then probably a combination of different issues happened that cause builds to fail for each situation.
Related Topics
How to Run Code on a Background Thread on Android
Ionic Build Android | Error: No Installed Build Tools Found. Please Install the Android Build Tools
Check If Correct Google Play Service Available: "Unfortunately Application Has Stopped Working"
Fragmentcontainerview Using Findnavcontroller
How to Keep My Android Service Running When the Screen Is Turned Off
Change Image of Imageview Programmatically in Android
Spinner Does Not Wrap Text -- Is This an Android Bug
Android: Resize Only Parts of View with Soft Keyboard on Screen
Android Adb Devices Unauthorized
Retaining Position in Listview After Calling Notifydatasetchanged
Android Volley - How to Isolate Requests in Another Class
Androidx:Appcompat I:Art Error Android.View.View$Onunhandledkeyeventlistener
Move Markers in Google Map V2 Android
How to Check If an Intent Can Be Handled from Some Activity
Android How to Apply Mask on Imageview
How to Create Preference Activity and Preference Fragment on Android