0

I have an android device which is connected to a laptop via a usb connection.I need to get that laptop's mac address using an app which will be installed in the android device.

Can you suggest any ways to achieve this?Any help will be greatly appreciated.

My requirement is that i want to identify a pc machine using an android app.This app is in a device which is connected to that pc by a usb connection.when both device and laptop are connected, from time to time device needs to obtain the mac address of the connected laptop to distinguish it.

(As i found out so far, Adb,socket programming,etc is the way for this.)

5
  • What about simply using netcfg? Jun 19, 2017 at 11:31
  • Running the comand will show all the ip addresses and mac addresses on connected interfaces, simply use terminal Jun 19, 2017 at 19:30
  • thanks @xavier_fakerat for the information so by "using netcfg" did you mean i need to run it on the device ? so first i have to create sockets using adb, do port forwarding etc and issue the command "netcfg" using adb on server(device) ? can you give a help me on this? Jun 19, 2017 at 19:42
  • I think adb would be close to it, though when using android terminal you don't explicity use adb unless its on PC. My thinking is, when a device is connected android is able to identify these interfaces which will be up or active. For example the rmnet_usb0 and the commands shows all information of the connected device roght in terminal Jun 19, 2017 at 19:48
  • i tried netcfg command(using android terminal emulator) on the device, while it is connected with the pc which i wanted to obtain the mac address.but the device netcfg command does not list anything related to rmnet_usb0 or any usb related term.so it seems adb is the only way.. Jun 25, 2017 at 6:23

0

You must log in to answer this question.

Browse other questions tagged .