libmbsystrace is a library for tracing and manipulating kernel interactions of a process. This includes things like making system calls and delivery of signals. Tracing of mixed ABI programs is supported. Thus, libmbsystrace supports tracing:
native ABI programs (eg. 64-bit program on 64-bit host)
compatible ABI programs (eg. 32-bit programs on 64-bit hosts)
mixed ABI programs (eg. an assembly program that executes both x96_64's syscall and x86_32's sysenter)
Userspace tracing, like stepping through assembly instructions are not supported by the library.
This will be useful in manipulating the behavior of ROM installers and init binaries without DBP having special knowledge of them. For example, instead of explicitly parsing fstab files or removing mount commands from init.*.rc, we can hook mount syscalls as init is executing them. The same applies to installers as well, where we're currently hacking edify files and other installer scripts to hook mount/umount calls.
Before we start using libmbsystrace in DBP, we'll need to implement the ability to use eBPF for filtering syscalls we care about. Otherwise, the current pure-ptrace solution may cause a large performance hit during ROM installation and bootup. This will come in a future PR.
This PR also adds the ability to run all the gtest/gmock tests for android-system targets inside QEMU. This has been enabled for CI builds so failing tests will block publishing of a release. Support for the android-app targets may be added later.
libmbsystrace is a library for tracing and manipulating kernel interactions of a process. This includes things like making system calls and delivery of signals. Tracing of mixed ABI programs is supported. Thus, libmbsystrace supports tracing:
syscall
and x86_32'ssysenter
)Userspace tracing, like stepping through assembly instructions are not supported by the library.
This will be useful in manipulating the behavior of ROM installers and
init
binaries without DBP having special knowledge of them. For example, instead of explicitly parsing fstab files or removing mount commands frominit.*.rc
, we can hookmount
syscalls asinit
is executing them. The same applies to installers as well, where we're currently hacking edify files and other installer scripts to hook mount/umount calls.Before we start using libmbsystrace in DBP, we'll need to implement the ability to use eBPF for filtering syscalls we care about. Otherwise, the current pure-ptrace solution may cause a large performance hit during ROM installation and bootup. This will come in a future PR.
This PR also adds the ability to run all the gtest/gmock tests for
android-system
targets inside QEMU. This has been enabled for CI builds so failing tests will block publishing of a release. Support for theandroid-app
targets may be added later.Closes #1344