[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-27 (世界標準時間)。"],[],[],null,["# Encryption is the process of encoding all user data on an Android device using\nsymmetric encryption keys. Once a device is encrypted, all user-created data is\nautomatically encrypted before committing it to disk and all reads automatically\ndecrypt data before returning it to the calling process. Encryption ensures that\neven if an unauthorized party tries to access the data, they won't be able to\nread it.\n\n\nAndroid has two methods for device encryption: file-based encryption and\nfull-disk encryption.\n\nFile-based encryption\n---------------------\n\n\nAndroid 7.0 and later supports\n[file-based encryption](/docs/security/features/encryption/file-based).\nFile-based encryption allows different files to be encrypted with different\nkeys that can be unlocked independently. Devices that support file-based\nencryption can also support\n[Direct\nBoot](https://developer.android.com/training/articles/direct-boot), which allows encrypted devices to boot straight to the lock screen,\nthus enabling quick access to important device features like accessibility\nservices and alarms.\n\n\nWith file-based encryption and APIs that make apps aware of encryption, apps\ncan operate within a limited context. This can happen before users have\nprovided their credentials while still protecting private user information.\n\n### Metadata encryption\n\n\nAndroid 9 introduces support for\n[metadata encryption](/docs/security/features/encryption/metadata), where hardware\nsupport is present. With metadata encryption, a single key present at boot time\nencrypts whatever content is not encrypted by FBE, such as directory layouts,\nfile sizes, permissions, and creation/modification times. This key is protected\nby KeyMint (previously Keymaster), which in turn is protected by Verified Boot.\n\nFull-disk encryption\n--------------------\n\n| **Note:** Full-disk encryption is not allowed on new devices running Android 10 and higher. For new devices, use [file-based encryption](/docs/security/features/encryption/file-based).\n\n\nAndroid 5.0 up to Android 9 support\n[full-disk encryption](/docs/security/features/encryption/full-disk).\nFull-disk encryption uses a single key---protected with the user's device password---to\nprotect the whole of a device's userdata partition. Upon boot, the user must\nprovide their credentials before any part of the disk is accessible.\n\n\nWhile this is great for security, it means that most of the core functionality\nof the phone is not immediately available when users reboot their device.\nBecause access to their data is protected behind their single user credential,\nfeatures like alarms could not operate, accessibility services were unavailable,\nand phones could not receive calls."]]