AndroidHookStartActivity

Introduction: 利用 AMSHook 启动不注册的 Activity
More: Author   ReportBugs   
Tags:
hook-AMS-

AMSHook

两行代码实现动态启动未注册的 Activity。

1.application 标签里配置一个壳 Activity

        <activity android:name=".HostActivity" />

2.注册一下其中 this 为 context

      AMSHookUtil.hookStartActivity(this);

3.以后就可以按照标准的 Intent 启动为那些未被注册的 Activity。

                Intent intent = new Intent(MainActivity.this, OtherActivity.class);
                startActivity(intent);

原理详解:http://www.jianshu.com/p/2ad105f54d07

更新

  • 1.修复多次 hook 的问题
  • 2.修复 Activity 无需和包名一致也能启动
Apps
About Me
GitHub: Trinea
Facebook: Dev Tools