All Projects → panhongwei → Androidmethodhook

panhongwei / Androidmethodhook

android art hook like Sophix

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Androidmethodhook

Art Dcgan
Modified implementation of DCGAN focused on generative art. Includes pre-trained models for landscapes, nude-portraits, and others.
Stars: ✭ 1,882 (+700.85%)
Mutual labels:  art
Pine
Dynamic java method hook framework on ART.
Stars: ✭ 171 (-27.23%)
Mutual labels:  art
Lief
Authors
Stars: ✭ 2,730 (+1061.7%)
Mutual labels:  art
Lowpolify
Create low-poly art from any image 🌟🌟
Stars: ✭ 149 (-36.6%)
Mutual labels:  art
Svgsort
svg path sorter for more efficient (pen)plotting.
Stars: ✭ 162 (-31.06%)
Mutual labels:  art
Light dark toggle
An awesome flutter app which artistically animates light and dark mode 😍
Stars: ✭ 175 (-25.53%)
Mutual labels:  art
Paper
🌈 一个类纸风的主题paper🎉(still updating...)
Stars: ✭ 142 (-39.57%)
Mutual labels:  art
React Native Art Doc
📒 Unofficial documentation for react-native ART module.
Stars: ✭ 229 (-2.55%)
Mutual labels:  art
Gerbolyze
Render high-resolution bitmap images to PCB gerber files
Stars: ✭ 169 (-28.09%)
Mutual labels:  art
Sky Design
🌃 the design reference for the developers who care about good design.
Stars: ✭ 199 (-15.32%)
Mutual labels:  art
Mypaint
MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets.
Stars: ✭ 2,072 (+781.7%)
Mutual labels:  art
Blossom
A lovely interactive music generator
Stars: ✭ 162 (-31.06%)
Mutual labels:  art
Omnidome
Dome Mapping Projection Software
Stars: ✭ 184 (-21.7%)
Mutual labels:  art
Primitive
Reproducing images with geometric primitives.
Stars: ✭ 11,657 (+4860.43%)
Mutual labels:  art
Ascii py
Make some ascii arts
Stars: ✭ 211 (-10.21%)
Mutual labels:  art
Ascension
ANSI/ASCII art viewer for Mac OS X
Stars: ✭ 143 (-39.15%)
Mutual labels:  art
Shaden
🎧 A modular audio synthesizer.
Stars: ✭ 175 (-25.53%)
Mutual labels:  art
Graphite
Open source 2D node-based raster/vector graphics editor (Photoshop + Illustrator + Houdini = Graphite)
Stars: ✭ 223 (-5.11%)
Mutual labels:  art
Nonflowers
Procedurally generated paintings of nonexistent flowers.
Stars: ✭ 208 (-11.49%)
Mutual labels:  art
Creative Adversarial Networks
(WIP) Implementation of Creative Adversarial Networks https://arxiv.org/pdf/1706.07068.pdf
Stars: ✭ 193 (-17.87%)
Mutual labels:  art

AndroidMethodHook

结合阿里Sophix热修复方案(https://yq.aliyun.com/articles/74598?t=t1#)
使用了dexmaker库,主要用来动态生成dex文件。
使用方法:

HookManager.findAndHookMethod(MainActivity.class, "onCreate", Bundle.class, new MethodCallback() {
    @Override
    protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
        super.beforeHookedMethod(param);
        Log.d("panda", "onCreate:"+param.thisObject.getClass().getName());
    }

    @Override
    protected void afterHookedMethod(MethodHookParam param) throws Throwable {
        super.afterHookedMethod(param);
        Log.d("panda", "i'm in method " +param.method.getName()+" afterHookedMethod");
    }
});
HookManager.startHooks(base);

通过对Native JmethodId内容替换实现method hook,为了达到类似于xposed的效果,需要动态生成method,使用了dexmaker库用以动态生成mehtod。

每个需要hook的方法都会dexmaker生成一个一摸一样的方法,将this和传入参数封装成Object[] args传给MethodUtil类的invoke函数,然后回调MethodCallback实现类似于xposed mehtod hook。
生成代理method方式如下:

package com.panda.hook.andhook;

public class MainActivity extends AppCompatActivity  {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
     public  double test(Object thiz,int a,int b,char cr){
        return (a+0.0)/b;
    }
}
public class com_panda_hook_andhook_MainActivity {
  public com_panda_hook_andhook_MainActivity() {
      super();
  }

  public double test(Object arg12, int arg13, int arg14, char arg15) {
      return MethodUtil.invoke("com_panda_hook_andhook_MainActivity_testLIICD", this, new Object[]{
              arg12, Integer.valueOf(arg13), Integer.valueOf(arg14), Character.valueOf(arg15)}).doubleValue();
  }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].