AdGuardHome for Magisk 按照和使用文档
AdGuardHomeForMagisk 项目地址: https://gitcode.com/gh_mirrors/ad/AdGuardHomeForMagisk
1. 项目目录结构及介绍
AdGuardHome for Magisk 的目录结构如下:
AdGuardHomeForMagisk/
├── META-INF/
│ ├── com/
│ │ └── google/
│ │ └── android/
├── bin/
├── docs/
├── scripts/
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── README_en.md
├── action.sh
├── changelog.md
├── customize.sh
├── module.prop
├── pack.ps1
├── service.sh
├── uninstall.sh
└── version.json
以下是各目录和文件的简要介绍:
META-INF/
: 包含了模块的元数据信息。bin/
: 存放可执行文件。docs/
: 存放项目文档。scripts/
: 包含了项目运行过程中需要的脚本文件。.gitattributes
: 定义了 Git 仓库中文件的属性。.gitignore
: 定义了 Git 忽略的文件。LICENSE
: 项目使用的许可证信息。README.md
: 项目的中文说明文件。README_en.md
: 项目的英文说明文件。action.sh
: 模块安装和更新的主要脚本文件。changelog.md
: 记录了项目的更新日志。customize.sh
: 用于自定义模块配置的脚本。module.prop
: 模块的基本属性描述文件。pack.ps1
: 用于打包模块的 PowerShell 脚本。service.sh
: 启动 AdGuardHome 服务的脚本。uninstall.sh
: 卸载模块的脚本。version.json
: 项目的版本信息。
2. 项目的启动文件介绍
项目的启动文件是 action.sh
。该脚本在模块安装或更新时被调用,主要执行以下操作:
- 检查系统环境。
- 安装或更新 AdGuardHome。
- 配置并启动 AdGuardHome 服务。
- 设置模块的自启动。
3. 项目的配置文件介绍
项目的配置文件主要包括 module.prop
和 version.json
。
-
module.prop
: 包含模块的基本属性,如模块的 ID、版本号、兼容性等信息。# 模块属性文件 id=com.twoone3.adguardhome version=1.0.0 versionCode=1 minVersion=21 targetVersion=29
-
version.json
: 包含项目的详细版本信息,用于在更新时确定最新版本。{ "version": "1.0.0", "versionCode": 1, "updateUrl": "https://github.com/twoone-3/AdGuardHomeForMagisk/releases", "files": [ { "name": "AdGuardHomeForMagisk.zip", "size": "1234567", "sha256": "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890", "url": "https://github.com/twoone-3/AdGuardHomeForMagisk/releases/download/1.0.0/AdGuardHomeForMagisk.zip" } ] }
AdGuardHomeForMagisk 项目地址: https://gitcode.com/gh_mirrors/ad/AdGuardHomeForMagisk
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考