For the past few months I've been building a Flutter IDE that runs on an Android phone. The Flutter SDK, the Dart VM, a JDK and Gradle all run on the phone itself, and the APK comes out of the phone too.
It's called Utakata Studio Mobile IDE, and it just went into open testing on Google Play. This post is about the part I found most interesting to solve: getting a toolchain that was written for desktop Linux, macOS and Windows to run on Android.
A Flutter SDK is mostly data
The first thing that made this feel possible was looking at what a Flutter SDK actually contains. Most of it doesn't care which OS it runs on:
the framework itself is Dart source,
flutter_tools ships as a kernel snapshot,
the VM snapshots, ICU data, the patched SDK and sky_engine are plain files.
What does care are the host binaries.…