Community discussions

MikroTik App
 
dave12
newbie
Topic Author
Posts: 31
Joined: Sat Oct 09, 2021 2:35 pm

Access Android phone cell information or ADB on Mikrotik

Sun Nov 14, 2021 3:14 pm

Hi all.

I am interested how could be cell information accessed on an Android phone when connected to Mikrotik router?
Can it be accessed through ADB? If so, does Mikrotik support the ADB interface option, or manually commands should be sent to phone ip:port?

Thanks in advance!
 
sutrus
Frequent Visitor
Frequent Visitor
Posts: 58
Joined: Fri Jun 30, 2017 11:27 pm

Re: Access Android phone cell information or ADB on Mikrotik

Sun Nov 14, 2021 5:20 pm

Mikrotik, like any other router, has nothing to do with ADB.

ADB (Android Debug Bridge):
  • A client, which sends commands. The client runs on your development machine. You can invoke a client from a command-line terminal by issuing an adb command.
  • A daemon (adbd), which runs commands on a device. The daemon runs as a background process on each device.
  • A server, which manages communication between the client and the daemon. The server runs as a background process on your development machine.
 
dave12
newbie
Topic Author
Posts: 31
Joined: Sat Oct 09, 2021 2:35 pm

Re: Access Android phone cell information or ADB on Mikrotik

Sun Nov 14, 2021 6:00 pm

Sutrus I understand that Mikrotik has nothing to do with ADB.

When you connect a LTE USB modem to the Mikrotik router, you have special options, you can obtain the cell information, signal quality etc.

When you connect a Android phone, these options are hidden behind the Android's own router. So to access this extra information, ADB bridge should be used, because as far as I know there is no other way.

ADB server is already implemented in Python: https://github.com/google/python-adb

So it should be possible to implement it in a Mikrotik script.
 
sutrus
Frequent Visitor
Frequent Visitor
Posts: 58
Joined: Fri Jun 30, 2017 11:27 pm

Re: Access Android phone cell information or ADB on Mikrotik

Sun Nov 14, 2021 8:08 pm

OK, then I misunderstood the question :-)
For Android is supported only usb tethering interface.
See. https://wiki.mikrotik.com/wiki/Manual:P ... lar_modems
 
dave12
newbie
Topic Author
Posts: 31
Joined: Sat Oct 09, 2021 2:35 pm

Re: Access Android phone cell information or ADB on Mikrotik

Sun Nov 14, 2021 10:57 pm

Thanks Sutrus.

So there is no way to access cell info in RouterOS when an Android phone is attached by default.

This means that an ADB-like script should be written, to communicate with the phone_ip:5555 port, to extract information from behind the Android router.

Would this be theoretically possible?
 
dave12
newbie
Topic Author
Posts: 31
Joined: Sat Oct 09, 2021 2:35 pm

Re: Access Android phone cell information or ADB on Mikrotik

Mon Nov 29, 2021 4:46 pm

Ok, so it is possible to write a Mikrotik script, which communicates with the ADB daemon through phone_ip:5555, by using Traffic Generator to construct raw TCP packets, then implement the communication protocol https://github.com/cstyan/adbDocumentation

Who is online

Users browsing this forum: Amazon [Bot] and 26 guests