Since my last post about android I've updated the system image I've built and added a few tools to make things easier. I've added sshfs to mount a remote webhost - I've also added upx to pack (and compress) binaries - and reduced the size of the overlay significantly. I've also replaced the APK decompiler with jadx because it just works a lot better. This leaves me with a lot more free space on the device that I can maybe use for tools later. For now though - having java, PHP, perl, python, c/c++ and various filesystem tools and a bunch of webservers on my android phone is enough. I've also added a few little bash scripts like "7zip" which uses the command 7za with optimal settings for this phone to compress large files or directories.
You can find an archive of the binaries I've used in this overlay, and a complete system image below. This image was uploaded from my phone using the "scp" command - and zipped using the 7zip bash script.
Edit: I've also added fastboot, adb undark zipalign and simg2img so it's now possible to actually flash another phone with an USB-C cable - and to modify firmware images while staying on the device itself. Since I'm now done with this image I don't expect I will be updating these tools any time soon ( because It's a bit of work ) this means trading some security for convenience. For the next phone/project I'd probably use the binary packages from openWRT: https://downloads.openwrt.org/releases/19.07.3/packages/aarch64_generic/ . It would be fairly easy to write a script to install these packages to an android system. And the architecture is compatible.