Search code examples
androidstaticipadb

How I change static IP address using Android Debug Bridge (ADB)?


From Android Debug Bridge (ADB), how can I change the static IP address of the device? I am on Android 4.01 and can't find a setting for it in settings...


Solution

  • For example:
    adb shell
    ip addr add 192.168.3.162/24 dev eth1

    netcfg is also useful to display the configuration

    Persistent IP addresses are stored in the mysql database:

    /data/data/com.android.providers.settings/databases/settings.db