一键导入
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.
菜单
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.
Guidelines and SOP for synchronizing public C++ API changes (methods, enums, options structs) to Java (Android JNI) and JavaScript/TypeScript (Web/WASM Embind).
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.
Enforce the strict topological header inclusion layering and reordering rules in Filament. Use this skill when adding or modifying `#include` directives in C++ source or header files.
Enforce C++ static thread safety annotations and correct synchronization primitives. Use this skill when designing multi-threaded classes or editing guarded member fields.
Clean and build Filament targets for development, debugging, and production. Use this skill whenever you need to clean the workspace or compile desktop targets.
Execute unit tests and performance benchmarks for Filament on desktop platforms. Use this skill to run and filter tests or benchmarks locally.
| 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. |
This skill details the procedures for compiling binaries for Android, installing them onto a physical device or emulator, and running tests and benchmarks.
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 desktop release
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/.
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}
When running performance benchmarks on Android devices, always conform to the following formatting rules:
--benchmark_counters_tabular)--benchmark_color=true)ms or us, rarely ns):adb shell LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/{executable} --benchmark_counters_tabular --benchmark_color=true --benchmark_time_unit=ms