Hi, trying to launch adb but get: daemon not running. starting it now on port 5037 * daemon started successfully * error: device unauthorized. This adbd's $ADB_VENDOR_KEYS is not set; try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device. Tried every suggestion on other posts and none of them have worked ask Developer options > Revoke usb debugging authorization If that does not work, unplug phone, remove all allowed devices, plug phone back in.
adb kill-server
adb start-server
最近通過adb 遠程連接安卓手機
adb connect xxx(ip地址)后
adb devices 結果是手機 unauthorized的
找到網上的一段注釋如下:
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.
那么猜測原因是連接手機時一般會彈出是否信任該電腦調試,然后選擇是,就authorized了,但是樓主連電腦的時候沒彈出這個提示。
試圖通過進入手機終端刪除這個adb_keys時,沒有權限。估計是沒有root.![]()
撤銷USB調試權限,點擊之,一鍵清空所有已授權的電腦。那么刪除了之前想刪除的adb_keys。
之后再connect手機后,會彈出提示,是否信任該電腦調試,選擇是。
這樣設備就授權了。
具體原理可參見這篇文章:
http://blog.sina.com.cn/s/blog_79ba23780101sprh.html
#########################################################################################################################
Ubuntu連接安卓手機ADB unauthorized
錯誤:
error: device unauthorized.
This adbd's $ADB_VENDOR_KEYS is not set; try 'adb kill-server' if that seems wrong. Otherwise check for a confirmation dialog on your device.
原因:
一直無法完整認證,原因是之前電腦已經對該台設備認證了,可能由於該手機更換ROM而導致。
解決:
刪除當前的用戶目錄下的.android目錄即可
cd ~ sudo rm -rf ./.android
注: Window系統同樣適用
https://www.jianshu.com/p/ea9f430e3c95