6

I have several Android devices in a local network. (Android Set Top Boxes from Geniatech, running 4.2 Jelly-Bean) If these boxes have problems or need debugging, I simply connect to them via

adb connect ip-address

there I have full access to the (rooted) devices.

Unfortunately everybody in the network has this possibility. I understand that it is the responsibility of the network admin, to protect it against hackers and stuff, but I would like to add additional security. So my question is:

Can I somehow protect the adb-connection to the Android with a password? (or a Certificate or something) Or does anybody of you know alternatives?

ADB must remain open, so I can access the devices from the network, e.g. to directly make apk-updates, or read the logfiles.

Best regards

5
  • 1
    I've not really worked with ADB over TCP recently; but with Android 4.2+ on USB, any new computer trying to connect must be "approved" on first access ("trusted device"). Is that not the case for ADB via TCP? There are several ADB Tools offering kind of protection (e.g. turning ADB off when the screen is locked), but I've never heard of PIN/password protection in this context. Only thing I could think of then are firewall rules for the given port, blocking all connections except from "trusted devices".
    – Izzy
    Aug 13, 2015 at 8:57
  • Thank you. Unfortunately, this "approval-mechanism" is not working over TCP. I never approved anything and I can access the devices from every PC. The screens of those devices are always on, so no protection there ;) The firewall-idea sounds interesting, however.
    – Michael B
    Aug 13, 2015 at 9:21
  • 1
    For details on the firewall setup, if you have issues there, better ask at an SE site more specific to that then, as that's not an Android-specific issue :) Super User might be suited for that (but better check their /help/on-topic first). Firewall is probably the best approach in your case. And while directly asking for how to do that is off-topic here, be welcome to answer your own question with that solution then. Good luck!
    – Izzy
    Aug 13, 2015 at 9:27
  • Why are you using adb if you can already run an SSH server?
    – Firelord
    Aug 13, 2015 at 14:58
  • There are lots of adb commands which aren't adb shell
    – user28731
    Aug 17, 2015 at 7:26

2 Answers 2

1

As suggested by @Izzy I am going for the "firewall-solution":

Block all connections for the adb-port (5555), except from my trusted devices.

Thanks again!

0

although it's open in your lan, it is still adb. it's the same as over usb. you have to acknowledge every device which want to connect once before it can connect. if you think, there is a acknowledged device which should not be there, you could reset that list in developer settings.

1
  • you can also add a firewall blocking port 5555 and start both adb over tcp and an ssh server, then auth with a ssh key and tunnel 5555 to a local port eg 55555. then use adb connect localhost 55555 Aug 13, 2015 at 11:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .