简单记录

比如要hook一个app包中一个类的private void c(dmp dmp1),其中dmp是个类,这种的处理的方式如下:

用cydiasubstrate hook框架

1.先通过hook 一个返回context对象的函数,比如SafeApplication类中的public static Context a()获取到context
public static Context a()
{
Invoke.print();
return g;
}

2.构造类dmp

3.


Context c = createPackageContext("chroya.demo", Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY);
Class clazz = c.getClassLoader().loadClass("chroya.demo.Main");

或者Class<?> maClass = Class.forName("com.android.settings.ManageApplications", true, mmsCtx.getClassLoader());

 

http://www.cnblogs.com/Greenwood/archive/2011/04/02/2003803.html
http://blog.chinaunix.net/uid-27024249-id-3284292.html
http://wenku.baidu.com/view/12e5a340336c1eb91a375d9d.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-20
  • 2021-08-09
  • 2021-06-17
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2022-01-10
  • 2021-10-27
相关资源
相似解决方案