Which files are responsible for Wi-Fi on Android: A complete guide to system configurations

If you've ever tried to manually configure a Wi-Fi connection on an Android device or troubleshoot network issues, you've likely encountered the limitations of the standard interface. Most users aren't even aware that a whole set of system files, from configuration files to settings, are responsible for wireless network operation on a smartphone. wpa_supplicant to the logs DHCP client and kernel parameters. These files store passwords, network priorities, security settings, and even connection history.

In this article, we will take a detailed look at where exactly the key Wi-Fi files are located on Android, what each of them is responsible for, and how you can edit them (if you have root-access). You'll learn how to manually add a network, change connection priority, or diagnose problems using logs—without using the standard settings menu. Important: Incorrectly editing system files can result in loss of network connectivity or even bricking of the device if critical kernel parameters are affected.

This material will be useful for both experienced users and developers who want to understand the low-level operation of Wi-Fi on Android. We won't cover basic settings via the graphical interface; instead, we'll focus exclusively on the system's internal workings.

📊 How do you usually set up Wi-Fi on Android?
Through the standard settings menu
I use ADB commands
I edit system files manually
I use third-party applications (for example, WiFi Analyzer)
I don't need to configure anything; everything works out of the box.

1. Main configuration file: /data/misc/wifi/WifiConfigStore.xml

This is the main file where Android stores information about all saved Wi-Fi networks, including SSID, passwords, security types, and connection priorities. Before version Android 10 this file was called wpa_supplicant.conf, but in modern firmware it was replaced by XML format.

File WifiConfigStore.xml contains:

  • 📡 Network SSIDs (access point names) in encrypted or open form;
  • 🔑 Passwords (in encrypted format if the device is not rooted);
  • 🛡️ Types of security (WPA2-PSK, WPA3, Open Network, etc.);
  • 📊 Connection priorities (which network will be selected first if there are several);
  • Additional options, such as hiddenSSID (for hidden networks) or autoJoinEnabled.

To view the contents of the file, you will need root-access or ADB with superuser rights. Commands for extraction:

adb shell

su

cat /data/misc/wifi/WifiConfigStore.xml

⚠️ Attention: In some firmware (for example, on devices Samsung or Xiaomi) the path to the file may differ. MIUI Configurations are sometimes stored in /data/misc/wifi/WifiConfigStoreSoftAp.xml for access point mode.

If you want to manually add a network, you can edit this file, but remember: after making changes, you must restart the Wi-Fi service with the command:

svc wifi disable

svc wifi enable

2. File wpa_supplicant.conf: outdated, but still relevant

On devices with Android 9 and older (as well as on some custom firmware), the main Wi-Fi settings can be stored in a traditional file /data/misc/wifi/wpa_supplicant.conf. This file uses a syntax similar to Linux-systems, and it is easier to edit manually.

Example content:

network={

ssid="MyWiFi"

psk="mypassword123"

key_mgmt=WPA-PSK

priority=1

}

Where:

  • 🔄 priority — network priority (the higher the number, the sooner Android will try to connect);
  • 🔐 key_mgmt — authentication method (WPA-PSK, WPA-EAP, NONE for open networks);
  • 📶 scan_ssid=1 — parameter for hidden networks (if the SSID is not broadcast).

To apply the changes, restart the service:

stop wpa_supplicant

start wpa_supplicant

⚠️ Attention: On some devices (eg. Pixel With Android 12+) file wpa_supplicant.conf may be a symbolic link to WifiConfigStore.xmlCheck this with the command ls -l /data/misc/wifi/.

☑️ Checking the wpa_supplicant.conf file

Completed: 0 / 5

3. Wi-Fi logs: /data/misc/wifi/logs/ And dmesg

If your device isn't connecting to Wi-Fi, it's helpful to examine the system logs. Android maintains several types of logs related to wireless networks:

File/command What does it contain? How to view
/data/misc/wifi/logs/wifi.log Detailed connection logs, authentication errors, and state changes cat /data/misc/wifi/logs/wifi.log
dmesg | grep wifi Kernel messages about loading Wi-Fi drivers, hardware errors Execute in ADB shell
logcat -b radio | grep Wifi Radio module logs (including network scanning) adb logcat -b radio
/data/misc/dhcpcd/ Logs DHCP client (getting an IP address) ls /data/misc/dhcpcd/

An example of a typical mistake in wifi.log:

WifiConfigManager: Failed to connect to network "CafeWiFi" (SSID not found in scan results)

This means that the network CafeWiFi not detected during scanning - it may be hidden or out of coverage area.

To diagnose problems with DHCP (for example, if the device does not receive an IP address), check the files in /data/misc/dhcpcd/. Leases (IP leases) and errors like:

dhcpcd: timed out waiting for a valid DHCP server response

4. Driver and kernel module files: /vendor/ And /system/

Drivers located in system partitions are responsible for the low-level operation of the Wi-Fi adapter. /vendor/ And /system/These files rarely require manual intervention, but are useful to know for diagnostic purposes:

  • 🖥️ /vendor/firmware/ — firmware for Wi-Fi/Bluetooth chips (for example, WCNSS_qcom_wlan_nv.bin For Qualcomm);
  • 🔧 /vendor/lib/modules/ - kernel modules (for example, wlan.ko);
  • 📄 /system/etc/wifi/ — configurations for specific chipsets (for example, ti_connectivity.ini For Texas Instruments).

If Wi-Fi stops working after a firmware update, the problem may be driver incompatibility. For example, on devices with a chipset Mediatek Sometimes you need to manually copy files from /vendor/firmware/ after reset.

To find out which chipset your device uses, run:

adb shell getprop ro.boot.hardware

adb shell getprop ro.chipname

⚠️ Attention: Deleting or replacing files in /vendor/ may cause Wi-Fi/Bluetooth to completely stop working. These sections are often protected dm-verity, and changing them without disabling the check will lead to a bootloop.

5. Hostspot (access point) settings: SoftApConfigStore.xml

If you use the function Modem mode (Wi-Fi distribution from a phone), its settings are stored in a separate file:

/data/misc/wifi/SoftApConfigStore.xml

Here you can find:

  • 📛 Access point name (SSID);
  • 🔐 Password (passphrase);
  • 📡 Channel (channel) and standard (802.11a/b/g/n/ac);
  • 🔄 Maximum number of connected devices (maxClients).

Example content:

<SoftApConfiguration>

<SSID>MyHotspot</SSID>

<passphrase>password123</passphrase>

<channel>6</channel>

<band>2</band>

<maxClients>8</maxClients>

</SoftApConfiguration>

If you want to change the channel or standard (for example, from 2.4 GHz on 5 GHz), edit this file and restart hostspot:

svc wifi disable

svc wifi enable

setprop sys.usb.config rndis,diag,adb

How do I reset my hostspot to factory settings?

Delete the file /data/misc/wifi/SoftApConfigStore.xml and reboot your device. After this, the access point name and password will be reset to their default values ​​(usually the device model and a random password).

6. Cache files and temporary data: /data/misc/wifi/WifiStateTracker.xml

Android stores temporary Wi-Fi status data in a file WifiStateTracker.xmlThe following are recorded here:

  • 🔄 Last connected device;
  • ⚡ Signal level (RSSI);
  • 📡 Current frequency (frequency);
  • ⏱️ Last connection/disconnection time.

This file is useful for diagnosing issues with frequent connection drops. For example, if you see an entry like this:

<DisconnectEvent>

<reason>DEAUTH_LEAVING</reason>

<BSSID>00:11:22:33:44:55</BSSID>

</DisconnectEvent>

- this means that the device was disabled by the router (possibly due to an incorrect password or MAC address blocking).

Clearing this file can help if your Wi-Fi is stuck in a strange state (for example, constantly trying to connect to a non-existent network). To reset:

rm /data/misc/wifi/WifiStateTracker.xml

svc wifi disable

svc wifi enable

7. How to backup and restore Wi-Fi settings

If you plan to reset your device or flash a custom firmware, it's helpful to save your current Wi-Fi settings. To do this:

  1. Copy all files from /data/misc/wifi/ to the computer:
    adb pull /data/misc/wifi/ ~/wifi_backup/
  2. After resetting or flashing, return the files back:
    adb push ~/wifi_backup/ /data/misc/wifi/
    

    adb shell chmod -R 660 /data/misc/wifi/

    adb shell chown -R system:wifi /data/misc/wifi/

  3. Restart your device.

If you use TWRP or another custom recovery, you can create a backup copy of the partition /data entirely - this will save all settings, including Wi-Fi.

⚠️ Attention: Restoring settings to a different device or firmware may cause conflicts (for example, if the Wi-Fi chipset is different). In this case, it's best to manually transfer only the settings. WifiConfigStore.xml.

8. Problems and solutions: common errors when working with Wi-Fi files

When manually editing Wi-Fi files, users often encounter typical problems:

Problem Possible cause Solution
Wi-Fi won't turn on after editing files Syntax error WifiConfigStore.xml or wpa_supplicant.conf Restore a backup or check the file for XML validity
The device does not see networks after updating the firmware. Drivers are missing in /vendor/firmware/ Copy the firmware files from the old version or reflash the device completely
Constant connection breaks Incorrect settings roaming or RSSI V WifiStateTracker.xml Reset the file or change the setting roamThreshold manually
The hostspot (access point) is not working. Error in SoftApConfigStore.xml or channel conflict Check the logs logcat | grep SoftAp and change the channel in the settings

If Wi-Fi stops working completely after making changes, try resetting the network settings through the menu. Settings → System → Reset → Reset Wi-Fi, mobile network, and Bluetooth settingsThis will delete all saved networks, but will restore functionality.

To diagnose complex problems, use a combination of commands:

adb shell dumpsys wifi

adb shell dumpsys connectivity

This will display a complete report on the status of your Wi-Fi and network connections.

FAQ: Frequently asked questions about Wi-Fi files on Android

Is it possible to view Wi-Fi passwords without root access?

No, without root or ADB It is impossible to read passwords from system files with superuser rights. Standard password viewing applications (for example, WiFi Password Viewer) require root access. An alternative is to use the "Share Password" feature in the Wi-Fi settings (available at Android 10+).

Why after editing wpa_supplicant.conf changes are not applied?

Possible reasons:

  1. The file has incorrect permissions (should be 660 and the owner system:wifi);
  2. Syntax error in file (missing bracket or quotation mark);
  3. Service wpa_supplicant was not restarted (use svc wifi disable && svc wifi enable).
Where are Wi-Fi settings stored on devices with Android 13+?

Starting from Android 13Google has tightened its control over system files. Now:

  • WifiConfigStore.xml can be encrypted;
  • Access to /data/misc/wifi/ limited even for root (requires disabling SELinux);
  • Some settings have been moved to /data/vendor/wifi/.

To work with these files you may need Magisk with module SQLite for Root or specialized utilities like WiFi Analyzer (but they don't give full access).

How do I reset all Wi-Fi settings to factory defaults?

There are two ways:

  1. Via the settings menu: Settings → System → Reset → Reset Wi-Fi, mobile networks, and Bluetooth;
  2. Manually (required) root):
    rm -rf /data/misc/wifi/*
    

    reboot

After resetting, all saved networks and passwords will be deleted.

Is it possible to transfer Wi-Fi settings from one Android device to another?

In theory, yes, but in practice this often leads to problems due to:

  • Different Wi-Fi chipsets (eg. Qualcomm vs Mediatek);
  • Different versions wpa_supplicant;
  • Encrypted passwords (they are tied to a specific device).

It is better to transfer only SSID and passwords manually, without copying binary files.