INNER CODE UNIT · Kotlin

onPackageReady

NexAlloy/NexAlloy · app/src/main/java/io/github/nexalloy/MainHook.kt:32

    override fun onPackageReady(param: PackageReadyParam) {
        if (!param.isFirstPackage) return
        if (!shouldHook(param.packageName)) return
        this.param = param

        inContext(param) { app ->
            this.app = app
            if (isReVancedPatched(param)) {
                Utils.showToastLong("NexAlloy module does not work with patched app")
                return@inContext
            }

            resourceMappings = object : ResourceFinder {
                override operator fun get(type: String, name: String): Int {
                    val id = ResourceUtils.getIdentifier(ResourceType.fromValue(type), name)
                    if (id == 0) throw Exception("Could not find resource type: $type name: $name")
                    return id
                }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…