I'm interested in knowing how to set the first wifi on android things (not android phone) without access to a network cable, for a fresh install.
There certainly must be a way to put the information in the SD card right after copying the OS image. If that can't be done directly, worst case scenario I would expect it should be possible to write a script and copy it somewhere into some of the partitions and have it automatically run at boot (which can be handy for other things). Unless the image is signed?
I would also be ok by writing an app that could be copied to SD card before first boot that would be auto-installed and do that thing for me. I would know how to write the app, but so far I don't know how to do the copy/autoinstall/autorun thing.
I would also be ok having one device connect to network and configure wifi, then clone its SD card into another one.
What really gets in my way is having to get a network cable every time I prepare a new SD card.
You should be able to add your wifi configuration at the end of /data/misc/wifi/wpa_supplicant.conf
.
network={
ssid="SSID"
key_mgmt=WPA-PSK
psk="PASSPHRASE"
}
This should be located on the data
(ext4) partition of the sdcard (for me /dev/sdb15
)
You can use:
adb connect Android.local
to connect to Android Things PC (Raspberry PI3) and then just set up your WiFi like described in Android Things tutorial:
$ adb shell am startservice \
-n com.google.wifisetup/.WifiSetupService \
-a WifiSetupService.Connect \
-e ssid <Network_SSID> \
-e passphrase <Network_Passcode>
https://developer.android.com/things/hardware/raspberrypi.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With