Skip to content

binder: vm — entrypoint.sh boot-time auto-trigger (stealth.rc exec_background) does not fire under the persistent /data mount #113

Description

@Xiddoc

Summary

On the binder: vm micro-VM, stealth.rc's on property:sys.boot_completed=1 → exec_background u:r:magisk:s0 root root -- /system/bin/sh /entrypoint.sh does not fire once redroid's /data is a bind-mount (the persistence fix from #112). The result: none of the boot helpers (magisk-path.shmagisk-config.shmagisk-env.shflash-modules.shactivate-zygisk.sh) run automatically, so Zygisk/denylist/MAGISKBIN/modules are not configured unless you drive them by hand.

Evidence (live TCG VM, Android 14 Magisk image)

  • stealth.rc is present and correct in the image; sys.boot_completed=1 fired (5 boot_completed actions in the serial console).
  • No exec NN (/system/bin/sh /entrypoint.sh) service appears in the QEMU serial console, and no entrypoint markers in logcat — on either the first or second boot.
  • After boot: magisk --sqlite "SELECT * FROM settings" is empty and /data/adb/magisk/util_functions.sh is absent → the entrypoint never configured anything.
  • Manually running the helper chain (with /sbin on PATH) configures everything correctly and persists across reboot.

Contrast: in the #111 verification (no persistence mount) the same image did fire the entrypoint (exec 38 … /entrypoint.sh). So the -v <dir>:/data mount introduced by #112 appears to change init/Magisk timing such that the boot_completed trigger for the u:r:magisk:s0 exec_background is missed or never armed. SELinux is Disabled in redroid, so this is not a context-availability issue.

Why it matters

The declarative modules: flow (and Zygisk activation) is supposed to "just work" on beetroot up. On the VM it currently requires a manual configure step. The redroid binder: host/auto path is unaffected (the host-path container-boot test exercises the entrypoint firing).

Leading hypotheses

  • Magisk overlays/handles init .rc files via its own mechanism; with a bind-mounted /data, magiskd's first-boot setup may complete after sys.boot_completed=1, so the late-installed stealth.rc trigger misses the already-passed property change.
  • redroid's container reboot/boot ordering interacts with the persisted /data (e.g. the pm install magisk.apk first-boot step).

Repro

  1. binder: vm instance on the Magisk image (post-feat(lsposed): first-class LSPosed/Vector recipe, verified running on the TCG VM (#29) #112, persistent /data).
  2. beetroot up <name>, wait for sys.boot_completed=1.
  3. beetroot shell <name> -c 'su 0 /sbin/magisk --sqlite "SELECT * FROM settings"' → empty (expected: zygisk=1).
  4. beetroot logs <name> → no [*] Android boot detected … banner.

Possible fixes to investigate

  • Re-arm the trigger (e.g. on property:sys.boot_completed=1 plus a trigger/on boot fallback), or have a Magisk service (service.sh/post-fs-data.d) launch the entrypoint instead of stealth.rc (cf. Stealth PR4: replace /entrypoint.sh + stealth.rc with a Magisk module #5, "replace /entrypoint.sh + stealth.rc with a Magisk module").
  • Confirm whether the host-path also regresses with a bind-mounted /data (it should not, but worth a check).

Found while verifying #29/#112 (LSPosed on the VM).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions