Search code examples
androidandroid-source

AOSP - Adding Default Wifi SSID


I am building my fork of AOSP (Android Open Source Project).

I am trying to figure out how to add Wifi Configuration to the build. So once I flash onto a device that it already has the SSID/WEP Key set.

I've looked in the default configuration here:

/frameworks/base/packages/SettingsProvider/res/values/defaults.xml 
/frameworks/base/core/res/res/values/config.xml

But I cannot find anything related to Wifi SSID/Key.


Solution

  • Just FYI. If you are doing AOSP images and wanna add preinstalled accesspoints. search wpa_supplicant-overlay.conf file (normally under /data/misc/wifi/) and add network information there. Then roll out the images. Tested with Marshmallow.

    Example
    network={
        ssid="test_wlan1"
        psk="test_key1"
        key_mgmt=WPA-PSK
        priority=1
    }
    
    network={
        ssid="test_wlan2"
        psk="test_key2"
        key_mgmt=WPA-PSK
        priority=2
    }