Tracing a Linux Application on Chrome OS
The Linux interceptor and MGD Daemon can be used to trace Linux applications running on Chrome OS devices.
You will need to set up SSH access to your Chrome OS device before you can trace native Linux applications with MGD.
- SSH into the Chrome OS device as root with ssh root@(IP address)
- Create a directory to store the MGD Daemon and interceptor library, e.g. mkdir /usr/bin/mgd
Run the following command to allow connections on port 5002:
sudo iptables -A INPUT -p tcp -m tcp --dport 5002 -j ACCEPT
You will need to copy the MGD Daemon and interceptor library onto your device.
Depending on your device, you will need to use a version of the Linux MGD components appropriate to your architecture (either hard float, soft float, or 64-bit).
You may need root access to copy files onto the Chrome OS file system.
scp libinterceptor.so root@(IP address):/usr/bin/mgd/
- From your root user SSH session, launch mgddaemon.
- Using the Device Manager, connect to the running daemon by following the instructions in Linux Devices or in Connect to an IP.
- Launch a new SSH session.
- Run your Linux application while preloading the interceptor library. Instructions on doing this can be found in Tracing an OpenGL ES, EGL, or OpenCL Application.
You should start to get trace data appearing in the desktop MGD client.