kyuubiran / ezxhelper Goto Github PK
View Code? Open in Web Editor NEWA library to make Xposed modules development easily.
Home Page: https://KyuubiRan.github.io/EzXHelper/
License: Apache License 2.0
A library to make Xposed modules development easily.
Home Page: https://KyuubiRan.github.io/EzXHelper/
License: Apache License 2.0
最近在开发的时候需要使用id name
获取控件的或者布局的id
。
我知道已经提供了一个ViewUtils去通过id name
获取id
,但是这个对针对已经实例化的ViewGroup对象去获取。
比如说我有个需求就是使用id去inflate一个实例,但是,这个id是需要自己用变量去记录,感觉挺麻烦的。
希望在EzXHepler
类下可以多一个使用id name
获取 相对应id
的
例子:
类名:
包名.R.layout
public static final class layout
{
public static final int abc_action_bar_title_item = 0x7f0d0000;
public static final int abc_action_bar_up_container = 0x7f0d0001;
public static final int abc_action_menu_item_layout = 0x7f0d0002;
}
我的实现逻辑是:
public int getLayoutId(XC_LoadPackage.LoadPackageParam loadPackageParam, String idName) {
Class<?> layoutClazz = XposedHelpers
.findClass(loadPackageParam.packageName + ".R.layout", loadPackageParam.classLoader);
return XposedHelpers.getStaticIntField(layoutClazz, idName);
}
封装起来会方便很多
Public library should NOT involve public extension functions ESPECIALLY for language standard library. I must admit that this is really outrageous. I think it's better to warn users for this on readme.
I have a scenario in which I want to hook a method in a class that is extended from another class. Under certain conditions, I want to override the hooked method in the extended class and have it instead execute the original method. Basically I want to do the Xposed/EzXHelper equivalent of calling super.myHookedMethod()
. Is there a way to do this?
I tried using XposedHelpers.callMethod(XposedHelpers.getSurroundingThis(param.thisObject), "myHookedMethod")
and XposedHelpers.callMethod(param.thisObject, "super.myHookedMethod")
but neither has worked. Is there any way to achieve this?
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/workflows/kdoc.yml
actions/checkout v3.3.0
actions/setup-java v3.9.0
actions/cache v3
actions/upload-pages-artifact v1
actions/deploy-pages v1
gradle.properties
settings.gradle
build.gradle
com.android.application 7.4.0
com.android.library 7.4.0
org.jetbrains.kotlin.android 1.8.0
org.jetbrains.dokka 1.7.20
EzXHelper/build.gradle
de.robv.android.xposed:api 82
sample/build.gradle
de.robv.android.xposed:api 82
gradle/wrapper/gradle-wrapper.properties
gradle 7.5.1
因为我在学习怎么用 kotlin 写 xposed, 期间看到了这个库 https://github.com/CoolestEnoch/TheMessWorld, 然后这个库用的是 1.0.3
版本的 EzXHelper
$ rg -i ezxhelper --iglob '*.gradle'
code/app/build.gradle
53: implementation 'com.github.kyuubiran:EzXHelper:1.0.3'
在写下这个问题的时候, 问题已经解决
> ghq get https://github.com/KyuubiRan/EzXHelper
> cd EzXHelper
> git checkout -b 1.x origin/1.x
> $env:HTTP_PROXY="http://127.0.0.1:7890"; $env:HTTPS_PROXY="$env:HTTP_PROXY";
> scoop install openjdk11
> ./gradlew :EzXHelper:dokkaHtml
> python3 -m http.server
It seems that the EzXHelper library doesn't get properly identified as existing when you try to use version 7.3.0 of the Android Gradle Plugin. Android Studio reports that the reference is unresolved, but that is obviously untrue, as the app still builds properly. I am not sure if this is an issue that you can fix, but I wanted to make you aware of it anyway.
ActivityProxy not work in 0.9.3, and the last available version is 0.8.8.It will open the host activity when I start my activity.
There is no Xposed Log but I found some error log in logcat.
2022-06-08 20:43:46.799 31909-31909/? E/EzXHelper: java.lang.NoSuchMethodException at com.github.kyuubiran.ezxhelper.utils.MethodUtilsKt.method-_8BSV04(MethodUtils.kt:49) at com.github.kyuubiran.ezxhelper.utils.MethodUtilsKt.method-_8BSV04$default(MethodUtils.kt:32) at com.github.kyuubiran.ezxhelper.utils.parasitics.MyHandler.handleMessage(ActivityHelper.kt:528) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loopOnce(Looper.java:233) at android.os.Looper.loop(Looper.java:344) at com.tencent.rmonitor.looper.LooperProxy.run(LooperProxy.java:18) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:233) at android.os.Looper.loop(Looper.java:344) at android.app.ActivityThread.main(ActivityThread.java:8184) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
Android:12 API 31 ColorOS 12
i'm new to Kotlin but i know how to work with java and xposed module, can you show me for example how to make this last code in kotlin and this one , thank you very much!
Does this library support Android 13? My module that uses this library is throwing errors saying that a function I want to hook does not exist even though I have verified that it does, and I don't know if I can rule out this library as the source of the problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.