You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: install addons as Magisk modules when root is active (#51)
When ROOT_SETUP is enabled, finish the Magisk install inline so the
addon installs land as proper Magisk modules instead of direct /system
pushes. Reproduces what the Magisk app does on first launch (the
"additional setup" prompt) without requiring a manual tap.
install_root now:
- Calls adb root first (the previous omission silently failed all
writes into /data/adb/ as the shell user)
- After rootAVD patches the ramdisk, extracts Magisk.zip's lib/x86_64/
and assets/ and stages them into /data/adb/magisk/, renaming
lib<name>.so -> <name> and dropping bootctl/main.jar/installer scripts
— same layout the Magisk updater-script produces
install_gapps and install_arm_translation gain a parallel
_magisk_module path that writes the payload under
/data/adb/modules/<id>/system/, plus a module.prop and (for ARM) a
system.prop with the ABI / native-bridge properties and a
post-fs-data.sh that registers binfmt_misc (init.rc files injected via
Magisk overlay aren't parsed by init).
magisk_active() checks for the magiskinit binary rather than just the
/data/adb/magisk directory, since the rootAVD-patched ramdisk creates
that directory empty and the old check returned a false positive.
The main flow now calls install_root before install_gapps and
install_arm_translation so the latter two see a populated Magisk env
and take the module path automatically.
Verified end-to-end on a fresh AVD with ROOT_SETUP=GAPPS_SETUP=
ARM_TRANSLATION=1: /data/adb/magisk/ ends up populated, modules
created under /data/adb/modules/{gapps,ndk_translation}, ABI list
advertises arm64-v8a,armeabi-v7a,armeabi, Google services visible at
/system/priv-app/ via Magisk's overlay, and an arm64-v8a-only APK
(v2rayNG) installs and launches.
0 commit comments