This PR changes the format check on CI to use the command added in
https://github.com/flutter/engine/pull/50747.
Additionally, while making this change, I noticed that the CI check was
not checking the formatting of all files, and that as a result, files
were present in the repo with incorrect formatting. I have fixed the
formatting and fixed the check to always check all files.
The gradle/android tooling will validate that ANDROID_HOME and
ANDROID_SDK_ROOT are precisely the same. So if they point to the same
directory but are not normalized this check will fail.
Fixes Dart-Flutter Head-Head-Head bot which failed with
```
Several environment variables and/or system properties contain different paths to the SDK.
Please correct and use only one way to inject the SDK location.
ANDROID_HOME: /b/s/w/ir/cache/builder/engine/src/flutter/testing/rules/../../../third_party/android_tools/sdk
ANDROID_SDK_ROOT: /b/s/w/ir/cache/builder/engine/src/third_party/android_tools/sdk
```
Migrates all `#!/usr/bin/env python` hashbang lines to use python3.
Also updates the licence tool to treat python3 scripts on par with
python 2 scripts.
Issue: https://github.com/flutter/flutter/issues/83043
* Reland "Use a Pbuffer surface when the onscreen surface is not available for snapshotting on Android (#27141)" (#27607)"
This reverts commit 78663924741a29aeca10648015e39db6fbd28be4.
* Do not let gradle download SDK deps