1

When you encrypt the app's data stored on the device, it is recommended to use the KeyStore to generate and save the key Material used for the encryption. If the user wants to backup the app's internal storage, he can use adb backup or Google's Cloud Backup. That's what I have understood.

But when the data is encrypted by keys stored in the Android's KeyStore, is it possible to restore the backup the user/Google made? Or does the the use of encryption prevent the backup function?

jzeferino
  • 7,700
  • 1
  • 39
  • 59
Marco
  • 11
  • 3
  • see here: http://stackoverflow.com/questions/34765340/can-androids-keystore-be-backed-up/38356800#38356800 –  Jul 13 '16 at 17:44
  • Does this answer your question? [Can Android's keystore be backed up?](https://stackoverflow.com/questions/34765340/can-androids-keystore-be-backed-up) – Andrew T. Apr 06 '23 at 05:17

1 Answers1

0

It will not work. This is very sad that Google force two things that don't work together. Keystore on Android doesn't have a backup option like Keychain on iOS. Your data will be backed up but after restoration, you will not have an option to decrypt it.

You should use a different way to backup data - the easiest one is to have user's account and store his data on your backend.

I wrote about it more here: https://medium.com/@thecodeside/android-auto-backup-keystore-encryption-broken-heart-love-story-8277c8b10505

Artur Latoszewski
  • 735
  • 1
  • 10
  • 21