-
eBPF Tetragon Compilation and Debugging Guide
This article provides a introduction to compiling and debugging with the eBPF-based Tetragon tool. It covers configuring Vagrant and VirtualBox, methods for capturing and analyzing eBPF events using Tetragon and Tetra, as well as compiling Tetragon in Docker and debugging in Kubernetes clusters. Debugging Dependencies The Tetragon GitHub documentation specifies that debugging is conducted within VirtualBox. Therefore, before starting debugging, you need to install Vagrant and VirtualBox. The Tetragon source code provides a Vagrant configuration. When starting VirtualBox via Vagrant, it will automatically install all dependencies and tools. For details, refer to the Tetragon source code. Starting the Virtual Machine Start and log in to the VirtualBox virtual machine with…
-
Adding a Custom System Service in Android
In the Android operating system, System Services are core components that provide system-level services such as power management, window management, package management, and more. Creating and registering a custom System Service can extend the functionality of Android and provide new system services to applications. This article will detail how to add a custom System Service in Android. Prerequisites Before starting, ensure you have the following: Basic knowledge of Android development. Familiarity with building and debugging Android source code. Access to modify the Android source code. Android System Service Architecture Before diving into the code, it’s important to understand the architecture of Android System Services. Android System Services use the Binder…
-
Understand Android Vendor SELinux Policy Build
Since the introduction of the Treble framework in Android 8, Android has divided the system into System and Vendor parts, allowing independent upgrades of system and vendor. Subsequently, Product, ODM, and other partitions were introduced. In this context, SELinux policies are also divided into several parts: platform (system), system_ext, product, vendor, and odm. This article uses the Vendor partition as an example to analyze in detail how to include sepolicy files in the Android build system, how Android.mk variables are passed to the Soong build system, and finally how they correspond to modules and variables in Android.bp. 1. Including SELinux Policy Files in Android Makefile First, the SELinux policy files…