C++ C Shell
Pull request Compare This branch is 3 commits ahead, 43 commits behind mozilla:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


You need to:

  • have the Android NDK:

  • have the NSPR headers installed under /usr/include/nspr:

  • export these vars:

    • NDKPATH = path to the NDK folder
    • ADB_PATH = path to the adb binary
  • have a running B2G emulator/device with the ports 20700 and 20701 forwarded:

    • adb forward tcp:20700 tcp:20700
    • adb forward tcp:20701 tcp:20701
  • install busybox on the device:

    • ./
  • have the toolchain:

    • source

Building, running

Just ./

Including this in B2G

Once you have the prerequisites and export the environment variables, just clone this repo inside $B2G_REPO/system/. Build and flash B2G as usual.

  • to run it, you must shell in and run:
    • export NSPR_LOG_MODULES="NegatusLOG:5, timestamp" ; export LD_LIBRARY_PATH="/data/local:/data/local/agent:/system/b2g:$LD_LIBRARY_PATH"

and then you will be able to run the agent using sutagent. It will be in the $PATH.

Start the agent on boot

Insert this after the exports in $B2G_REPO/gonk-misc/

export NSPR_LOG_MODULES="NegatusLOG:5, timestamp"
sutagent &

NSPR Logging

Before running the agent (not necessary if you use

export NSPR_LOG_MODULES="NegatusLOG:5, timestamp"

Data will be logged to $TESTROOT/Negatus.log.