|
1 | | -# Xposed 模块模板 (基于 libxposed) |
| 1 | +# Xposed Module Template (Based on libxposed) |
2 | 2 |
|
3 | | -这是一个通用的 Xposed 模块模板,基于 [libxposed](https://github.com/libxposed/api) 构建。 |
| 3 | +This is a general-purpose Xposed module template built on [libxposed](https://github.com/libxposed/api). |
4 | 4 |
|
5 | | -## 如何使用 |
| 5 | +## How to Use |
6 | 6 |
|
7 | | -1. **修改包名**: 将 `app/build.gradle` 中的 `namespace` 和 `applicationId` 修改为你自己的包名。 |
8 | | -2. **重命名包目录**: 将 `app/src/main/java/com/example/module` 目录重命名为匹配你包名的目录结构。 |
9 | | -3. **更新模块入口**: |
10 | | - - 修改 `MainModule.java` 以实现你的逻辑。 |
11 | | - - 更新 `app/src/main/resources/META-INF/xposed/java_init.list` 里的类名,确保它指向你的 `XposedModule` 实现类。 |
12 | | -4. **配置作用域**: |
13 | | - - 在 `app/src/main/resources/META-INF/xposed/scope.list` 中列出你想要 Hook 的应用包名(每行一个)。 |
14 | | -5. **设置编译参数**: |
15 | | - - 根据需要修改 `app/build.gradle` 中的 `compileSdk` 和 `targetSdkVersion`。 |
| 7 | +1. **Modify Package Name**: Change `namespace` and `applicationId` in `app/build.gradle` to your own package name. |
| 8 | +2. **Rename Package Directory**: Rename the `app/src/main/java/com/example/module` directory to match your package structure. |
| 9 | +3. **Update Module Entry Point**: |
| 10 | + - Implement your logic in `MainModule.java`. |
| 11 | + - Update the class name in `app/src/main/resources/META-INF/xposed/java_init.list` to ensure it points to your `XposedModule` implementation class. |
| 12 | +4. **Configure Scope**: |
| 13 | + - List the package names of the apps you want to hook in `app/src/main/resources/META-INF/xposed/scope.list` (one per line). |
| 14 | +5. **Set Compilation Parameters**: |
| 15 | + - Modify `compileSdk` and `targetSdkVersion` in `app/build.gradle` as needed. |
16 | 16 |
|
17 | | -## 主要类介绍 |
| 17 | +## Key Components |
18 | 18 |
|
19 | | -- `MainModule.java`: 模块的主入口,继承自 `XposedModule`。 |
20 | | -- `java_init.list`: 告诉 libxposed 模块的入口类是谁。 |
21 | | -- `scope.list`: 定义模块生效的作用域(应用)。 |
22 | | -- `module.prop`: 模块的元数据信息。 |
| 19 | +- `MainModule.java`: The main entry point of the module, inheriting from `XposedModule`. |
| 20 | +- `java_init.list`: Tells libxposed which class is the entry point for the module. |
| 21 | +- `scope.list`: Defines the scope (apps) where the module will be active. |
| 22 | +- `module.prop`: Contains metadata information for the module. |
23 | 23 |
|
24 | | -## 注意事项 |
| 24 | +## Notes |
25 | 25 |
|
26 | | -- 本模板使用了 `libxposed` API,请参考其官方文档以了解更多高级用法。 |
27 | | -- 确保在开发过程中正确配置 `compileOnly` 依赖,以避免将 Xposed API 打包进你的 APK。 |
| 26 | +- This template uses the `libxposed` API. Please refer to its official documentation for more advanced usage. |
| 27 | +- Ensure that `compileOnly` dependencies are correctly configured during development to avoid bundling the Xposed API into your APK. |
0 commit comments