Add functionality to dump/restore current wifi connection
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
phablet-tools (Ubuntu) |
Fix Released
|
Wishlist
|
Martin Pitt |
Bug Description
For running tests on the device it should be reset to a known pristine state before each test, to avoid tests influencing each other. For that, autopkgtest's adb setup script currently saves the network connections, resets to factory state, and restores the network connections:
echo "Performing factory reset, this will take a minute..." >&2
# save current network connections
local network_
adb $ADBOPTS shell tar cPpf /run/netconf.tar /etc/NetworkMan
adb $ADBOPTS pull /run/netconf.tar $network_tar
# reset to factory state
adb $ADBOPTS shell 'echo format data > /cache/
adb $ADBOPTS reboot recovery
adb $ADBOPTS wait-for-device
# restore network connections
adb $ADBOPTS push $network_tar /run/netconf.tar
adb $ADBOPTS shell 'tar xPpf /run/netconf.tar && rm /run/netconf.tar'
Doing that is a lot faster than having to re-flash the device from scratch every time. It allows us to manually set up a device once (i. e. pick network and type passphrase), and then just use it noninteractively.
It would be good to move this to phablet-tools, which is a more appropriate place as it contains all the other phone specific knowledge.
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Ubuntu Phablet Team: Pending requested
-
Diff: 106 lines (+84/-0)1 file modifiedphablet-config (+84/-0)
Should this become a new phablet- factory- reset tool, or be integrated into phablet-config, or something else?