chore: bake rootAVD and use tar.gz storage for addon payloads#52
Merged
Conversation
Drop the runtime `git clone https://gitlab.com/newbit/rootAVD.git` (the last remaining external download for the rooting flow). The rootAVD repo (rootAVD.sh + bundled Magisk.zip) is now downloaded as a tarball at image build time. While at it, switch the existing ndk_translation bake to the same shape so both addons store their upstream tar.gz verbatim at /opt/<name>.tar.gz instead of pre-extracted trees. install_root, install_arm_translation, and install_gapps all extract their payload into /tmp/<name>/ at the top of the install, work from there, and clean up at the end — same pattern across the three. Why: - No runtime gitlab.com dependency for rooting (previously 84.7 MB git clone with full history, now a ~12 MB tar.gz baked at build time). - ~26 MB smaller image disk footprint after pull (the upstream tar.gz files are still LZMA/gzip-compressed in /opt; we only pay decompression on install). - Lazy work: an addon that isn't enabled never gets extracted. - Symmetric layout — install_root, install_arm_translation, and install_gapps all stage under /tmp/<name>/ now. Verified end-to-end on a fresh AVD with ROOT_SETUP=GAPPS_SETUP= ARM_TRANSLATION=1: all four markers land, /data/adb/modules/ contains gapps and ndk_translation, ABI list advertises arm64-v8a, Google services visible at /system/priv-app/ via Magisk overlay, and an arm64-v8a-only APK installs cleanly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drops the runtime
git clone https://gitlab.com/newbit/rootAVD.gitfrominstall_root— the last external download in the rooting flow. While at it, switchesndk_translationfrom pre-extracted to the same shape so both addons store their upstreamtar.gzverbatim at/opt/<name>.tar.gzand the install code extracts on demand.Changes
Dockerfile
wget + tar -xzf -C /opt/ndk-translationwith justwget -q -O /opt/ndk-translation.tar.gz— no build-time extraction.wget -q -O /opt/rootavd.tar.gzfromgitlab.com/newbit/rootAVD.first-boot.sh
install_root: dropgit clone, extract/opt/rootavd.tar.gzto/tmp/rootavdwith--strip-components=1,pushd /tmp/rootavd, run rootAVD.sh + Magisk env bootstrap there,rm -rf /tmp/rootavdat the end.install_arm_translationwrapper: extract/opt/ndk-translation.tar.gzto/tmp/ndk-translation(with--strip-components=2 --wildcards '*/prebuilts/*'to flatten the github archive structure), call the appropriate_systemor_magisk_modulebranch, clean up.install_gapps: stage under/tmp/gapps/instead of cwd-relativegapps-11/— same pattern as the other two.install_arm_translation_{system,magisk_module}andinstall_gapps_{system,magisk_module}now reference/tmp/<name>/...consistently.Result
gitlab.comdependency for rooting (previously a full-historygit clone~84.7 MB → now a build-time ~12 MBtar.gz, Docker-layer-cached)./optholds compressed.tar.gzinstead of decompressed trees).install_root,install_arm_translation, andinstall_gappsall stage their payload under/tmp/<name>/.Verified
Fresh tmp data dir,
ROOT_SETUP=GAPPS_SETUP=ARM_TRANSLATION=1:/data/adb/modules/containsgapps+ndk_translationadb shell getprop ro.product.cpu.abilist→x86_64,x86,arm64-v8a,armeabi-v7a,armeabi/system/priv-app/(via Magisk overlay)adb install /extras/v2rayNG_2.1.7_arm64-v8a.apk→ Success