INITIAL_USER_INFO
What it is
Defines the initial Android user to be used during initialization.
This property is called by the Android system when it initializes and it lets the HAL define which Android user should be started.
This request is made by setting a VehiclePropValue (defined by InitialUserInfoRequest), and the HAL must respond with a property change event (defined by InitialUserInfoResponse). If the HAL doesn't respond after some time (defined by the Android system), the Android system will proceed as if HAL returned a response of action InitialUserInfoResponseAction:DEFAULT.
For example, on first boot, the request could be:
int32[0]: 42 // request id (arbitrary number set by Android system) int32[1]: 1 // InitialUserInfoRequestType::FIRST_BOOT int32[2]: 0 // id of current user (usersInfo.currentUser.userId) int32[3]: 1 // flag of current user (usersInfo.currentUser.flags = SYSTEM) int32[4]: 1 // number of existing users (usersInfo.numberUsers); int32[5]: 0 // user #0 (usersInfo.existingUsers[0].userId) int32[6]: 1 // flags of user #0 (usersInfo.existingUsers[0].flags)
And if the HAL want to respond with the creation of an admin user called "Owner", the response would be:
int32[0]: 42 // must match the request id from the request int32[1]: 2 // action = InitialUserInfoResponseAction::CREATE int32[2]: -10000 // userToSwitchOrCreate.userId (not used as user will be created) int32[3]: 8 // userToSwitchOrCreate.flags = ADMIN string: "||Owner" // userLocales + separator + userNameToCreate
Notice the string value represents multiple values, separated by ||. The first value is the (optional) system locales for the user to be created (in this case, it's empty, meaning it will use Android's default value), while the second value is the (also optional) name of the to user to be created (when the type of response is InitialUserInfoResponseAction:CREATE). For example, to create the same "Owner" user with "en-US" and "pt-BR" locales, the string value of the response would be "en-US,pt-BR||Owner". As such, neither the locale nor the name can have || on it, although a single | is fine.
NOTE: if the HAL doesn't support user management, then it should not define this property, which in turn would disable the other user-related properties (for example, the Android system would never issue them and user-related requests from the HAL layer would be ignored by the Android System). But if it supports user management, then it must support all core user-related properties (INITIAL_USER_INFO, SWITCH_USER, CREATE_USER, and REMOVE_USER).
How the ID is built
A property ID is a 32-bit value packing four fields. Reading 0x11e00f07 apart:
| Field | Mask | Value | Means |
|---|---|---|---|
| Group | 0xf0000000 | 0x10000000 | SYSTEM |
| Area | 0x0f000000 | 0x01000000 | GLOBAL |
| Type | 0x00ff0000 | 0x00e00000 | MIXED |
| Ordinal | 0x0000ffff | 0x00000f07 | 0xf07 |
Reading it from an app
CarPropertyManager mgr = (CarPropertyManager)
car.getCarManager(Car.PROPERTY_SERVICE);
CarPropertyValue<Object> value =
mgr.getProperty(VehiclePropertyIds.INITIAL_USER_INFO, 0);This property can be read and written, though an OEM may implement it as read-only. It fires a callback whenever the value changes.

