Skip to content

Flutter app setup (proxy & TLS)

Flutter often doesn’t respect the system proxy and certificates.

  • Copy the app from /data/app/XXXXX using adb pull /data/app/XXXXX
  • If the APKs are split, merge them
    • You can use mergeapks.py or apktool directly (see unpack_apk and pack_apk methods in the python script)
    • python3 mergeapks.py base.apk split_config.en.apk split_config.x86_64.apk split_config.xxhdpi.apk
  • Run reFlutter on the APK containing libflutter.so
    • docker run --rm -it -v ${PWD}:/myfiles python:3.12 /bin/bash
    • pip3 install pipx && pipx install reflutter
    • /root/.local/bin/reflutter /myfiles/base.apk
  • Sign using uber-apk-signer
  • Install the new signed APK using adb install your.apk