Skip to content

vova7878/ZygoteLoader

Repository files navigation

Zygote Loader

A library for building Java only Zygisk modules.

Getting Start

  1. Add jitpack repository to settings.gradle
pluginManagement {
    repositories {
        // ... other repositories 
        maven { url 'https://jitpack.io' }
    }
}
dependencyResolutionManagement {
    repositories {
        // ... other repositories 
        maven { url 'https://jitpack.io' }
    }
}
  1. Add an android application module and create entrypoint
class Entrypoint {
    // ZygoteLoader will invoke this method after injected to target process
    public static void main() {
        // ... your code
    }
}
  1. Apply com.github.vova7878.ZygoteLoader plugin
plugins {
    id "com.android.application" // required
    id "com.github.vova7878.ZygoteLoader" version "<commit>" // apply plugin
    // ... other plugins
}
  1. Configure your module properties
zygisk {
    // inject to system_server
    packages(ZygoteLoader.PACKAGE_SYSTEM_SERVER)

    // module properties
    id = "your module id"
    name = "your module name"
    author = "your name"
    description = "your module description"
    entrypoint = "your entrypoint class qualified name" // see also step 2
    archiveName = "generated zip archive name" // optional
    updateJson = "your updateJson property" // optional, see also https://topjohnwu.github.io/Magisk/guides.html#moduleprop
}
  1. Build module

    1. Run gradle task <module>:assembleRelease

    2. Pick generated zip from <module>/build/outputs/magisk

Examples