SystemTap for Android

This tutorial describes how to build SystemTap for Android. Further more, it is explained how to configure your workspace to be able to compile your own stap scripts for Android and to start them. It is possible that you have to do some shaky things with your Android device during this manual. Make sure you have backuped all your important data!


Building SystemTap

Compile your own systemtap:

It automatically configures, build and installs systemtap for you. You can find this installation in the installed directory. It is independet from any other installation on your system. The script builds the arm binaries as well. There are located at src/android_binaries.

Setting up a device config

Before you can compile your stap script into a kernel module. You have to create a configuration for the target platform. So far, a configuration consists of a path to the kernel sourcetree.

To create such a configuration write the path in a textfile named <device>.conf and place it under the config directory. Here is an example for the Samsung Galaxy Nexus:

Compile a script for android

Ensure you have created a configuration for your device under conf/ and the kernel tree is prepared for compiling modules. Your script should be located in the scripts directory. To start the compilation:

Where <devicename specifies the configuration to be used and <script> the systemtap script. Important: Omit the filename extension from both parameters.

The compiled script is located in modules/<devicename>/.

Run a compiled script (aka kernelmodule) on android

First you need to install the SystemTap Android Application located in android-app on your device. It is an Eclipse project. So import it to Eclipse and install it on your device.

Now place the compiled script on the sdcard under the `/sdcard/systemtap/modules/ directory. Just start the android app, select the module and start it. :-)

None: SystemTapOnAndroidARM (last edited 2018-11-16 11:01:22 by p4FD97793)