MCPcopy Create free account
hub / github.com/caverav/flutterdec / DecompileCmd

Class DecompileCmd

crates/flutterdec-cli/src/main.rs:38–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 flutterdec diff --old ./old.apk --new ./new.apk -o ./out-diff --json
37
38Full reference: https://github.com/caverav/flutterdec/blob/main/docs/cli-reference.md")]
39struct Cli {
40 #[command(subcommand)]
41 command: Command,
42}
43
44#[derive(Subcommand, Debug)]
45enum Command {
46 /// Inspect a target and report snapshot, arch, and adapter status
47 Info(InfoCmd),
48 /// Recover Dart pseudocode from a Flutter AOT snapshot
49 Decompile(DecompileCmd),
50 /// Compare two builds at recovered-function level
51 Diff(DiffCmd),
52 /// Identify the Flutter engine build from an ELF
53 EngineFingerprint(EngineFingerprintCmd),
54 /// Derive engine symbol names from a stripped/unstripped pair
55 MapSymbols(MapSymbolsCmd),
56 /// Manage Dart snapshot adapters
57 Adapter(AdapterCmd),
58}
59
60#[derive(Args, Debug)]
61struct InfoCmd {
62 /// APK or libapp.so to inspect
63 #[arg(value_name = "INPUT")]
64 input: PathBuf,
65 /// Print the full report as JSON instead of plain text
66 #[arg(long)]
67 json: bool,
68 /// Which snapshot adapter backend to use
69 #[arg(long, value_enum, default_value_t = AdapterBackendArg::Auto, value_name = "BACKEND")]
70 adapter_backend: AdapterBackendArg,
71 /// Wall-clock deadline for one adapter invocation, in seconds
72 #[arg(long, value_name = "SECONDS")]
73 adapter_timeout: Option<u64>,
74}
75
76#[derive(Args, Debug)]
77struct DecompileCmd {
78 /// APK or libapp.so to decompile
79 #[arg(value_name = "INPUT")]
80 input: PathBuf,
81 /// Directory to write pseudocode, reports, and artifacts into
82 #[arg(short = 'o', long = "out", value_name = "DIR")]
83 out_dir: PathBuf,
84
85 /// Write per-function ARM64 disassembly to asm/*.s
86 #[arg(long, help_heading = "Emitted artifacts")]
87 emit_asm: bool,
88 /// Prefix asm lines with raw 32-bit opcode words (requires --emit-asm)
89 #[arg(long, help_heading = "Emitted artifacts")]
90 emit_asm_opcodes: bool,
91 /// Write ghidra_apply_symbols.py to apply recovered symbols in Ghidra
92 #[arg(long, help_heading = "Emitted artifacts")]
93 emit_ghidra_script: bool,
94 /// Write ida_apply_symbols.py to apply recovered symbols in IDA
95 #[arg(long, help_heading = "Emitted artifacts")]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected