Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

How to hook Canvas drawXXX methods? #274

Open
brokenjava opened this issue Apr 4, 2019 · 0 comments
Open

How to hook Canvas drawXXX methods? #274

brokenjava opened this issue Apr 4, 2019 · 0 comments

Comments

@brokenjava
Copy link

brokenjava commented Apr 4, 2019

Can XposedFramework hook Canvas' drawXXX methods? I hook these methods ,but It seems not work every time!

@OverRide
public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam loadPackageParam) throws Throwable {
XposedHelpers.findAndHookMethod(Canvas.class, "drawText", String.class, float.class, float.class,
Paint.class, new XC_MethodHook() {
@OverRide
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
super.beforeHookedMethod(param);
LogUtils.d(TAG, "hookCanvasDrawText canvas beforeHookedMethod");//some time print in console
hookCanvasDrawText(param);
}
});
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant