12

I am currently with a problem to debug Android 6.0 over Wi-Fi. I followed the steps of this answer, however when I try the command adb shell netcfg I receive "/system/bin/sh: netcfg: not found". In addition, even the graphical option ADB over network in Developers Options Menu has disappeared.

I also, tried this post of Android's Issue because netcfg seems to be deprecated, and I got: WFSO timed out.

It works fine before I updated to Android 6.0.

Does someone knows another command or way to debug over Wi-Fi?

Thanks in advance


Solution

Use adb shell ifconfig <interface name> as the answer from Rilwan to find out the IP address of the device. Then use adb connect <ipaddress>to finally debug over Wi-Fi. The real problem was just the missing netcfg command.

Community
  • 1
  • 1
Marlos Damasceno
  • 367
  • 1
  • 5
  • 14

3 Answers3

18

From your question, if you tried this over wifi means- adb shell netcfg I receive "/system/bin/sh: netcfg: not found", adb over wifi is working fine. Only problem is netcfg binary is not there in Android 6.0. If you have any other previous version android, you can pull netcfg binary and push to 6.0 device.

If you just want to know ipaddress you can use adb shell ifconfig <interface name>

Rilwan
  • 2,251
  • 2
  • 19
  • 28
  • 2
    Nice tip Rilwan, thank you. I just got the IP address using `adb shell ifconfig` and I used `wlan0`as interface name (if no interface is used as parameter, all interfaces' details is showed). After that I just disconnected my device from the USB and used the command `adb connect ` as final step and it works. Thanks – Marlos Damasceno Mar 30 '16 at 03:24
  • Hello, how can I get which interface name to pass. – Dory Apr 07 '16 at 08:08
  • Hi @Dory, if you just use `adb shell ifconfig` without any interface name it will show all interfaces and generally it is the `wlan0` that you are interested. – Marlos Damasceno Apr 07 '16 at 19:51
  • What is an interface name? – Martin Erlic Oct 03 '16 at 18:23
  • 1
    interface name is name of your wlan interface. for example in my case it is `adb shell ifconfig wlan0` – Rilwan Oct 11 '16 at 12:53
5

If you are looking for IP address- your system and mobile are connected to the same network

Simply go to Settings -> About Phone -> Status

Here you will find the IP

WISHY
  • 11,067
  • 25
  • 105
  • 197
2

I use ADBWIFI plugin for android studio ADBWIFI .

I have not tested on Android 6.0 but give it a try.

Murli Prajapati
  • 8,833
  • 5
  • 38
  • 55
  • Hi Murali, I have tried this plugin either and still not working. When I took off the USB cable, I lost the Wi-Fi connection. It is supposed to work as you can see on this [issue](https://github.com/layerlre/ADBWIFI/issues/7). However, I am having troubles to keep the connection. – Marlos Damasceno Mar 29 '16 at 20:50