본문 바로가기

IT/Mobile

adb shell 명령 시, adb.exe: device unauthorized.

문제

개발자 옵션에서 USB 디버깅이 ON 되어 있는데 adb shell 명령 시, 다음과 같이 에러가 나는 경우. 

C:\scrcpy>adb shell
adb.exe: 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.

 

해결

상황 방법
기기는 인식되나, RSA 지문인식 창이 표시되지 않는 경우 - 과거에 디버깅 모드로 연결한 적이 있고 해당 PC의 RSA 키 기억에 체크를 했음에도 연결이 안되는 경우가 있다. 이 때는 개발자 옵션 > USB 디버깅 권한 승인 취소 후, 다시 연결하면 된다.

 

정상 연결된 경우

C:\scrcpy>adb shell
q2q:/ $