Android: Wifi unable to obtain IP (Part 2)

by on under Technical
1 minute read

In one of my previous posts I suggested to use a static IP for Wifi networks, when DHCP is failing. This is not always possible, especially if one logs on to public networks. After further research it was found, that the problem is most likely caused by an incorrect handling of DHCP leases.

This problem may be related to a bug in the Android’s DHCP software, which was found at Princeton University (see here).

To temporarily fix the issue, execute the following commands in the terminal emulator as root. Most probably it will suffice to call only the first line.

dhcpcd --rebind wlan0
rm /data/misc/dhcp/*.lease

On a sidenote: This problem occurred on the smultron phone with CyanogenMod 9.1.

Android, CyanogenMod