Android 12: Backup and restore - New format for the XML configuration#16699
Merged
Android 12: Backup and restore - New format for the XML configuration#16699
Conversation
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
You can test the changes on this Pull Request by downloading the APKs: |
AjeshRPai
approved these changes
Jun 3, 2022
Contributor
AjeshRPai
left a comment
There was a problem hiding this comment.
@ashiagr Thanks for working on this. Sorry for the delay in the review of this PR as I was reading upon backup configuration and how to test it.
I have tested the changes according to the instructions. All looks good. 👍🏼 🙌🏼
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16067
This PR adds backup configuration xml in the new format for apps targetting Android 12. The old configuration is still required for devices running Android 11 or lower, hence renamed and retained.
Testing instructions
targetSdkVersionto 31 inbuild.gradle.vanillaDebug.adb shell bmgr enabled. If not, enable it fromSettings>Google->Backup.wordpressdatabaseandorg.wordpress.android_preferences.xmlsharedprefsfile is generated).To verify their existence, check the contents of the directory
/data/data/org.wordpress.android/shared_prefsand confirm the existence of the fileorg.wordpress.android_preferences.xml, similarly check/data/data/org.wordpress.android/databasesand confirm the existence of the filewordpress(you can use the tab "Device File Explorer" from Android Studio for this).adb shell bmgr backupnow org.wordpress.android./data/data/org.wordpress.android/shared_prefsand/data/data/org.wordpress.android/databases.adb shell dumpsys backupand grab the token of theCurrentsection.adb shell bmgr restore {token} org.wordpress.androidwhere the token is from the last step./data/data/org.wordpress.android/shared_prefsand confirm that the fileorg.wordpress.android_preferences.xmlis restored./data/data/org.wordpress.android/databasesand confirm that the filewordpressis restored.For more details on the testing steps, check the official guide: https://developer.android.com/guide/topics/data/testingbackup
P.S. You may see a transport error on step 5. This section can help in troubleshooting common issues.
The first time I ran the backup command, I got this error:
Transport rejected package because it wasn't able to process it at the time.The issue was resolved on trying after few hours.
Regression Notes
Potential unintended areas of impact
N/A
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txtif necessary.