com.webos.service.devmode

Note
This API has been available since API level 11.

API Summary

Developer mode support service. Allows you to enable or disable developer mode on a device and to query the status of developer mode.

Overview of the API

NA

Methods

getDevMode

ACG: devmode.query
  • Added: API level 11

Description

Return the current status of developer mode.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

This value will always be true.

enabledRequiredBoolean

Returns the state of developer mode. Possible values are:

  • true - If developer mode is enabled.
  • false - If developer mode is not enabled.

Example

Example code

# luna-send -n 1 luna://com.webos.service.devmode/getDevMode '{}'

Returns:

{
    "enabled":true,
    "returnValue":true
}

getPassphrase

ACG: devmode.management
  • Added: API level 21

Description

Returns the current passphrase associated with the SSH key, which is used to connect to the device. This method is only callable by the developer mode app.

Parameters

None

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
passphraseOptionalStringThe passphrase.
errorCodeOptionalnumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error Codes Reference

Error Code

Error Text

Error Description

11getPassphrase: Denied. Only DevMode app can call getPassphrase.

Only the DevMode app can call the getPassphrase method.

12getPassphrase: nduid not received from systemservice

Unable to retrieve the device nduid from systemservice.

Example

Example code

# luna-send -P -a com.palmdts.devmode -n 1 luna://com.webos.service.devmode/getPassphrase '{}'

Returns:

{
    "passphrase": "123ABC",
    "returnValue":true
}

setDevMode

ACG: devmode.management
  • Added: API level 11

Description

Enable or disable developer mode. The device will reboot if the mode is changed.

Parameters

Name

Required

Type

Description

enabledRequiredBoolean

The status of developer mode. Possible values are:

  • true - To enable developer mode.
  • false - To disable developer mode.

Call Returns

Name

Required

Type

Description

returnValueRequiredBoolean

Indicates the status of operation. Possible values are:

  • true - Indicates that the operation was successful.
  • false - Indicates that the operation failed. Check the "errorCode" and "errorText" fields for details.
errorCodeOptionalnumber

The error code for the failed operation.

errorTextOptionalString

Indicates the reason for the failure of the operation. See the "Error Codes Reference" section of this method for details.

Error Codes Reference

Error Code

Error Text

Error Description

1write of devmode enabled file failed

The DevMode service was unable to create a needed devmode file in the file system.

3exec of 'reboot' failed

Unable to reboot the device.

42SetDevMode: enabled parameter must exist and be true or false

The enabled parameter must be specified to true or false when calling the method.

Example

Example code

# luna-send -n 1 luna://com.webos.service.devmode/setDevMode '{"enabled":false}'

 

Response:

{
   "returnValue":true
}

Contents