EncryptedSharedPreferences Deprecated! Now What?
summary
AndroidX EncryptedSharedPreferences (androidx.security:security-crypto) is deprecated in 1.1.0-alpha07. Migration options are: use the Android Keystore directly via JCA/provider="AndroidKey", implement AEAD yourself with AES‑GCM and a 12‑byte IV, or use Tink’s newer AndroidKey helpers while avoiding deprecated Tink APIs. Because OEM keystore bugs have caused 459 crash reports and master‑key corruption, migrate by exporting all stored values, re‑encrypting with the new key material, deleting old master key files, handling exceptions, and forcing logout/recreation of keys on failure.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 1:17AndroidX Security overview
- 5:17EncryptedSharedPreferences features
- 8:45Security Crypto internals
- 11:37Deprecation reasons
- 14:04Security philosophy
- 16:12Migration options
- 17:39AndroidKeyStore usage
- 24:41Encryption principles
- 26:11Tink encryption
- 29:45Tink key management
- 30:06Migration steps
- 32:17OEM crash issues
- 35:11AndroidKeyStore bugs
- 36:34Error handling
- 37:38Summary








