filament-android-development
Build, deploy, run, and benchmark Filament binaries on connected Android devices or emulators. Use this skill for compiling, pushing, and executing Android tests or benchmarks.
- License 许可
- Apache-2.0
- 所属仓库
- google/filament
- 最近更新
- 2026-11-14
- Stars
- ★ 2.1w
- Forks
- 2.3k
01 前言 Front Matter
- name
- filament-android-development
- description
- Build, deploy, run, and benchmark Filament binaries on connected Android devices or emulators. Use this skill for compiling, pushing, and executing Android tests or benchmarks.
03 SKILL.md 正文
Filament Android Development, Deployment, and Benchmarking
This skill details the procedures for compiling binaries for Android, installing them onto a physical device or emulator, and running tests and benchmarks.
1. Compiling Release Build for Android
Android binaries should almost always be built in release mode for testing and benchmarking.
To build the release version targeting the arm64-v8a architecture, and optionally enable Perfetto tracing (the -P flag, which is highly recommended during performance development):
./build.sh -q arm64-v8a -Pip android release
2. Deploying Binaries to an Android Device
Push the compiled executable (test or benchmark) to a writable temporary directory (such as /data/local/tmp) on the connected Android device using adb:
adb push ./out/cmake-android-release-aarch64/{path-to-executable} /data/local/tmp
Replace {path-to-executable} with the actual relative path to your compiled binary under out/cmake-android-release-aarch64/.
3. Executing Binaries on an Android Device
Run the pushed binary inside the Android device's shell.
You must set LD_LIBRARY_PATH to the directory containing the pushed binary so that the dynamic linker can locate target proprietary shared libraries:
adb shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/{executable}
4. Running a Performance Benchmark on Device
When running performance benchmarks on Android devices, always conform to the following formatting rules:
- Output counters as a table (
--benchmark_counters_tabular) - Keep colors enabled (
--benchmark_color=true) - Set an appropriate, readable time unit matching the performance characteristics of the measured workload (typically
msorus, rarelyns):
adb shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/{executable} --benchmark_counters_tabular --benchmark_color=true --benchmark_time_unit=ms
04 同仓库更多 Skills
filament-math
Enforce correct mathematical primitives and naming conventions in Filament code. Use this skill when performing coordinate transformations, vector math, or projection setups.
filament-lifetime
Enforce correct Filament object creation and destruction lifecycles. Use this skill when initializing rendering pipelines or allocating/deallocating GPU buffers and entities.
cherry-pick
Cherry-pick a commit onto another branch and open the PR. Use when the user asks to cherry-pick or backport a commit or PR to a release branch.
verification-protocols
Standard verification pipeline to execute after modifying C++ source or header files. Use this skill to format includes, build the engine, and run core tests.
preprocessor-guard-hygiene
Enforce preprocessor guard rules and macro-dependent inclusion hygiene in C++. Use this skill when modifying conditional imports or preprocessor directives.
header-self-containment
Enforce strict header self-containment so that every header file compiles independently. Use this skill when creating or modifying C++ header files.