Skip to content

Harden addon.d overlay install validation (v1.1)#1

Draft
T-vK wants to merge 1 commit into
mModule:masterfrom
T-vK:feature/upstream-install-validation
Draft

Harden addon.d overlay install validation (v1.1)#1
T-vK wants to merge 1 commit into
mModule:masterfrom
T-vK:feature/upstream-install-validation

Conversation

@T-vK

@T-vK T-vK commented Jul 5, 2026

Copy link
Copy Markdown

Summary

Boot-patched Magisk installs do not place 99-magisk.sh into /system/addon.d, which this module overlays systemlessly until the first OTA. The original customize.sh copied Magisk's addon.d script without checking that the source exists or that the copy succeeded, which could leave the module installed in a broken state.

This change:

  • Verifies /data/adb/magisk/addon.d.sh exists before copying (Magisk must be installed first)
  • Aborts module installation if cp fails or the overlay file is missing
  • Documents the Magisk-first install requirement in the README
  • Bumps module version to v1.1 (versionCode 11)

Motivation

Fixes silent failure modes when the module is installed before Magisk, or when the copy step fails for any reason. No change to the overlay mechanism itself.

Notes for maintainer

After merge, a v1.1 GitHub release is needed for the updated mSurvival.json URLs to resolve:

  • MagiskSurvival-v1.1.zip
  • v1.1.md changelog

Test plan

  • Install Magisk via boot patch on an addon.d-capable A/B ROM (e.g. LineageOS)
  • Install this module from zip — should succeed and create overlay at /system/addon.d/99-magisk.sh
  • Attempt module install before Magisk is installed — should fail with a clear message
  • Apply a ROM OTA — Magisk should survive; module can be removed after first OTA per existing README guidance

I will wait for the next LineageOS update in a couple days to properly test this before marking this PR as ready for review.

Verify Magisk's addon.d source exists before copying, abort module
installation when the copy fails, document the Magisk-first install
requirement, and bump module version to v1.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant