Saturday, October 26, 2019

Part 3 - ADB keyvalue backups - Wifi and System settings

This is Part 3 of the continuing blog series on ADB keyvalue backups. Today we focus on Wifi settings and other system configuration available from-
They are backed up only if you specified the -keyvalue option and are available on non-rooted devices too.

This file follows the Key-Value Data format as outlined earlier in part 1. There are 8 different types of data seen here. The Key name represents the type of data and Value represents either a single structure or a set of name-value pairs (both name and value are strings). The table below shows the data seen here.

Key Name
settings about font sizes, screen brightness, hearing aids, haptic feedback among others
more system settings on gestures, button behaviors, spell checker, screensaver, accessibility, etc..
Boolean settings that enable/disable options like wifi wakeup,   auto_time, sounds enabled, call auto-retry, etc..
a locale string like ‘en-US’
owner info for display on screen if enabled
Access point settings for Mobile hotspot
xml data having wifi settings for connected access points

Perhaps the most interesting aspect here is the presence of wifi passwords (WPA pre-shared keys) in the wifi_new_config data as see in screenshot below. Yes, you can get wifi passwords from an adb backup now!

Figure 1 - Snippet of Wifi saved settings from showing SSIDs & passwords
Here is a python script to read and export the information to json files. Below you can see some of the data parsed by the this script for one of my test devices.

Figure 2 - Data from 'global' key
Figure 3 - Data from 'system' key

Figure 4 - Data from 'secure' key

Figure 5 - Data from 'softap_config' key
Figure 6 - Data from 'lock_settings' key

1 comment: