We used to configure our Android devices' Wi-Fi radios into ad-hoc mode by using iwconfig, which works with drivers that support WEXT.

Android 4.0 (Ice Cream Sandwich) smartphones are now commonly using the bcmdhd driver for Broadcom Wi-Fi chipsets (which also do Bluetooth, FM radio, Nike+, all in one chip). The bcmdhd driver is not compiled with WEXT by default, so we can't use iwconfig to configure out wlan interfaces.

Thus, to get ad-hoc working on Android phones using the bcmdhd driver, you need to use the new libnl / cfg80211 way of configuring your wireless interfaces.

Related reading: http://forum.xda-developers.com/showthread.php?t=1692236

http://github.com/idor/libnl

http://github.com/idor/iw

http://www.onlyxool.net/porting-iw-tools-to-android/

https://android.googlesource.com/platform/hardware/broadcom/wlan/+/master

http://bcmon.blogspot.com/2012/09/working-monitor-mode-on-nexus-one.html