• xposed hook入门(一)


    xposed hook入门(一)

    1.架包的下载

    https://files.cnblogs.com/files/pythonywy/xposed_架包.rar

    https://files.cnblogs.com/files/pythonywy/xposed_jabao_2.rar

    2.在android studio 构建架包

    2.1.创建安卓工程

    2.2.新增lib目录

    2.3.api-82.jar拖入后构建路径(实际上就是使用第三方jar包)

    2.4修改app→build.gradle中的(implementation files('libs/api-82.jar')) 改为(compileOnly files('libs/api-82.jar'))

    3.写hook类

    import android.util.Log;
    
    import de.robv.android.xposed.IXposedHookLoadPackage;
    import de.robv.android.xposed.callbacks.XC_LoadPackage;
    public class Demo implements IXposedHookLoadPackage {
    
        //实现函数重写
        @Override
        public void handleLoadPackage(XC_LoadPackage.LoadPackageParam loadPackageParam) throws Throwable {
            Log.d("YWY","加载成功");
        }
    }
    
    

    4.修改xml

    默认的

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.app_debug.demo2">
        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme" />
          </application>
    </manifest>   
    

    修改后的

    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.app_debug.demo2">
    
        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:roundIcon="@mipmap/ic_launcher_round"
            android:supportsRtl="true"
            android:theme="@style/AppTheme" >
            <meta-data
                android:name="xposedmodule"
                android:value="true" />
            <meta-data
                android:name="xposeddescription"
                android:value="随便取名方便你后调用"/>
            <meta-data
                android:name="xposedminversion"
                android:value="30" />
        </application>
    </manifest>
    

    5.编写编译apk路径并编译

    1.右键mian文件Folder-->assets

    2.在asset文件目录下创建xposed_init

    3.在xposed_init下写hook类路径如(com.app_debug.demo2.Demo)

    4.开始编译并安装

    6.文献总结参考

    https://www.bilibili.com/video/BV1KC4y1W7xh

  • 相关阅读:
    从Mono 4.0观C# 6.0部分新特性
    (译文)Python中的staticmethod与classmethod
    ubuntu中mysql中文乱码及用python3.x调用
    tornado学习 TCPClient 实现聊天功能
    tornado学习 TCPServer 实现聊天功能
    java基础知识3
    java基础知识5
    JSTL常用标签6
    Java基础知识2
    java基础知识4
  • 原文地址:https://www.cnblogs.com/pythonywy/p/14537534.html
Copyright © 2020-2023  润新知