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

14,873

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
Share:
14,873
JohnyTex
Author by

JohnyTex

Adrumdrum.

Updated on June 04, 2022

Comments

  • JohnyTex
    JohnyTex almost 2 years

    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...

  • Kevin Boos
    Kevin Boos over 9 years
    FYI, I had to disconnect from any Wi-Fi network and then delete the current ip addr listing before adding it again. (This was on Google Glass, dunno about other devices.) You can use ip addr help to find out more info about that command.