INACTIVE - http://mzl.la/ghe-archive - C++ version of the Android Java SUTAgent
Перейти к файлу
Mark Côté 5009c0738d Bug 852253 - Include prebuilt static nspr libs. r=ted 2013-04-03 10:51:01 -04:00
libs Bug 852253 - Include prebuilt static nspr libs. r=ted 2013-04-03 10:51:01 -04:00
src Bug 827999 - Use SD card for test root if present. r=wlach 2013-02-08 11:13:03 -05:00
.gitignore add swp and log to gitignore 2012-09-11 19:32:44 -07:00
Android.mk Bug 852253 - Include prebuilt static nspr libs. r=ted 2013-04-03 10:51:01 -04:00
Makefile Bug 827999 - Use SD card for test root if present. r=wlach 2013-02-08 11:13:03 -05:00
Makefile.droid Bug 852253 - Include prebuilt static nspr libs. r=ted 2013-04-03 10:51:01 -04:00
Makefile.linux A few fixes, and no longer need the -fpermissive flag. 2012-08-21 16:18:58 -04:00
README.md Bug 798392 - get a version of execsu working, update doc; r=mcote 2012-10-09 12:59:19 -04:00
bootstrap.sh do not reinstall toolchain everytime 2012-08-20 14:05:53 -07:00
run.sh s/ADB/ADB_PATH to be consistent with the other codebases 2012-09-13 16:50:46 -07:00
setup-tools.sh s/ADB/ADB_PATH in setup-tools 2012-09-14 16:59:35 -07:00

README.md

Prerequisites

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:

    • ./setup-tools.sh
  • have the toolchain:

    • source bootstrap.sh

Building, running

Just ./run.sh.

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. You will be able to run the agent using sutagent. It will be in the $PATH.

You do need to set the LD path for this to work:

export LD_LIBRARY_PATH=/vendor/lib:/system/lib:/system/b2g

Start the agent on boot

Insert this after the exports in $B2G_REPO/gonk-misc/b2g.sh:

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

NSPR Logging

Before running the agent (not necessary if you use run.sh):

export NSPR_LOG_MODULES="NegatusLOG:5, timestamp"

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