Monday, October 4, 2010

Network and DNS settings for Android

Use following command to set DNS server:

setprop net.dns1 xxx.xxx.xxx.xxx

Use following command to set gateway:

route add default gw 192.168.1.1 dev eth0

Building individual module in Android

Steps required to compile individual application package in Android SDK.

1. Go to build directory under Android sdk directory
suhas@ubuntu:~$ cd myandroid/build

2. Execute source source envsetup.sh
suhas@ubuntu:~/myandroid/build$ . ./envsetup.sh

3. Go to corresponding application directory
suhas@ubuntu:~/myandroid$ cd hardware/module
4. Issue mm command to build the application only

suhas@ubuntu:~/myandroid/hardware/module$ mm