Menu

eBPF Tutorial by Example: Using eBPF Programs on Android
📰

eBPF Tutorial by Example: Using eBPF Programs on Android

DEV Community: tutorial·云微·10 days ago
#QXlrMIPP
#devtotutorial#devto#dev#android#ebpf
Long article (1483 words) — no AI summary yet.
Reading 0:00
15s threshold

This article mainly documents the author's exploration process, results, and issues encountered while testing the level of support for CO-RE technology based on the libbpf library on high version Android kernels in the Android Studio Emulator.

The test was conducted by building a Debian environment in the Android Shell environment and attempting to build the eunomia-bpf toolchain and run its test cases based on this.

The complete source code: https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/22-android

Background

As of now (2023-04), Android has not provided good support for dynamic loading of eBPF programs. Both the compiler distribution scheme represented by bcc and the CO-RE scheme based on btf and libbpf rely heavily on Linux environment support and cannot run well on the Android system.[^WeiShu]

However, there have been some successful cases of trying eBPF on the Android platform.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.