Dart/Flutter support for radare2
21
stars
232
commits
C
primary language
Sep 8, 2026
updated
r2flutter brings Dart and Flutter AOT awareness to radare2.
It reads the snapshots embedded in release builds and turns their metadata into
useful names, addresses, strings, classes, and references for reverse
engineering. It is available both as the bin/r2flutter command-line tool and
as an r2flutter command inside radare2.
Give it an extracted Android libapp.so, an Android directory containing one,
an iOS .app bundle, or a direct AOT binary. AArch64 is the primary analysis
target. The parser has in-tree layouts for Dart 2.10 through 3.12; see the
support matrix for platform and version details.
--save-obfuscation-map output to restore recovered names.r2flutter is a metadata and analysis aid, not a Dart source-code decompiler. Recovery depends on what survived in the AOT snapshot, so some names and references are necessarily best effort.
You need radare2 6.2.2 or newer (or a git build of 6.2.1), including its
development headers, and r2 must be on PATH. The build obtains the
required flags from r2 -H. Older radare2 versions lack the ic+ attribute
support used to register class metadata and are rejected at compile time.
git clone https://github.com/trufae/r2flutter.git
cd r2flutter
make
The command-line tool is now ready at bin/r2flutter.
To install the radare2 plugin for your user account:
make user-install
For a system-wide command-line tool and plugin, build the plugin first and then use the usual install prefix:
make r2
sudo make install
Start with the snapshot header. It confirms that r2flutter found a Dart AOT image and shows the detected Dart profile:
bin/r2flutter -H path/to/libapp.so
Then try a small, practical extraction:
# Recovered Dart function entrypoints and names
bin/r2flutter -f path/to/libapp.so
# A compact JSON header, useful for scripts
bin/r2flutter -jH path/to/libapp.so
# The first 20 instruction-table entries
bin/r2flutter -l 20 -i path/to/libapp.so
Directory and bundle inputs work too. For example, pass an Android directory
containing libapp.so, or an iOS Runner.app bundle directly.
After make user-install, open the same binary in radare2 and apply the Dart
metadata to the analysis session:
r2 -q path/to/libapp.so
> r2flutter -AAA
> afl~method
-AAA is the Dart-aware analysis pass. For a concise list of every action and
output modifier, run bin/r2flutter -h or r2flutter -h inside radare2.
Released under the MIT license.
C
68.4%
Objective-C
23.6%
Python
5.4%
JavaScript
1.4%
Dart/Flutter support for radare2
21
stars
232
commits
C
primary language
Sep 8, 2026
updated
r2flutter brings Dart and Flutter AOT awareness to radare2.
It reads the snapshots embedded in release builds and turns their metadata into
useful names, addresses, strings, classes, and references for reverse
engineering. It is available both as the bin/r2flutter command-line tool and
as an r2flutter command inside radare2.
Give it an extracted Android libapp.so, an Android directory containing one,
an iOS .app bundle, or a direct AOT binary. AArch64 is the primary analysis
target. The parser has in-tree layouts for Dart 2.10 through 3.12; see the
support matrix for platform and version details.
--save-obfuscation-map output to restore recovered names.r2flutter is a metadata and analysis aid, not a Dart source-code decompiler. Recovery depends on what survived in the AOT snapshot, so some names and references are necessarily best effort.
You need radare2 6.2.2 or newer (or a git build of 6.2.1), including its
development headers, and r2 must be on PATH. The build obtains the
required flags from r2 -H. Older radare2 versions lack the ic+ attribute
support used to register class metadata and are rejected at compile time.
git clone https://github.com/trufae/r2flutter.git
cd r2flutter
make
The command-line tool is now ready at bin/r2flutter.
To install the radare2 plugin for your user account:
make user-install
For a system-wide command-line tool and plugin, build the plugin first and then use the usual install prefix:
make r2
sudo make install
Start with the snapshot header. It confirms that r2flutter found a Dart AOT image and shows the detected Dart profile:
bin/r2flutter -H path/to/libapp.so
Then try a small, practical extraction:
# Recovered Dart function entrypoints and names
bin/r2flutter -f path/to/libapp.so
# A compact JSON header, useful for scripts
bin/r2flutter -jH path/to/libapp.so
# The first 20 instruction-table entries
bin/r2flutter -l 20 -i path/to/libapp.so
Directory and bundle inputs work too. For example, pass an Android directory
containing libapp.so, or an iOS Runner.app bundle directly.
After make user-install, open the same binary in radare2 and apply the Dart
metadata to the analysis session:
r2 -q path/to/libapp.so
> r2flutter -AAA
> afl~method
-AAA is the Dart-aware analysis pass. For a concise list of every action and
output modifier, run bin/r2flutter -h or r2flutter -h inside radare2.
Released under the MIT license.
C
68.4%
Objective-C
23.6%
Python
5.4%
JavaScript
1.4%