Giter Club home page Giter Club logo

plugindemo's Introduction

PluginDemo


难点1:通过类加载器机制,加载插件dex,然后和宿主的dex合并为一个dexElements,然后设置回宿主的类加载器

难点2:四大组件的加载,在进入AMS之前,通过hook机制,动态代理IActivityManager,判断如果当前方法是startActivity,将Activity替换为ProxyActivity,然后设置在handler中的callback,再把原来的intent设置回去,达到偷梁换柱的目的。

难点3:资源加载,在插件中创建context,再创建创建插件Resources,将插件apk所在的路径设置到Resources中,然后通过反射,将Resources设置到context中,插件加载资源时就使用这个context,解决了资源冲突问题。

plugindemo's People

Contributors

qq471077336 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.