自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
隱私權安全性最佳做法
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁面收錄了一系列資料收集指南和建議,確保 Android 使用者能控管自己的資料處理方式。
資料記錄
記錄資料會增加該資料外洩的風險,並降低系統效能。記錄機密使用者資料導致多起公開安全事件。
- 請勿記錄至 SD 卡。
- 應用程式或系統服務不應記錄可能包含私密資訊的第三方應用程式所提供的資料。
- 應用程式不得在正常運作期間記錄任何個人識別資訊 (PII),除非這項操作絕對必要,才能提供應用程式的核心功能。
CTS 包含測試,可檢查記錄中是否有潛在的私密資訊。
指標收集
收集指標是瞭解應用程式使用情形,並改善整體使用者體驗的重要環節。不過,過度廣泛的指標收集也可能會對使用者隱私造成風險。
- 盡可能不要收集指標。
- 如果您必須收集指標,請先徵詢使用者明確、知情且有意義的同意聲明。
- 除了少數例外狀況,請只收集必要的指標,以確保服務的可靠度。
- 盡可能避免收集可識別或可能含有機密內容的資料,例如硬體 ID。
- 盡可能確保資料經過充分匯總和去識別化。
間諜軟體
間諜軟體是指未經使用者同意,就收集使用者或裝置相關資訊的軟體,且可能會將使用者資訊傳送給其他實體。
- 如果程式碼會在未揭露相關資訊或使用者不知情的情況下傳輸下列任何使用者或裝置資料,就會遭判定為間諜軟體 (此清單包含主要範例,但不包含所有範例):
- 使用者的聯絡人資訊 (姓名、電話號碼、電子郵件地址)
- 相片或其他檔案
- 使用者電子郵件中的內容
- 通話記錄
- 簡訊記錄
- 網頁紀錄
- 瀏覽器書籤
- 其他應用程式的私人資訊 (私人
/data/
目錄)
- 錄音或通話錄音
- 密碼
- OAuth 權杖
- 位置
- 請務必在安裝前向使用者提供合理的揭露說明。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-27 (世界標準時間)。
[[["容易理解","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,["# Privacy security best practices\n\nThis page contains a collection of data collection guidance\nand recommendations to ensure that Android users have control over the\nhandling of their data.\n\nData logging\n------------\n\nLogging data increases the risk of exposure of that data and reduces system\nperformance. Multiple public security incidents have occurred as a result of\nlogging sensitive user data.\n\n- Don't log to the sdcard.\n- Apps or system services shouldn't log data provided from third-party apps that might include sensitive information.\n- Apps must not log any Personally Identifiable Information (PII) as part of normal operation, unless it's absolutely necessary to provide the core functionality of the app.\n\nCTS includes tests that check for the presence of potentially sensitive\ninformation in logs.\n\nMetrics collection\n------------------\n\nCollecting metrics can be an essential part of understanding usage of your\napp and making improvements for the overall user experience. However, overly\nbroad metrics collection can also present a risk to user privacy.\n\n- If at all possible, don't collect metrics.\n - If you must collect metrics, first request explicit, informed, and meaningful user consent.\n- With few exceptions, only collect metrics that are necessary to support the reliability of the service.\n- Avoid collecting identifiable or potentially sensitive data whenever possible, such as [hardware identifiers](https://developer.android.com/training/articles/user-data-ids).\n- Ensure data is sufficiently aggregated and anonymized whenever possible.\n\nSpyware\n-------\n\nSpyware is defined as software that aims to gather information about a user\nor device without their knowledge, that might send user information to another\nentity without consent.\n\n- Transmission of the following user or device data without disclosure or in a manner that is unexpected to the user is considered spyware (this list contains top examples, but isn't an exhaustive list):\n - Information about the user's contacts (names, numbers, emails)\n - Photos or other files\n - Content from user email\n - Call log\n - SMS log\n - Web history\n - Browser bookmarks\n - Private information from other apps (private `/data/` directories)\n - Audio or call recording\n - Passwords\n - OAuth tokens\n - Location\n- Ensure that all apps provide a reasonable explanation disclosure to the user prior to installation."]]