alibaba / alibaba/AndFix

art hook的问题

Open
#63 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
7k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

你好我最近在学习https://github.com/alibaba/AndFix 这个项目.
发现在patch的时候往往需要被patch对象的instance,比如
class MainActivity{
void bug()
{
getWindow().xxxx
}
}

class MainActivityPatch{
void fix(MainActivity mainActivity)
{
mainActivity.getWindow().xxxx
}
}
这种情况在dvm下以在dalvik_dispatcher中通过boxMethodArgs方法自己组装参数 把被patch者(mainActivity)组装到参数数组中来完成,
在art下通过改变art_method->entry_point_from_jni_入口来实现方法替换的时候 参数依然是调用原方法时的参数,无法自己定义
想询问下是否可以在art下也像dvm下自由组装参数后再进行后续的调用.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the issue's references to dalvik_dispatcher, boxMethodArgs, and art_method->entry_point_from_jni_. Compare how arguments are assembled under Dalvik with the ART replacement path, then determine whether equivalent instance injection is feasible; the issue does not define a concrete acceptance criterion beyond answering that question.

Written by the indexing model from the issue text.

Assessment

Tech stack
android
Domain
mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.