How script-sage/pixelify works
1. What this repo is
- Pixelify is a Magisk module that modifies an Android system at boot to make non-Pixel devices behave like Pixels and unlock Pixel-only features.
- The repository is split into three main parts: the Magisk module payload, a Riru native hook, and a Zygisk native hook.
2. Build and packaging layer
- Root Gradle files (build.gradle, module.gradle, settings.gradle) coordinate the module and native components.
- The module/ directory is the flashable Magisk package layout, including META-INF installer metadata, shell scripts, property files, and bundled assets.
- module/build.sh appears to assemble the distributable module ZIP from these pieces.
3. Install-time control plane
- The install flow is driven by shell scripts in module/: customize.sh, pixelify.sh, utils.sh, vars.sh, and service.sh.
- module.prop, system.prop, spoof.prop, var.prop, and config.prop define module metadata, system property overrides, spoofing targets, and feature toggles.
- sepolicy.rule extends SELinux permissions so the module can touch system components that normal apps cannot.
4. Boot/runtime behavior
- service.sh is the main boot-time entrypoint for applying changes after Android starts.
- service-uninstaller.sh and uninstall.sh handle cleanup and rollback.
- module-uninstaller.prop and module-deviceconfig.txt suggest the module maintains state about what was installed and which device profile was selected.
5. Static system content bundled into the module
- module/files/ contains the actual payloads Pixelify installs or mounts into the system view: APKs, boot animations, overlays, firmware descriptors, audio files, and tar archives.
- Examples include Pixel Launcher and Pixel UI-related APKs, Device Personalization/Google app support pieces, bootanimation archives, and call-recording voice prompts.
- module/extras/ contains optional feature packs such as Hotword and Now Playing resources.
6. System overlay and privileged app model
- The repo ships prebuilt overlays and privileged-app content under paths that mirror /system, /product, and /system_ext.
- This is how Pixel UI features are enabled without shipping a full ROM: the module injects overlay APKs, priv-app APKs, XML permissions, and sysconfig whitelist files into the system namespace.
- The “hotword” and “now playing” extras are especially structured around system permissions and privileged placement.
7. Native runtime spoofing layer
- riru/ and zygisk/ are separate native modules that hook into the Android process runtime through Magisk’s two supported injection mechanisms.
- Both contain C++ code and CMake build files; the Zygisk side uses pixelify.cpp, module.h, and shared logic in tensor.cpp / tensor_2.cpp.
- This layer is responsible for targeted spoofing and dynamic behavior changes inside Google apps rather than globally altering every app.
8. How the data flows
- At install time, the module copies or mounts system-facing assets and records configuration.
- At boot, shell services apply properties, set up permissions, and stage files.
- When Google apps launch, the Riru/Zygisk hooks selectively spoof device identity or feature flags so only those target packages see Pixel-like signals.
- That targeted approach is important: the module tries to avoid breaking the rest of the OS by scoping spoofing mostly to Google components.
9. External app and service boundaries
- The main external dependencies are Google Play services, Google app, Google Photos, Google Dialer, Android System Intelligence, Pixel Launcher, and related Google packages.
- The README shows many features depend on Google-side downloads or account-state behavior, so the module’s behavior is partly gated by network fetches and Google app updates.
- Some features also depend on Android version, device kernel support, or ROM-specific compatibility.
10. Support tooling inside the repo
- module/addon/ includes helper binaries such as aapt, curl, dumpsys, keycheck, and sqlite3.
- These utilities imply the install scripts inspect APK metadata, query system state, download assets, and patch or validate settings/databases during installation.
- This makes the module more than a simple file copier; it behaves like an installer/orchestrator.
11. Feature submodules and optionality
- The README describes optional submodules for Call Screening, Now Playing, Google Hotword, Unlimited Photos Backup, and Google Bootanimation.
- The architecture supports selective installation, which is reflected in the presence of separate extras, config files, and the “no volume keys” install path.
- That modularity is a key diagram boundary: not all features are always present in one boot path.
12. Operational logging and recovery
- The module writes logs and flags to /sdcard/Pixelify/ according to the README, including flag logs and bootloop-related diagnostics.
- This indicates a built-in troubleshooting path: install scripts and runtime logic can surface failures without requiring a full ROM flash.
- The repo also contains an uninstaller path and recovery-oriented logic, which matters because many features are applied system-wide and need safe rollback.
Main entry points: module Module layout · service.sh Boot service · files System payloads · pixelify.cpp Zygisk hook
Components 18
Build & packaging
Gradle and packaging entry points that assemble the Magisk module and native hooks.
- Gradle files · Top-level Gradle entry points that coordinate module and native builds.
build.gradle - Module build · Module-specific Gradle configuration for the flashable package.
module.gradle - Settings · Gradle project settings and included components.
settings.gradle
Magisk module
Flashable module layout, install scripts, properties, and bundled system-facing payloads.
- Module layout · Flashable Magisk module directory that carries installers, properties, scripts, and payloads.
module - Installer scripts · Install-time logic and boot-time orchestration for setup, tuning, and cleanup.
module/customize.sh - Boot service · Main post-boot script that applies module changes on device startup.
module/service.sh - Rollback path · Uninstall and service cleanup logic for removing module changes safely.
module/uninstall.sh - Module props · Metadata, property overrides, spoof targets, toggles, and install state files.
module/module.prop - SELinux rule · Extra SELinux permissions required for system-level modification.
module/sepolicy.rule - System payloads · Representative system-facing APKs, overlays, archives, and media injected by the module.
module/files - Helper tools · Bundled binaries used by scripts for inspection, downloads, validation, and database work.
module/addon
Runtime hooks
Native injection layers that spoof behavior inside selected Google processes.
- Riru hook · Riru-based native process hook for targeted spoofing in app processes.
riru/src/main/cpp/main.cpp - Zygisk hook · Zygisk-based native hook with shared spoofing logic for injected Google apps.
zygisk/src/main/cpp/pixelify.cpp - Shared spoofing · Common runtime logic used by both native hook implementations.
zygisk/src/main/cpp/tensor.cpp - Target rules · Secondary runtime logic for package-specific spoofing decisions.
zygisk/src/main/cpp/tensor_2.cpp
Feature packs
Optional bundled feature sets and privileged assets for specific Pixel capabilities.
- Hotword pack · Optional privileged hotword enrollment assets and permissions.
module/extras/hotword - Hotword pack 9 · Android 9-specific hotword enrollment package set.
module/extras/hotword-9 - Now Playing · Now Playing overlay and firmware descriptors for music detection.
module/extras/nplaying
Connections 25
- Gradle files → Module build: builds · Top-level build coordinates module packaging.
- Gradle files → Settings: includes · Project settings define the build graph.
- Module build → Module layout: packages · Module build assembles the flashable payload.
- Module layout → Installer scripts: contains · Module layout includes install-time scripts.
- Module layout → Boot service: contains · Boot service is shipped inside the module.
- Module layout → Rollback path: contains · Rollback scripts are part of the shipped module.
- Module layout → Module props: defines · Metadata and property files configure module behavior.
- Module layout → SELinux rule: extends · SELinux rules widen system access for the module.
- Module layout → System payloads: ships · Representative system-facing assets are bundled for mounting or copy-in.
- Module layout → Helper tools: uses · Helper binaries support installation and validation.
- Module layout → Hotword pack: optionally includes · Hotword feature pack can be installed separately.
- Module layout → Hotword pack 9: optionally includes · Android 9 hotword variant is packaged separately.
- Module layout → Now Playing: optionally includes · Now Playing resources are bundled as an optional pack.
- Installer scripts → Helper tools: invokes · Scripts call helper binaries during install-time orchestration.
- Boot service → Module props: reads · Boot service applies module configuration and state.
- Boot service → System payloads: mounts · Boot-time logic stages bundled assets into the system view.
- Rollback path → System payloads: removes · Cleanup path rolls back shipped assets.
- Zygisk hook → Shared spoofing: shares · Zygisk hook uses common spoofing logic.
- Zygisk hook → Target rules: shares · Zygisk hook uses target-selection logic.
- Riru hook → Shared spoofing: reuses · Riru hook shares runtime spoofing behavior.
- Shared spoofing → Target rules: coordinates · Shared logic delegates to package-specific rules.
- Zygisk hook → Boot service: complements · Native hooks work alongside boot-time module setup.
- Riru hook → Boot service: complements · Riru hook complements the shell-based control plane.
- Hotword pack → System payloads: adds · Optional pack contributes privileged APKs and permissions.
- Now Playing → System payloads: adds · Now Playing pack contributes overlay and firmware files.