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
}