com.webos.service.devmode
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
Description
Return the current status of developer mode.
Parameters
None
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | boolean | This value will always be true. |
enabled | Required | boolean | Returns the state of developer mode. Possible values are:
|
Example
Example code
# luna-send -n 1 luna://com.webos.service.devmode/getDevMode '{}'
Returns:
{
"enabled":true,
"returnValue":true
}
setDevMode
Description
Enable or disable developer mode. The device will reboot if the mode is changed.
Parameters
Name | Required | Type | Description |
---|---|---|---|
enabled | Required | boolean | The status of developer mode. Possible values are:
|
Call Returns
Name | Required | Type | Description |
---|---|---|---|
returnValue | Required | boolean | Indicates the status of operation. Possible values are:
|
errorCode | Optional | number | The error code for the failed operation. |
errorText | Optional | string | 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 |
---|---|---|
1 | write of devmode enabled file failed | The DevMode service was unable to create a needed devmode file in the file system. |
42 | SetDevMode: enabled parameter must exist and be true or false | The enabled parameter must be specified to true or false when calling the method. |
3 | exec of 'reboot' failed | Unable to reboot the device. |
Example
Example code
# luna-send -n 1 luna://com.webos.service.devmode/setDevMode '{"enabled":false}'
Response:
{
"returnValue":true
}