1. Adb backup is enabled by default for "android" package that corresponds to SystemBackupAgent (no change from current behavior) 2. System and privileged apps can use android.backup.ALLOW_ADB_BACKUP manifest property to enable / disable adb backup. Disabled by default. 3. Other apps can only use adb backup when running in debuggable mode. Bug: 171032338 Test: 1. atest BackupEligibilityRulesTest 2.1. Run adb backup / restore for SystemBackupAgent and verify success (running in system_server) 2.2. Run adb backup / restore for NexusLauncher with "allowAdbBackup=true" and verify success (privileged app) 2.3. Run adb backup / restore for a non-privileged debuggable app and verify success. Change-Id: Ifefe6d888377d3ac9482928b27c86b2e562ad8fa
15 lines
373 B
Plaintext
15 lines
373 B
Plaintext
filegroup {
|
|
name: "services.backup-sources",
|
|
srcs: ["java/**/*.java"],
|
|
path: "java",
|
|
visibility: ["//frameworks/base/services"],
|
|
}
|
|
|
|
java_library_static {
|
|
name: "services.backup",
|
|
defaults: ["platform_service_defaults"],
|
|
srcs: [":services.backup-sources"],
|
|
libs: ["services.core"],
|
|
static_libs: ["backuplib", "app-compat-annotations"],
|
|
}
|