How to compile and install KernelSU and Docker into a custom Android Studio Android Virtual Device Android Emulator (codename "goldfish")
Likely requirements:
- Docker
- Ability to run QEMU/KVM outside of Docker
- 16 core 64-bit CPU
- 160 GB RAM + Swap
- 4 TB storage
- 250 Mbps
- 48 hours
docker build --output=. .
tar xf goldfish.tar.gz
export PATH="$(pwd)/linux-x86_64:$PATH"
export ANDROID_BUILD_TOP="$(pwd)"
export ANDROID_PRODUCT_OUT="$(pwd)/emu64x"
emulator -grpc 8554 -show-kernel -verbose# separate terminal
curl -O -L https://github.com/tiann/KernelSU/releases/download/v3.2.5/KernelSU_v3.2.5_32525-release.apk
adb install KernelSU_v3.2.5_32525-release.apk
curl -O -L https://f-droid.org/F-Droid.apk
adb install F-Droid.apk(Usually, I use SSH to connect to Termux. This is not explained here because advanced SSH use requires its own tutorial that would go completely off topic.)
pkg upgrade
pkg install root-repo sudo
pkg install docker
sudo dockerd --iptables=false# separate terminal
sudo docker run -it --net=host debian