# Require Password (or encryption key) to ADB into VOXL2

Source: https://forum.modalai.com/topic/3058/require-password-or-encryption-key-to-adb-into-voxl2
Category: VOXL 2 and VOXL 2 Mini (https://forum.modalai.com/category/26/voxl-2-and-voxl-2-mini)
Tags: voxl-2
Posted: 2024-01-26 18:37:17 UTC by John Nomikos
Replies: 8 · Views: 2245

## John Nomikos · 2024-01-26 18:37:17 UTC

Good afternoon,

I was wondering if there was a built-in method to require the user to input a password or have a correct adb encryption key to ADB into the VOXL2.

I could not find documentation relating to this on ModalAI website, and a lot of advice online seems to be only applicable to android devices.

Is there an area on the VOXL2 where the adb server is hosted so I can tinker around with it? Or is the adb functionality baked into the firmware itself?

The goal is to make the system more secure by only allowing authorized users to adb in. 

If there is no way to require a password for adb on the VOXL2, is there a way to disable adb?

I have been able to change the ssh password which is nice.

Thank you,

John Nomikos.

## Reply by Moderator (ModalAI staff) · 2024-01-28 01:43:45 UTC

@John-Nomikos This might be helpful: https://android.stackexchange.com/questions/171934/storage-location-of-adb-keys/219320#219320

## Reply by John Nomikos · 2024-02-01 16:41:40 UTC (in reply to Moderator)

@Moderator 

Tried what that article suggested and did some research. I think adb encryption is not a feature on adb daemon for linux devices, and is only available on actual android devices. I could be wrong, but it appears that way. Could also be a feature on newer adb daemon.

Regardless, I think it might be possible for me to open up a USB port on an extension board for ssh. That way I could have password protected serial access while having adb disabled. Am I wrong in thinking this?

## Reply by Alex Kushleyev (ModalAI staff) · 2024-02-02 15:44:41 UTC (in reply to John Nomikos)

@John-Nomikos , yes this should work.

You can test temporarily disabling adb using the following command:
```
systemctl stop adbd
```
if you are running an adb session, you will get disconnected after running this command and no longer able to adb into the device. After reboot, the adb daemon will restart. In order to disable the adb daemon from autostarting at boot, you can run:

```
#WARNING: if you run this, adb connection will be disabled after reboot
#make sure you know how to re-enable it
#(via ssh connection or forcing fastboot and re-flash the board)
systemctl disable adbd
```
This will not stop the currently running adb server, but will prevent auto start after reboot

## Reply by John Nomikos · 2024-02-05 23:17:56 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev Thank you for the advice.

Since adbd is a static service (the usb service depends on it), it cannot be disabled through a systemctl disable.

I am going to take a look at other methods to disable it.

## Reply by Alex Kushleyev (ModalAI staff) · 2024-02-05 23:23:36 UTC (in reply to John Nomikos)

@John-Nomikos , do you mean that if you disable `adbd` then USB stops working? i did not check that.

## Reply by John Nomikos · 2024-02-05 23:24:02 UTC (in reply to John Nomikos)

I was able to "disable adb" by simply changing the name of the adbd executable to .adbd

## Reply by John Nomikos · 2024-02-05 23:27:53 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev I mean, since it is a static service, disabling it does not actually disable it. It appears to do nothing. Upon rebooting, adb still works

## Reply by Alex Kushleyev (ModalAI staff) · 2024-02-05 23:33:21 UTC (in reply to John Nomikos)

@John-Nomikos i see, yes, most likely due to:
```
/lib/systemd/system/multi-user.target.wants/adbd.service
```

That re-enables it after reboot..

Anyway, it looks like you found a workaround. Alternatively you could potentially remove that dependency from `multi-user.target.wants/` but i have not tested that
