Module Lifecycle
From CI packaging to flash time, boot, and clean uninstallation: this document traces the complete lifecycle of the Auriya root module payload.
module/customize.sh, module/service.sh, module/uninstall.sh, and .github/actions/package-module/action.yml.
1. Package (CI / CD)
Section titled “1. Package (CI / CD)”GitHub Actions builds a self-contained, immutable flashable ZIP:
- Compiles
auriyadaemon andauriyactlCLI foraarch64-linux-androidwith full symbol stripping. - Compiles
auriya-app.apk(Jetpack Compose manager app) via./gradlew :app:assembleRelease. - Packages files into
build/release/module/:module.prop(populated with release version and commit hash).icon.png(192x192 module icon for KernelSU / Magisk / APatch).service.sh,customize.sh,action.sh,uninstall.sh.settings.toml,gamelist.toml.libs/aarch64/(auriya,auriyactl,checksums.sha256).libs/app/(auriya-app.apk).
- Strips
.placeholderfiles and compresses the archive using 7-Zip (Deflate -mx=9). - Generates an accompanying
.sha256checksum asset.
The release artifact is named auriya-<version>-<commit-count>-<hash>-release.zip.
2. Extraction (Root Manager)
Section titled “2. Extraction (Root Manager)”When flashed in KernelSU, Magisk, or APatch, the root manager extracts the ZIP archive directly into $MODPATH (/data/adb/modules/auriya).
3. Installation (customize.sh)
Section titled “3. Installation (customize.sh)”Executed during the flashing process:
- Architecture Check: Verifies that
$ARCH == "arm64"; aborts on unsupported architectures. - Integrity Verification: Checks SHA256 checksums of
auriyaandauriyactlagainstchecksums.sha256. - Binary Deployment:
- Copies
auriyato$MODPATH/system/bin/auriya(mode0755). - Copies
auriyactlto$MODPATH/system/bin/auriyactl(mode0755).
- Copies
- Manager App Installation:
- Installs
libs/app/auriya-app.apkdirectly viapm install -r -g.
- Installs
- Staging Cleanup:
- Runs
rm -rf "$MODPATH/libs"to delete the temporary staging directory, leaving zero leftover install files.
- Runs
- Configuration Deployment:
- Creates
/data/adb/.config/auriya/. - Moves default
settings.tomlandgamelist.tomlinto/data/adb/.config/auriya/only if they do not already exist, preserving existing user customizations across updates. - Removes config templates from
$MODPATH.
- Creates
- Root Manager PATH Integration:
- Symlinks
auriyaandauriyactlinto/data/adb/ksu/binand/data/adb/ap/binfor direct shell execution without full paths.
- Symlinks
- Permission Hardening:
- Sets recursive permissions
0755/0644across$MODPATH.
- Sets recursive permissions
4. Boot Startup (service.sh)
Section titled “4. Boot Startup (service.sh)”Executed on every device boot by the root manager’s late-start service trigger:
- Removal Check: Verifies if the module is flagged for removal. If so, triggers
uninstall.shand exits immediately. - Boot Synchronization: Polls
sys.boot_completeduntil Android initialization finishes, followed by a 3-second grace period. - Instance Cleanup: Terminates any lingering
auriyaprocesses and unlinks stale socket files/dev/socket/auriya.sock. - Daemon Launch: Launches the daemon non-blocking in the background:
Terminal window nohup "$AURIYA_BIN" --settings "$SETTINGS_CFG" --gamelist "$GAMELIST_CFG" >/dev/null 2>&1 & - Readiness Probe: Waits up to 5 seconds to verify that
pidof auriyais running and/dev/socket/auriya.sockis open and responsive.
5. Uninstallation (uninstall.sh)
Section titled “5. Uninstallation (uninstall.sh)”Executed when the module is deleted from the root manager:
- Stops the
auriyadaemon process gracefully (SIGTERM, escalating toSIGKILLif unresponsive). - Force-stops and uninstalls
dev.auriya.appviapm uninstall. - Removes
/dev/socket/auriya.sock. - Cleans
/data/adb/.config/auriyaand runtime log directory/data/adb/auriya. - Removes symlinks from
/data/adb/ksu/binand/data/adb/ap/bin.