mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 09:45:19 +08:00
Modify add global exception catch for Xposed entry method and change some exception note in YukiHookBridge, YukiBridgeFactory
This commit is contained in:
@@ -35,6 +35,7 @@ import com.highcapable.yukihookapi.annotation.YukiGenerateApi
|
|||||||
import com.highcapable.yukihookapi.hook.factory.classOf
|
import com.highcapable.yukihookapi.hook.factory.classOf
|
||||||
import com.highcapable.yukihookapi.hook.factory.field
|
import com.highcapable.yukihookapi.hook.factory.field
|
||||||
import com.highcapable.yukihookapi.hook.factory.hasClass
|
import com.highcapable.yukihookapi.hook.factory.hasClass
|
||||||
|
import com.highcapable.yukihookapi.hook.log.yLoggerE
|
||||||
import com.highcapable.yukihookapi.hook.param.PackageParam
|
import com.highcapable.yukihookapi.hook.param.PackageParam
|
||||||
import com.highcapable.yukihookapi.hook.param.type.HookEntryType
|
import com.highcapable.yukihookapi.hook.param.type.HookEntryType
|
||||||
import com.highcapable.yukihookapi.hook.param.wrapper.PackageParamWrapper
|
import com.highcapable.yukihookapi.hook.param.wrapper.PackageParamWrapper
|
||||||
@@ -263,11 +264,13 @@ object YukiHookBridge {
|
|||||||
else null
|
else null
|
||||||
else -> null
|
else -> null
|
||||||
}?.also {
|
}?.also {
|
||||||
if (it.isCorrectProcess) YukiHookAPI.onXposedLoaded(it)
|
runCatching {
|
||||||
if (it.type != HookEntryType.ZYGOTE && it.packageName == modulePackageName)
|
if (it.isCorrectProcess) YukiHookAPI.onXposedLoaded(it)
|
||||||
AppParasitics.hookModuleAppRelated(it.appClassLoader, it.type)
|
if (it.type != HookEntryType.ZYGOTE && it.packageName == modulePackageName)
|
||||||
if (it.type == HookEntryType.PACKAGE) AppParasitics.registerToAppLifecycle(it.packageName)
|
AppParasitics.hookModuleAppRelated(it.appClassLoader, it.type)
|
||||||
if (it.type == HookEntryType.RESOURCES) isSupportResourcesHook = true
|
if (it.type == HookEntryType.PACKAGE) AppParasitics.registerToAppLifecycle(it.packageName)
|
||||||
|
if (it.type == HookEntryType.RESOURCES) isSupportResourcesHook = true
|
||||||
|
}.onFailure { yLoggerE(msg = "An exception occurred in the Hooking Process of YukiHookAPI", e = it) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -91,7 +91,7 @@ internal object YukiHookHelper {
|
|||||||
else -> error("Unexpected BaseFinder result interface type")
|
else -> error("Unexpected BaseFinder result interface type")
|
||||||
}
|
}
|
||||||
hookMember(member, callback)
|
hookMember(member, callback)
|
||||||
}.onFailure { yLoggerE(msg = "Hooking Process exception occurred", e = it) }.getOrNull() ?: Pair(null, false)
|
}.onFailure { yLoggerE(msg = "An exception occurred when hooking internal function", e = it) }.getOrNull() ?: Pair(null, false)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hook [Member]
|
* Hook [Member]
|
||||||
|
Reference in New Issue
Block a user