首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Android插件化原理解析——Hook机制之Binder Hook

    getService过程 上文分析得知,我们想要修改IBinder对象的queryLocalInterface方法;获取IBinder对象的过程如下: IBinder b = ServiceManager.getService...接下来就可以看这个getService的代码了: public static IBinder getService(String name) { try { IBinder service...(name); } } catch (RemoteException e) { Log.e(TAG, "error in getService", e);...我们可以替换这个map里面的内容为Hook过的IBinder对象,由于系统在getService的时候每次都会优先查找缓存,因此返回给使用者的都是被我们修改过的对象,从而达到瞒天过海的目的。...通过上文分析我们知道,只要让getService返回IBinder对象的queryLocalInterface方法直接返回我们伪造过的系统服务对象就能达到目的。

    1.9K10
    领券