且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

什么是"安卓allowBackup"?

更新时间:2021-12-31 08:16:56

有关此皮棉警告,并为所有其他lint警告,注意,你可以得到一个更全面的解释不只是什么是在一行中的错误信息;你不必在网上搜索了解更多信息。

For this lint warning, and for all other lint warnings, note that you can get a fuller explanation than just what is in the one line error message; you don't have to search the web for more info.

如果您通过Eclipse中使用不起毛,无论是打开lint警告视图,在这里你可以选择皮棉的错误,看到更详细的解释,或者调用上的错误行的quickfix(按Ctrl-1),和的建议之一是解释这个问题,这也将弹出一个更全面的解释。如果你没有使用Eclipse,可以生成从皮棉(皮棉--html)的HTML报告,其中包括全面的解释旁边的警告,也可以要求皮棉解释某个特定问题。例如,涉及到allowBackup问题具有id为AllowBackup(在错误消息的末端示出),所以更全面的解释是:

If you are using lint via Eclipse, either open the lint warnings view, where you can select the lint error and see a longer explanation, or invoke the quickfix (Ctrl-1) on the error line, and one of the suggestions is "Explain this issue", which will also pop up a fuller explanation. If you are not using Eclipse, you can generate an HTML report from lint (lint --html ) which includes full explanations next to the warnings, or you can ask lint to explain a particular issue. For example, the issue related to allowBackup has the id "AllowBackup" (shown at the end of the error message), so the fuller explanation is:

$ ./lint --show AllowBackup

$ ./lint --show AllowBackup

摘要:确保allowBackup明确在应用程序的设置 清单

Summary: Ensure that allowBackup is explicitly set in the application's manifest

优先级:3月10日 严重性:警告 类别:安全

Priority: 3 / 10 Severity: Warning Category: Security

在allowBackup属性决定如果一个应用程序的数据可以备份 和恢复。据记载这里

The allowBackup attribute determines if an application's data can be backed up and restored. It is documented here.

在默认情况下,该标志设置为true。当此标志设置为true, 应用数据可以被备份,并通过使用亚行备份的用户恢复 和亚行恢复。

By default, this flag is set to true. When this flag is set to true, application data can be backed up and restored by the user using adb backup and adb restore.

这可能对应用程序的安全性后果。亚行备份允许 谁已经启用USB调试复制应用程序数据关闭的用户 设备。一旦备份,所有应用程序数据可以由用户读取。亚洲开发银行 恢复允许创建应用数据从指定的来源 用户。经过恢复,应用程序不应该假定数据,文件 权限和目录权限是由应用程序创建 本身。

This may have security consequences for an application. adb backup allows users who have enabled USB debugging to copy application data off of the device. Once backed up, all application data can be read by the user. adb restore allows creation of application data from a source specified by the user. Following a restore, applications should not assume that the data, file permissions, and directory permissions were created by the application itself.

设置 allowBackup =假选择采用应用了两种备份和 恢复。

Setting allowBackup="false" opts an application out of both backup and restore.

要解决此警告,决定你的应用程序是否应该支持备份, 并明确设置安卓allowBackup =(TRUE | FALSE)

To fix this warning, decide whether your application should support backup, and explicitly set android:allowBackup=(true|false)"

点击这里查看更多信息