mirror of
https://github.com/HighCapable/YukiHookAPI.git
synced 2025-09-04 01:35:17 +08:00
...
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* YukiHookAPI - An efficient Kotlin version of the Xposed Hook API.
|
||||
* Copyright (C) 2019-2022 HighCapable
|
||||
* https://github.com/fankes/YukiHookAPI
|
||||
*
|
||||
* MIT License
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* This file is Created by fankes on 2022/2/2.
|
||||
*/
|
||||
@file:Suppress("EXPERIMENTAL_IS_NOT_ENABLED")
|
||||
|
||||
package com.highcapable.yukihookapi.annotation
|
||||
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
|
||||
@MustBeDocumented
|
||||
@Target(
|
||||
AnnotationTarget.CLASS,
|
||||
AnnotationTarget.ANNOTATION_CLASS
|
||||
)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
/**
|
||||
* - ❗警告方法外部调用声明
|
||||
* 此方法除继承和接口外不应该在这里被调用
|
||||
* 如果调用此方法可能会出现错误或 APP 发生异常
|
||||
*/
|
||||
annotation class DoNotUseClass
|
@@ -32,13 +32,10 @@ package com.highcapable.yukihookapi.annotation
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
|
||||
@MustBeDocumented
|
||||
@Target(
|
||||
AnnotationTarget.CLASS,
|
||||
AnnotationTarget.ANNOTATION_CLASS,
|
||||
AnnotationTarget.PROPERTY,
|
||||
AnnotationTarget.FIELD,
|
||||
AnnotationTarget.LOCAL_VARIABLE,
|
||||
AnnotationTarget.VALUE_PARAMETER,
|
||||
AnnotationTarget.CONSTRUCTOR,
|
||||
AnnotationTarget.PROPERTY_GETTER,
|
||||
AnnotationTarget.PROPERTY_SETTER,
|
||||
AnnotationTarget.TYPEALIAS
|
||||
|
@@ -32,16 +32,8 @@ package com.highcapable.yukihookapi.annotation
|
||||
@RequiresOptIn(level = RequiresOptIn.Level.WARNING)
|
||||
@MustBeDocumented
|
||||
@Target(
|
||||
AnnotationTarget.CLASS,
|
||||
AnnotationTarget.ANNOTATION_CLASS,
|
||||
AnnotationTarget.PROPERTY,
|
||||
AnnotationTarget.LOCAL_VARIABLE,
|
||||
AnnotationTarget.VALUE_PARAMETER,
|
||||
AnnotationTarget.CONSTRUCTOR,
|
||||
AnnotationTarget.FUNCTION,
|
||||
AnnotationTarget.PROPERTY_GETTER,
|
||||
AnnotationTarget.PROPERTY_SETTER,
|
||||
AnnotationTarget.TYPEALIAS
|
||||
AnnotationTarget.FUNCTION
|
||||
)
|
||||
@Retention(AnnotationRetention.BINARY)
|
||||
/**
|
||||
|
@@ -25,7 +25,7 @@
|
||||
*
|
||||
* This file is Created by fankes on 2022/2/2.
|
||||
*/
|
||||
@file:Suppress("unused", "MemberVisibilityCanBePrivate", "UNCHECKED_CAST")
|
||||
@file:Suppress("unused", "MemberVisibilityCanBePrivate", "UNCHECKED_CAST", "EXPERIMENTAL_API_USAGE")
|
||||
|
||||
package com.highcapable.yukihookapi.hook.param
|
||||
|
||||
|
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
package com.highcapable.yukihookapi.hook.param.wrapper
|
||||
|
||||
import com.highcapable.yukihookapi.annotation.DoNotUseClass
|
||||
import com.highcapable.yukihookapi.hook.param.HookParam
|
||||
import de.robv.android.xposed.XC_MethodHook
|
||||
import de.robv.android.xposed.XposedBridge
|
||||
@@ -34,8 +35,11 @@ import java.lang.reflect.Member
|
||||
|
||||
/**
|
||||
* 用于包装 [HookParam]
|
||||
*
|
||||
* ❗这是一个私有 API - 请不要在外部使用
|
||||
* @param baseParam 对接 [XC_MethodHook.MethodHookParam]
|
||||
*/
|
||||
@DoNotUseClass
|
||||
class HookParamWrapper(private val baseParam: XC_MethodHook.MethodHookParam) {
|
||||
|
||||
/**
|
||||
|
@@ -30,15 +30,19 @@
|
||||
package com.highcapable.yukihookapi.hook.param.wrapper
|
||||
|
||||
import android.content.pm.ApplicationInfo
|
||||
import com.highcapable.yukihookapi.annotation.DoNotUseClass
|
||||
import com.highcapable.yukihookapi.hook.param.PackageParam
|
||||
|
||||
/**
|
||||
* 用于包装 [PackageParam]
|
||||
*
|
||||
* ❗这是一个私有 API - 请不要在外部使用
|
||||
* @param packageName 包名
|
||||
* @param processName 当前进程名
|
||||
* @param appClassLoader APP [ClassLoader]
|
||||
* @param appInfo APP [ApplicationInfo]
|
||||
*/
|
||||
@DoNotUseClass
|
||||
class PackageParamWrapper(
|
||||
var packageName: String,
|
||||
var processName: String,
|
||||
|
Reference in New Issue
Block a user