Adb backup is totally broken with Android 12

With Android 12 (API 31) is mandatory to set this flags to allow adb backup:

  • android:allowBackup=“true”
  • android:debuggable=“true”

Otherwise it generated backup 549 bytes which it totally empty. I’ve tested and can restore backup from previous versions but not make it.

Welcome! The allowBackup flag is set. However, it is not possible to set the debuggable flag on a production release. As Android 12 is not released, maybe this is just a bug in Android?

No, it’s not a bug, is intended. Google wants to allow only cloud backup. Why is not possible to set “debuggable” to true, it’s your policy or the Play Store blocks the app?

The Play Store and me. It’s obviously not a good idea to ship a debuggable app to end users for performance and security reasons. If you need it, you will have to build the app for yourself.

Edit: Thanks for the link! Edit 2: does not mention anything about debuggable requirement.