Package: android.hardware.oemlock@1.0

IOemLock

interface IOemLock

Methods

getName

getName ()
generates (OemLockStatus status, string name)

Returns a vendor specific identifier of the HAL.

The name returned must not be interpreted by the framework but must be passed to vendor code which may use it to identify the security protocol used by setOemUnlockAllowedByCarrier.This allows the vendor to identify the protocol without having to maintain a device-to-protocol mapping.

Details
Generates
status
name
of the implementation.

setOemUnlockAllowedByCarrier

setOemUnlockAllowedByCarrier (bool allowed, vec<uint8_t> signature)
generates (OemLockSecureStatus status)

Updates whether OEM unlock is allowed by the carrier.

The implementation may require a vendor defined signature to prove the validity of this request in order to harden its security.

Details
Parameters
allowed
is the new value of the flag.
signature
to prove validity of this request or empty if not required.
Generates
status
is OK if the flag was successfully updated, INVALID_SIGNATURE if a signature is required but the wrong one was provided or FAILED if the update was otherwise unsuccessful.

isOemUnlockAllowedByCarrier

isOemUnlockAllowedByCarrier ()
generates (OemLockStatus status, bool allowed)

Returns whether OEM unlock is allowed by the carrier.

Details
Generates
status
is OK if the flag was successfully read.
allowed
is the current state of the flag.

setOemUnlockAllowedByDevice

setOemUnlockAllowedByDevice (bool allowed)
generates (OemLockStatus status)

Updates whether OEM unlock is allowed by the device.

Details
Parameters
allowed
is the new value of the flag.
Generates
status
is OK if the flag was successfully updated.

isOemUnlockAllowedByDevice

isOemUnlockAllowedByDevice ()
generates (OemLockStatus status, bool allowed)

Returns whether OEM unlock ia allowed by the device.

Details
Generates
status
is OK if the flag was successfully read.
allowed
is the current state of the flag.