Termux-ADB icon indicating copy to clipboard operation
Termux-ADB copied to clipboard

$ADB_VENDOR_KEYS is not set

Open CODeRUS opened this issue 5 years ago • 8 comments

$ adb shell
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.

CODeRUS avatar Feb 09 '20 11:02 CODeRUS

device is authorized for sure on the popup dialog

CODeRUS avatar Feb 09 '20 11:02 CODeRUS

Try restarting adb server (adb kill-server; adb start-server). If it won't work, try to revoke ADB authentications in developer settings. And if this also will give no result, try reinstalling ADB.

MasterDevX avatar Mar 22 '20 16:03 MasterDevX

$ adb shell
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.

piagzaa24 avatar Apr 23 '20 02:04 piagzaa24

This problem is not fatal to connecting devices. But if you want to eliminate the error, please enter the following in ~/.bashrc :

alias adb='ADB_VENDOR_KEYS=/data/data/com.termux/files/home/adbfiles/adbkey adb'

In addition, you should execute adb devices and adb connect <ip>:<port> before executing adb shell. You should not delete files under ~/adbkey.

By the way, I use adb to connect my phone to itself:

su -c 'setprop service.adb.tcp.port 5555' && su -c 'stop adbd' && su -c 'start adbd'
adb devices
adb connect 127.0.0.1:5555

sunshinewithmoonlight avatar Jun 21 '20 04:06 sunshinewithmoonlight

This problem is not fatal to connecting devices. But if you want to eliminate the error, please enter the following in ~/.bashrc :

alias adb='ADB_VENDOR_KEYS=/data/data/com.termux/files/home/adbfiles/adbkey adb'

In addition, you should execute adb devices and adb connect <ip>:<port> before executing adb shell. You should not delete files under ~/adbkey.

By the way, I use adb to connect my phone to itself:

su -c 'setprop service.adb.tcp.port 5555' && su -c 'stop adbd' && su -c 'start adbd'
adb devices
adb connect 127.0.0.1:5555

I am having a similar issue... the difference is that I can still connect as long as I confirm the "Authorize Debugging" dialog box that comes up. The problem is that it doesn't remember the device after authorizing it. I have to confirm the dialog box every time, unlike on my computer. The strange part is that the adbkey.pub key is correctly located in the /data/misc/adb/adb_keys file. In fact the key is duplicated in the adb_keys file dozens of times because of all the times I keep confirming the dialog box. Why does it keep asking me to authorize?

diabl0w avatar Jul 16 '20 05:07 diabl0w

I am having a similar issue... the difference is that I can still connect as long as I confirm the "Authorize Debugging" dialog box that comes up. The problem is that it doesn't remember the device after authorizing it. I have to confirm the dialog box every time, unlike on my computer. The strange part is that the adbkey.pub key is correctly located in the /data/misc/adb/adb_keys file. In fact the key is duplicated in the adb_keys file dozens of times because of all the times I keep confirming the dialog box. Why does it keep asking me to authorize?

I don't know why. It's the same with me.

sunshinewithmoonlight avatar Jul 17 '20 07:07 sunshinewithmoonlight

I am having a similar issue... the difference is that I can still connect as long as I confirm the "Authorize Debugging" dialog box that comes up. The problem is that it doesn't remember the device after authorizing it. I have to confirm the dialog box every time, unlike on my computer. The strange part is that the adbkey.pub key is correctly located in the /data/misc/adb/adb_keys file. In fact the key is duplicated in the adb_keys file dozens of times because of all the times I keep confirming the dialog box. Why does it keep asking me to authorize?

I don't know why. It's the same with me.

it's the same with me.

lavaed avatar Oct 10 '20 21:10 lavaed

I am having a similar issue... the difference is that I can still connect as long as I confirm the "Authorize Debugging" dialog box that comes up. The problem is that it doesn't remember the device after authorizing it. I have to confirm the dialog box every time, unlike on my computer. The strange part is that the adbkey.pub key is correctly located in the /data/misc/adb/adb_keys file. In fact the key is duplicated in the adb_keys file dozens of times because of all the times I keep confirming the dialog box. Why does it keep asking me to authorize?

I don't know why. It's the same with me.

Hi All, i'm facing the same problem. Every time i kill and start adb server or reboot a device, adb devices command or adb connect is asking me to authorize computer. Because of that, i cannot automatize my tests :-( Did anyone find a solution for that?

seba-plpl avatar Nov 18 '22 15:11 seba-plpl