Where are IP addresses stored on an Android device? In what location on disk, or otherwise; how are they stored?
Asked
Active
Viewed 2,964 times
1
-
try this forum: http://android.stackexchange.com/ – Pozzo Apps Jul 17 '14 at 13:09
-
The user of your device can set a static ip for every wifi connection in the settings. – greenapps Jul 17 '14 at 17:42
-
On my device it is not possible to set a static IP in the settings. – JohnyTex Jul 17 '14 at 18:06
3 Answers
1
For statically configured networks (i.e., not DHCP which doesn't store), addresses are stored in /data/misc/wifi/ipconfig.txt
, managed by WifiConfigStore
class. This is not a public API and is only used from class WifiStateMachine
. However, you can find out the format of this file by viewing the source: WifiConfigStore.java.

Paul Ratazzi
- 6,289
- 3
- 38
- 50
0
Because Android is based on a Linux System, the IPs are stored inside the system. So it's the same way like in Linux ( keyword: ifconifg )
But you can get the IP like shown here: IP details
-
I want to set a static persistent IP for my device. Where is the config file for that located then? Can't find anything. – JohnyTex Jul 17 '14 at 13:14
-
Can I configure a persistent static IP address for a specific interface using setprop? – JohnyTex Jul 17 '14 at 13:27
-
0
IP addresses on Android are normally stored as an entry in: /data/data/com.android.providers.settings/databases/settings.db
sqlite database.

JohnyTex
- 3,323
- 5
- 29
- 52