> The ritual to compile, pack and flash super.img into the device is absurd.
I typically only do a full flash for the first build after a sync. Afterwards I just build the pieces I'm changing and use `adb sync` to push them to the device, skipping both the step that packs the image files and the flash. The `sync` target will build just the pieces needed for an `adb sync` if you don't know exactly what you need to build; I typically use it so I don't have to even think about which pieces I'm changing when rebuilding.
So typical flow goes something like:
```
// Rebase is only needed if I have existing local changes
> repo sync -j12 && repo rebase
// I don't actually use flashall, we have a tool internally that also handles bootloader upgrades, etc.
> m -j && fastboot flashall
// Hack hack hack... then:
> m -j sync && syncrestart
```
Where `syncrestart` is an alias for:
```
syncrestart () {
adb remount && adb shell stop && sleep 3 && adb sync && adb shell start
}
```
Incremental compiles while working on native code are ~10 seconds with this method. Working on framework Java code can be a couple minutes still because of the need to run metalava.