Android Shell Tricks: Using Mass Provisioning as an Example, Part 3
Say you have 400 devices to provision before deployment--how do you configure them all? And how can you guarantee that they’re all configured correctly? Automate it!
Note that changing these settings does not result in the respective functionality being enabled immediately; rather, the setting is stored and the change becomes effective upon reboot, at the latest.
There are lots of knobs; see Settings.java for a list of available settings. For some of the settings you’ll have to dig around in the source code in order to figure out what values to set.
Backup and Restore
Full backups are easy using adb:
Restoring from a full backup is easy too:
Another backup tool called rawbu only backs up the /data partition, which is often more appropriate for provisioning. Rawbu stops Android, backs up /data, and then restarts Android.
This is perfect for provisioning. First you configure one device with all the right settings, then backup /data with rawbu. Now you can use that backup as a template for preconfiguring any number of devices with a single command. For example:
Note that not all devices ship with rawbu installed. Also, read the usage for rawbu because it spells out some important restrictions regarding the backup path.
These are some of our favorite Android shell utilities, and there are many more besides. As you can see, the Android shell utilities can be quite powerful and useful. We would enjoy hearing from you on some of your favorites. Just tweet us at @sdgsys or on Google+. Need some help with your Android development? Our team of engineers has been working with Android since 2009. Please contact us to see how we can help.