Android Container
English | δΈζ
This project is used to run Linux containers in Android, such as Docker, Podman, etc. And it can migrate X86-based containers to the Android system to achieve cross-architecture container migration. The project needs to compile the Android source code and modify the kernel source code, so you need to understand AOSP compilation. You can use this project to run a complete container in the Android operating system and be able to use normal container functions.
This project uses the Android smartphone Redmi K20 Pro as the experimental device.
Project Directory
βββ CoClient # Android client, used to manage containers in Android
β
βββ README.md
βββ README_CN.md
βββ backend # Cross-architecture migration backend service program
β βββ README.md
β βββ README_EN.md
β βββ backend.py
β βββ container_migrate.py
β βββ docker-popcorn-notify
β βββ image_migrate.py
β βββ mnt.py
β βββ recode.sh
βββ criu # Use criu module in Android
β
βββ docker # Run Docker container in Android
β βββ README.md
β βββ README_CN.md
β βββ containerd
β βββ containerd-shim
β βββ ctr
β βββ docker
β βββ docker-init
β βββ docker-proxy
β βββ dockerd
β βββ runc
βββ files # Android total cgroup configuration file and docker startup script, diff files.
βΒ Β βββ aosp.diff
βΒ Β βββ cgroups.json
βΒ Β βββ dockerd.sh
βΒ Β βββ kernel.diff
βΒ Β βββ raphael_defconfig
βββ migration # Cross-architecture migration related
βΒ Β βββ README.md
βΒ Β βββ README_CN.md
βΒ Β βββ build-tar-static.sh
βΒ Β βββ tar
βββ picture # effect picture
βΒ Β βββ 1.png
βΒ Β βββ 2.png
βββ pixel-OS # Compile pixel os
βββ README.md
βββ README_CN.md
Step
- Enter the pixel-OS directory and compile the PixelExperience source code.
- Enter the docker directory, modify the Android kernel source code, and port docker to the Android operating system.
- Enter the criu directory, modify the Android kernel source code, and port criu to the Android operating system.
- Enter the migration directory and modify the Android kernel source code so that Android supports cross-architecture migration.
- Enter the backend directory and use the ubuntu back-end service program to conduct cross-architecture migration experiments.
- Enter the CoClient directory and use the Android application to manage the Android container.
note! ! ! If you don't know how to modify the kernel source code, you can refer to the modified kernel configuration file and the diff file generated by modifying the Android kernel source code in the files directory.
Effect
1. The rendering of the container running in Android.
Docker info | hello-world container and criu |
2. The rendering of the criu on android platform, simple looper experiment
3. The rendering of the cross-architecture container migration
On the left is the container in the ubuntu operating system, and on the right is the container in Android. It can be seen that the container in Android continues to run after the container state in ubuntu, achieving the purpose of cross-architecture migration.