mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 17:55:24 +08:00
...
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
id 'com.google.devtools.ksp' version '1.6.10-1.0.2'
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -32,12 +33,16 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Used 82 API Version
|
||||
compileOnly 'de.robv.android.xposed:api:82'
|
||||
// Implementation API
|
||||
implementation project(':yukihookapi')
|
||||
ksp project(':yukihookapi-ksp-xposed')
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.1'
|
||||
implementation 'com.google.android.material:material:1.5.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
implementation project(path: ':yukihookapi')
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
|
1
app/src/main/assets/xposed_init
Normal file
1
app/src/main/assets/xposed_init
Normal file
@@ -0,0 +1 @@
|
||||
com.highcapable.yukihookapi.demo.InjectTest_YukiHookXposedInit
|
@@ -36,6 +36,7 @@ import com.highcapable.yukihookapi.hook.entity.YukiBaseHooker
|
||||
import com.highcapable.yukihookapi.hook.type.BundleClass
|
||||
import com.highcapable.yukihookapi.hook.type.StringType
|
||||
|
||||
// for test
|
||||
class MainHooker : YukiBaseHooker() {
|
||||
|
||||
override fun onHook() =
|
||||
|
@@ -35,6 +35,8 @@ import com.highcapable.yukihookapi.annotation.xposed.InjectYukiHookWithXposed
|
||||
import com.highcapable.yukihookapi.demo.BuildConfig
|
||||
import com.highcapable.yukihookapi.demo.InjectTest
|
||||
import com.highcapable.yukihookapi.demo.MainActivity
|
||||
import com.highcapable.yukihookapi.demo.hook.MainHooker
|
||||
import com.highcapable.yukihookapi.demo.hook.SecondHooker
|
||||
import com.highcapable.yukihookapi.hook.factory.encase
|
||||
import com.highcapable.yukihookapi.hook.factory.findMethod
|
||||
import com.highcapable.yukihookapi.hook.proxy.YukiHookXposedInitProxy
|
||||
@@ -48,7 +50,7 @@ class MainInjecter : YukiHookXposedInitProxy {
|
||||
|
||||
override fun onHook() {
|
||||
// 方案 1
|
||||
// encase(BuildConfig.APPLICATION_ID, MainHooker(), SecondHooker())
|
||||
encase(MainHooker(), SecondHooker())
|
||||
// 方案 2
|
||||
encase(BuildConfig.APPLICATION_ID) {
|
||||
loadApp(name = BuildConfig.APPLICATION_ID) {
|
||||
|
Reference in New Issue
Block a user