English | δΈζ
This project enables running Linux containers (Docker, Podman, etc.) natively on Android devices by building a Docker-enabled kernel. It supports cross-architecture container migration from x86 to ARM64 and provides a complete containerization solution for Android.
- Docker-enabled Android kernel for Redmi K20 Pro (raphael)
- Automated kernel build system with patch management
- Container runtime support built into the kernel
- Cross-architecture migration capabilities using CRIU
- Comprehensive tooling for kernel configuration and patching
- Complete Android ROM/firmware
- Android system apps or framework modifications
- Bootloader or recovery modifications
- PixelExperience (PE) - Official target ROM (CONFIG_LOCALVERSION="-F1xy-0.19-pe")
- LineageOS - High compatibility
- crDroid - AOSP-based, should work
- Resurrection Remix - AOSP-based
- Havoc OS - AOSP-based
- Pure AOSP - Maximum compatibility
- MIUI - Heavily modified, may require significant changes
- Other heavily customized ROMs
- Support for custom kernels
- Standard Android kernel interfaces
- Built for Redmi K20 Pro (raphael) device
- Android 10/11 era compatibility
Target Device: Redmi K20 Pro (raphael) - Android 10/11 era
# Complete automated setup and build
./setup_and_build_ubuntu.sh
# Or if dependencies are already installed
./build_kernel_ubuntu.sh# Manual build (install dependencies first)
./build_docker_kernel.sh# Install dependencies first
brew install binutils aarch64-elf-binutils android-ndk
# Then build
./build_docker_kernel.shπ Detailed guides: Ubuntu Build Guide | macOS Guide
βββ 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
βββ kernel_build/ # π Automated kernel build system
β βββ config/ # Kernel configuration management
β βββ patch/ # Patch application system
β βββ scripts/ # Command-line tools
β βββ tests/ # Test suites
β βββ utils/ # Utility functions
βββ pixel-OS/ # PixelExperience build instructions
βββ README.md
βββ README_CN.md
# Apply all patches and modifications in one command
python kernel_build/scripts/patch_integration.py apply-all
# Check comprehensive status
python kernel_build/scripts/patch_integration.py status
# Rollback everything if needed
python kernel_build/scripts/patch_integration.py rollback-all# Apply Docker-required kernel configurations
python kernel_build/scripts/config_tool.py apply files/raphael_defconfig
# Validate configuration
python kernel_build/scripts/config_tool.py validate
# Export final configuration
python kernel_build/scripts/config_tool.py export# Apply kernel patches
python kernel_build/scripts/patch_tool.py apply files/kernel.diff files/aosp.diff
# Modify cpuset.c for Docker compatibility
python kernel_build/scripts/cpuset_tool.py modify
# Verify patches
python kernel_build/scripts/patch_tool.py verify files/kernel.diff- Docker-required kernel patches from
files/kernel.diff - AOSP integration patches from
files/aosp.diff - Cpuset.c modifications for Docker compatibility
- Conflict detection and resolution
- Automatic backup and rollback
- Kernel config validation and merging
- Docker-required options verification
- Configuration export and reporting
- Custom configuration support
- Patch verification and integrity checks
- Configuration validation tests
- Build system integration tests
- Rollback functionality tests
- Comprehensive log analysis for kernel and Docker issues
- Network debugging utilities for container connectivity
- Storage debugging tools for overlay filesystem issues
- System health monitoring and diagnostics
- Automated issue detection and recommendations
- 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
- Run automated kernel build:
python kernel_build/scripts/patch_integration.py apply-all - Compile kernel with your preferred AOSP build system
- Flash kernel to your K20 Pro device
- Install Docker binaries from the
docker/directory - Configure runtime environment using
files/dockerd.sh - Test container functionality
# Run complete system diagnostics
python kernel_build/scripts/debug_toolkit.py
# Analyze system logs for issues
python kernel_build/scripts/log_analyzer.py --hours 24
# Debug network connectivity
python kernel_build/scripts/network_debugger.py
# Check storage and overlay filesystem
python kernel_build/scripts/storage_debugger.py# System monitoring and health check
python kernel_build/scripts/system_monitor.py --health-check
# Docker daemon status and diagnostics
python kernel_build/scripts/docker_health_monitor.py
# Container runtime diagnostics
python kernel_build/scripts/container_diagnostics.py- Automated error pattern detection in system logs
- Kernel panic and error analysis
- Docker daemon issue identification
- Network connectivity problem diagnosis
- Storage and filesystem error detection
- Comprehensive reporting with recommendations
- Kernel Only: This project builds a Docker-enabled kernel, not a complete ROM
- ROM Compatibility: Designed for PixelExperience, compatible with most AOSP-based ROMs
- Device Specific: Only for Redmi K20 Pro (raphael) device
- Manual Kernel Modification: If you prefer manual modification, refer to the diff files in the
files/directory
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.




