reFlutter

Flutter Reverse Engineering Framework
reFlutter logo

ReFlutter: A Tool for Flutter Binary Analysis


Overview

ReFlutter is a powerful tool designed specifically for analyzing and modifying Flutter binary code. It enables you to inspect and manipulate the underlying bytecode, allowing for deeper understanding and manipulation of your app's behavior.


Features


Code Offsets

ReFlutter provides detailed information about the absolute code offsets for specific functions, helping you pinpoint areas of interest within the binary code.


Function Calls

The tool allows you to view the call graph of functions, displaying their interactions and dependencies. This feature helps identify complex relationships between code segments.


Usage on iOS

To utilize ReFlutter, simply run the reflutter main.ipa command, which will generate an IPA file containing the analyzed binary code. You can then inspect the output in XCode's console logs with the reflutter tag.


To Do

  • Display absolute code offsets for functions.
  • Extract more strings and fields.
  • Add socket patch.
  • Extend engine support to Debug using Fork and Github Actions.
  • Improve detection of App.framework and libapp.so inside zip archive.

Build Engine

ReFlutter's engines are built using a combination of reFlutter and Github Actions, leveraging commits and snapshot hashes from the table. The hash of the snapshot is extracted from the Google Cloud Storage URL.


Custom Build

For custom patches or manual Flutter code changes, ReFlutter supports Docker-based builds, allowing for more flexibility in your development workflow.

sudo docker pull ptswarm/reflutter

# Linux, Windows
EXAMPLE BUILD ANDROID ARM64:
    sudo docker run  -e WAIT=300  -e x64=0  -e arm=0  -e HASH_PATCH=<Snapshot_Hash>  -e COMMIT=<Engine_commit>  --rm  -iv${PWD}:/t ptswarm/reflutter

Flags

  • -e x64=0: Disable building for x64 architecture.
  • -e arm=0: Disable building for ARM architecture.
  • -e WAIT=300: Set the time in seconds for editing source code.
  • -e HASH_PATCH=<Snapshot_Hash>: Specify the snapshot hash matching the engine commit line of enginehash.csv table.
  • -e COMMIT=<Engine_commit>: Specify the engine commit for your desired version, taken from enginehash.csv table or Flutter/Engine repo.




> Visit reFlutter Website <