title: What is "android:allowBackup"?
body: <p>Since the <a href="http://tools.android.com/download/adt-21-preview" rel="noreferrer"><strong>new ADT preview version (version 21)</strong></a>, they have a new lint warning that tells me the next thing on the manifest file (in the application tag):</p>
  
  <blockquote>
    <p>Should explicitly set android:allowBackup to true or false (it's true by default, and that can have some security implications for the application's data)</p>
  </blockquote>
  
  <p>In the <a href="http://tools.android.com/download/adt-21-preview" rel="noreferrer"><strong>official website</strong></a>, they've written:</p>
  
  <blockquote>
    <p>A couple of new checks: you must explicitly decide whether your app allows backups, and a label check. There's a new command line flag for setting the library path. Many improvements to the incremental lint analysis while editing.</p>
  </blockquote>
  
  <p>What is this warning? What is the backup feature, and how do I use it?</p>
  
  <p>Also, why does the warning tell me it has security implications? What are the disadvantages and advantages of disabling this feature?</p>
  
  <hr>
  
  <p>There are two concepts of backup for the manifest:</p>
  
  <ul>
  <li>"android:<strong>allowBackup</strong>" allows to backup and restore via adb, as shown <a href="http://developer.android.com/reference/android/R.attr.html#allowBackup" rel="noreferrer"><strong>here</strong></a>:</li>
  </ul>
  
  <blockquote>
    <p>Whether to allow the application to participate in the backup and
    restore infrastructure. If this attribute is set to false, no backup
    or restore of the application will ever be performed, even by a
    full-system backup that would otherwise cause all application data to
    be saved via adb. The default value of this attribute is true.</p>
  </blockquote>
  
  <p>This is considered a security issue because people could backup your app via <a href="https://en.wikipedia.org/wiki/Android_Debug_Bridge#Android_Debug_Bridge" rel="noreferrer">ADB</a> and then get private data of your app into their PC.</p>
  
  <p>However, I think it's not that of a problem, since most users don't know what adb is, and if they do, they will also know how to root the device. ADB functions would only work if the device has the debugging feature enabled, and this needs the user to enable it.</p>
  
  <p>So, only users that connect their devices to the PC and enable the debugging feature would be affected. If they have a malicious app on their PC that uses the ADB tools, this could be problematic since the app could read the private storage data.</p>
  
  <p>I think Google should just add a feature that is disabled by default, in the developer category, to allow backup&amp;restore of apps via ADB.</p>
  
  <ul>
  <li>"android:<strong>backupAgent</strong>" allows to use the backup and restore feature of the cloud, as shown <a href="http://developer.android.com/guide/topics/manifest/application-element.html#agent" rel="noreferrer"><strong>here</strong></a> and <a href="http://developer.android.com/guide/topics/data/backup.html#Basics" rel="noreferrer"><strong>here</strong></a>:</li>
  </ul>
  
  <blockquote>
    <p>The name of the class that implement's the application's backup agent,
    a subclass of BackupAgent. The attribute value should be a fully
    qualified class name (such as, "com.example.project.MyBackupAgent").
    However, as a shorthand, if the first character of the name is a
    period (for example, ".MyBackupAgent"), it is appended to the package
    name specified in the  element. There is no default. The
    name must be specified.</p>
  </blockquote>
  
  <p>This isn't a security issue.</p>