-
Notifications
You must be signed in to change notification settings - Fork 26
OS Image Baking
akwin1234 edited this page Jun 20, 2026
·
3 revisions
Baking custom Redroid images ensures that all spoofing libraries, system certificates, and system WebView packages are injected permanently, eliminating startup overhead.
To support dynamic version rotation, Damru uses a unified matrix folder structure inside /home/damru/chrome-apks on the host:
/home/damru/chrome-apks/
βββ 143.0.7499.52/
β βββ base.apk
β βββ split_config.arm64_v8a.apk
β βββ webview.apk
β βββ google_tts.apk
βββ 146.0.7601.121/
β βββ base.apk
β βββ split_config.x86_64.apk
β βββ TrichromeWebView.apk
βββ google_tts.apk (fallback)
- Each Chrome folder must contain a version-aligned WebView provider (e.g.
webview.apkorTrichromeWebView.apk). - The split-APKs must match the architecture of the container (typically
x86_64for WSL2/VPS, orarm64_v8afor ARM-native hardware).
When you run python -m damru bake-image --image damru-redroid:latest, the framework executes the following steps:
- Bootstrap Container: Spins up a vanilla Redroid instance using the base image.
-
Mount & Copy System Assets:
- Mounts the Android system partition as writable.
- Copies
libfakemem.soandlibVkLayer_damru.soto Android system library directories. - Installs
magisk.apkto allow root access management.
-
Configure WebView Provider:
- Replaces the default Android system WebView package (
/system/app/WebView) with the configured APK asset. - Resets folder permissions to
root:root 0644. - Clears Android's
oatanddalvik-cachedirectories to avoid writable-dex security rejections during runtime execution.
- Replaces the default Android system WebView package (
-
Export Clean Layer: Shuts down the container gracefully before calling
docker committo prevent OverlayFS data races.
Once baked, verify image sanity by running:
python -m damru check-envThis inspects the baked image hash to ensure all assets are in place and checks that Chrome can boot successfully.