Android Oreo Receives Noticeable ADB Backup Enhancements

Android Oreo Receives Noticeable ADB Backup Enhancements

Depending on who you ask, you might hear that the Android Debug Bridge‘s Backup feature is a godsend. This feature, introduced in Ice Cream Sandwich, allows you to do a full backup of your device without using root or other applications, simply by using adb. However, this tool did have some limitations, which gave the edge to other apps like Titanium Backup. Android Oreo aims to fix some of those flaws in order to make it a better, more reliable tool. And as such, the new Android version received some much-needed enhancements for adb backup and adb restore.

Backup Timeout Increased

Before Android Oreo, shared storage (/sdcard contents) backups used a timeout of 5 minutes, while restores used a timeout of 1 minute. This meant that a backup/restore would always time out if any big file was on sdcard, for example, long videos. And an even lower restore timeout meant that even some smaller files like ZIPs or big images wouldn’t make it. Luckily, this is no longer the case with the newest Android version.

Starting on DP2, both the backup timeout and the restore timeout were increased to 60 minutes, up from 5 minutes and 1 minute respectively. This twelve-fold increase for backups should give you plenty of time to directly backup any file stored on your phone. Furthermore, the massive restore increase should now give you the ability to restore everything on your phone. You can test this feature using

adb backup -shared && adb restore backup.ab

with your Oreo phone. That will do a complete backup/restore of your phone’s shared storage.

Add Support for Key/Value Packages

Key/Value backups are a neat little feature introduced in Android 2.2 Froyo. Formerly known as the Backup API, they’re a way for developers to backup their app data to the cloud, by uploading it to the Android Backup service. But previously, apps having key/value backup agents would just be skipped by the fullbackup command. However, this isn’t true anymore for Android Oreo.

Starting on DP1, by adding the -includekeyvalue flag to the adb backup command, all packages supporting key/value backups will be added to the resulting backup. In the same fashion, if a backup contains key/value data, it will also be restored. This feature prepares to add CTS tests for packages with key/value backup agents in the future. You can test this out by using

adb backup -includekeyvalue -all && adb restore backup.ab

on your device.

These 2 features should allow for adb backup to be much, much more reliable on Android Oreo devices, and a decent alternative to root backup applications.

About author

Arol Wright
Arol Wright

Diehard technology enthusiast, and an Android purist by nature. While I have a soft spot for smartphones, I'm deeply interested in everything techy, be it PCs, gaming consoles, gadgets, you name it. Please direct all inquiries/tips to [email protected]