Disable ADB over wifi

Hi, I have Vim3L device that needs to be installed in company network. It will show some content on screen, possibly video or images.

There is one problem however. Anyone that know IP address of device can connect through ADB and do pretty much anything. If I leave it open, there’s no question that some joker that will connect and do something unruly.

Android image is the one from Khadas, no USB developer options was turned on. I can connect over wifi right out of the box.

So how do I disable ADB over wifi? And only over wifi, usb debugging might be helpful to leave available.

Thanks

@Terry Maybe terry can help you about ADB

So I finally figured it out.

Vim3L have info about adb tcp port stored in file /vendor/build.prop.

To edit this file /vendor directory must be mounted writable.
mount -o rw,remount /vendor

Then edit build.prop file vi /vendor/build.prop and change value for option
service.adb.tcp.port to -1. Former value is 5555

New value: service.adb.tcp.port=-1

Then remount /vendor as read only mount -o ro,remount /vendor

And reboot device.

After that adb no longer connects to device through wifi but can connect through usb.

1 Like