Build Flutter runtime payload
synthesize_flutter_payloadCompile a Flutter source project into platform-specific native libraries and assets, enabling authorized injection into Android APKs for security testing.
Instructions
Compile a source Flutter project into platform native libraries (libflutter.so, libapp.so) and flutter_assets partitioned by target Android ABIs. Invokes the local Flutter CLI, writes compiled artifacts to outputDir (or system temp if omitted), and overwrites existing destination files; requires flutterProjectPath containing pubspec.yaml. Set targetAbis to match the target APK architectures discovered via analyze_injection_surface, choose buildMode ('release' for AOT production, 'debug' for JIT), and forward the emitted payloadDir to inject_flutter_runtime_and_smali.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| buildMode | No | Flutter build mode target: 'release' (AOT production build), 'profile' (AOT performance build), 'debug' (JIT build) | release |
| outputDir | No | Optional custom directory path to write synthesized payload artifacts (defaults to system temp dir) | |
| targetAbis | No | Target native CPU architectures to build payload binaries for (default: ['arm64-v8a', 'armeabi-v7a']) | |
| flutterProjectPath | Yes | Path to source Flutter project root containing pubspec.yaml and lib/main.dart |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| abis | Yes | ABIs successfully emitted into the payload. | |
| files | Yes | Payload-relative artifact paths grouped by type. | |
| warnings | Yes | Build or artifact-completeness warnings. | |
| buildMode | Yes | Flutter build mode used. | |
| payloadDir | Yes | Absolute directory containing synthesized payload artifacts. | |
| appSizeBytes | Yes | Extracted libapp.so size, when available. | |
| engineVersion | Yes | Detected Flutter engine/version identifier, when available. |