自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
支援多位使用者
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Android 支援多位使用者設定、應用程式和資料。Android Automotive 會利用 Android 的多使用者支援功能,提供共用裝置體驗,讓每位裝置使用者都能由不同的實體使用者使用。在 Android 10 以上版本中,Android Automotive 支援以下類型的使用者:
- 無頭系統使用者。無頭系統使用者會在背景執行,並代管所有系統服務。在 Automotive 中,系統使用者並非由真人使用,也不會直接由真人存取。
- 一般使用者。汽車裝置是共用裝置,每位使用者都由不同的自然人使用。Android 使用者可以擔任不同的角色。詳情請參閱「角色和限制」一文。在 Automotive 中,所有一般使用者都是次要使用者。
- 訪客使用者。汽車使用者可包括臨時使用者,例如借車的朋友。為了因應這類用途,Android Automotive 會為訪客使用者提供存取權,讓他們存取使用車輛所需的所有元件。一次只能在裝置上定義一個訪客使用者。
下圖說明 Automotive 無頭系統使用者模式如何支援多使用者體驗:

圖 1. 多使用者體驗。
如需更多資訊,請參閱「Android Automotive 多使用者」。
角色和限制
車輛是共用裝置,可能由不同駕駛人駕駛。每位使用者都可以擁有自己的使用者,每個使用者都有自己的應用程式和資料。不過,車輛擁有者可能不希望所有使用者都能修改裝置。因此,Automotive 支援為使用者提供不同角色和限制的概念。支援下列使用者角色:
- 管理員。根據預設,具備管理員角色的一般使用者可以執行所有工作。管理員使用者可以將管理員角色授予其他使用者。
- 非管理員。根據預設,非管理員角色的一般使用者無法將裝置重設為原廠設定、授予自己管理員角色,或刪除其他使用者。
- 訪客。根據預設,訪客使用者無法將裝置恢復原廠設定,也無法刪除其他使用者。根據預設,訪客使用者有其他限制,例如無法修改 (新增或移除) 帳戶、安裝應用程式或套用螢幕鎖定畫面。根據預設,訪客也是暫時性。
如上所述,每個角色都有一組預設限制,因此使用者透過該角色建立的新使用者,也會受到相同的限制。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。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,["# Multi-user support\n\nAndroid supports [multiple users](/docs/devices/admin/multi-user#general_defs)\nsettings, apps, and data. Android Automotive relies on Android's multi-user support\nto provide a shared device experience, wherein each device user is intended to be used by a\ndifferent physical person. In Android 10 and higher, Android\nAutomotive supports these types of users:\n\n- **[Headless\n system user](/docs/devices/admin/multi-user#automotive-user-types).** The headless system user runs in the background and hosts all system services. For Automotive, the system user isn't intended to be used, nor directly accessed, by a physical person.\n- **[Regular user](/docs/devices/admin/multi-user#automotive-user-types).** Automotive devices are shared devices and each user is intended to be used by a different physical person. Android users can have different roles. See [Roles and restrictions](#roles-restrictions) for more information. In Automotive, all regular users are secondary users.\n- **Guest user.** Automotive users can include temporary users, such as friends, who borrow a vehicle. To accommodate uses like this, Android Automotive provides a guest user with access to all components needed to use the vehicle. Only one guest user can be defined on a device at a time.\n\n| **Note:** The primary user flag ([FLAG_PRIMARY](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/android10-release/core/java/android/content/pm/UserInfo.java#46)) isn't yet supported in the Automotive headless system user model.\n\nThe following diagram illustrates how the Automotive headless system user mode\nsupports the multi-user experience:\n\n**Figure 1.** Multi-user experience.\n\nTo learn more, see [Android Automotive multi-user](/docs/devices/admin/multi-user#automotive-multi-user).\n\nRoles and restrictions\n----------------------\n\nVehicles are shared devices that may be driven by different people. Each person\ncan have their own user, each with their own apps and data. However, a vehicle owner may\nnot want all users to have the same ability to modify the device. Therefore, Automotive supports\nthe concept of providing users with different roles and restrictions. The following user roles are\nsupported:\n\n- **Admin.** By default, regular users with the role of admin can perform *every* task. Admin users can grant the admin role to other users.\n- **Non-admin.** By default, regular users with the role non-admin can't factory data reset the device, grant themselves an admin role, or delete other users.\n- **Guest.** By default, a guest user can neither factory data reset the device nor delete other users. By default, a guest user has other restrictions, such as not being able to modify (add or remove) accounts, install apps, or apply a lockscreen. By default, guest is also ephemeral.\n\nAs stated above, each role has a default set of restrictions so that a new\nuser created with that role has the same respective restrictions."]]