Connect android phones through adhoc wifi network I want to connect my android phones (two Galaxy s2 and two nexus1 phones) in adhoc mode through wifi connection. Something like peer to peer network so that I can transfer messages with mobiles in my adhoc through wi-fi connection.

Does android support creating an adhoc connection?
There is no such thing on Android's menus, but since Android is Linux based you can run a few commands on ADB in order to do that (phones must be rooted though).

if you have some knowledge with Linux command line you may know ifconfig and iwconfig:

ifconfig wlan0 up
iwconfig mode auto;iwconfig wlan0 essid "your SSID" channel 11 mode auto
ifconfig wlan0 10.0.0.x netmask 255.255.255.0


Where your SSID should be replaced with the name of your Adhoc network, and 10.0.0.x is a different IP you give each device.