Giter Site home page Giter Site logo

kyuubiran / ezxhelper Goto Github PK

View Code? Open in Web Editor NEW
375.0 7.0 47.0 1.19 MB

A library to make Xposed modules development easily.

Home Page: https://KyuubiRan.github.io/EzXHelper/

License: Apache License 2.0

Kotlin 100.00%
xposed library java kotlin android reflection

ezxhelper's Introduction

Hi there 👋 ^ ^

Readme Card

ezxhelper's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ezxhelper's Issues

Unresolved References Error when Using EzXHelper with Gradle Plugin 7.3.0

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.

image

有没有 1.x 版本的文档

因为我在学习怎么用 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

Can EzXHelper or Xposed be used to call the superclass version of a hooked method?

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?

I don't think it is a good idea to involve extensions not related to Xposed

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.

inline fun JSONArray.forEachIndexed(action: (Int, Any) -> Unit) {

inline fun tryOrFalse(block: () -> Unit): Boolean = try {

inline fun <E> MutableSet<E>.keepIf(predicate: (E) -> Boolean) {

ActivityProxy not work in 0.9.3

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

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.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
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/gradle-wrapper.properties
  • gradle 7.5.1

  • Check this box to trigger a request for Renovate to run again on this repository

Android 13 Support?

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.

建议:想要提供获取R对象中的各个id

最近在开发的时候需要使用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);
}

封装起来会方便很多

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.