今天在開發過程當中,須要鏈接海美迪的電視盒子,這個盒子是基於android6.0的版本,以前鏈接其它電視盒子都正常,當輸入 adb -s xxxx shell後,盒子鏈接失敗,日誌以下:android
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.shell
日誌顯示,未受權,第一反映是否是開發者選項未打開,經過查詢電視盒子的高級選擇後,果真發現未打開,關鍵是之前測試其它幾款電視盒子,都沒有手動去設置這個選項。測試
找到緣由,處理辦法就簡單了:日誌