DroidPluginTeam / DroidPluginTeam/DroidPlugin

IAppWidgetService中getAppWidgetIds函数报错bug

Open
#209 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

添加IAppWidgetServiceHookHandle,IAppWidgetServiceBinderHook,IAppWidgetServiceCompat等文件

其中IAppWidgetServiceHookHandle hook函数如下:

private class getAppWidgetIds extends HookedMethodHandler {
public getAppWidgetIds(Context hostContext) {
super(hostContext);
}

```
@Override
protected boolean beforeInvoke(Object receiver, Method method, Object[] args) throws Throwable {
try
{
if (args.length>0)
{
if (args[0] instanceof ComponentName)
{
ComponentName myarg=(ComponentName)args[0];
FieldUtils.writeField(myarg, "mPackage", mHostContext.getPackageName());
}
}
}
catch(Exception ex)
{
ex.printStackTrace();
}
return super.beforeInvoke(receiver, method, args);
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.