Developer Mode

Developer Mode is provided as a pre-built core app (but is not installed by default). It is created to install tools and features for use by developers that should be removed before the target is deployed into production.

devMode provides the following features:

  • installs gdbserver executable for use on the target device, allowing step-by-step debugging of Legato apps.
  • installs strace for use on the target device, allowing tracing of kernel calls.
  • sets the probation period of apps to 10 seconds, to prevent aggressive roll-back.
  • holds a wake lock, so the target won't go to sleep when disconnected from USB.
  • removes the boot count file on startup to disable the boot loop detection feature of Legato.
  • installs other debug/development tools such as tcpdump, lsusb, lsof and iperf3.
Warning
Before deploying your system image or target in a production environment devMode must be uninstalled. devMode installs gdbserver which is licensed with GPLv3, uninstalling devMode removes all GPLv3 software from your target.

Install Developer Mode

devMode is a core app that is built during the make <target> process but it is not included by default in the system.sdef.

To install devMode:

$ make wp85
$ app install $LEGATO_ROOT/build/wp85/tools/devMode.wp85.update 192.168.2.2

Enable Developer Mode

To start devMode on your target (if it's disabled):

Start the app:

app start devMode 

Modify the config on the target to enable starting devMode upon reboot:

config set /apps/devMode/startManual false bool 

To configure enabling/disabling devMode (even after a system rebuild) add a start: auto (enabled) or start: manual (disabled) to the devMode adef.

Example devMode adef:

sandboxed: false
start: auto                 <-- change to manual to disable

executables:
{
    devMode = ( $LEGATO_ROOT/components/devMode/devMode )
}

processes:
{
    run:
    {

Disable Developer Mode

To temporarily stop devMode:

app stop devMode 

Remove Developer Mode

To remove devMode from your target:

app remove devMode 

It is advisable to remove the devMode app before deploying targets in production. This can be done by removing devMode from the system sdef file and rebuilding the system for the target device.