[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6NVGXYDAW3JJMT8MSWYJ1HW":3,"skill-same:01M6NVGXYDAW3JJMT8MSWYJ1HW":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":27,"commitSha":48,"skillDirectory":49,"forksCount":13,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":52,"install":53,"resources":66},"01M6NVGXYDAW3JJMT8MSWYJ1HW","apk-reverse",null,"Android APK reverse engineering: unpacking, Java decompilation, smali modification, repacking and signing, Frida dynamic hooking, and native .so analysis with jadx, apktool, adb, and related tools.","duc-duy-1612\u002FOnline-Delivery-Systems-Web","duc-duy-1612","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F192231384?v=4","01M6NSDKQQDKVTHZ8DZMZ1VYY6","01M6NSDKW8DDVTQHBT1HBDDJPT",0,"MIT","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fapk-reverse\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"reverse","APK","apk reverse","adb","smali","signing","reverse engineering","with","native","main","community","android","analysis","unpacking","jadx","apktool","https","java","license","github","2026-11-10 10:12:30",false,"---\nname: apk-reverse\ndescription: \"Android APK reverse engineering: unpacking, Java decompilation, smali modification, repacking and signing, Frida dynamic hooking, and native .so analysis with jadx, apktool, adb, and related tools.\"\nrisk: offensive\nsource: \"https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill\"\nsource_repo: \"zhaoxuya520\u002Freverse-skill\"\nsource_type: community\ndate_added: \"2026-08-25\"\nlicense: \"MIT\"\nlicense_source: \"https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill\u002Fblob\u002Fmain\u002FLICENSE\"\n---\n> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n## When to Use\n\n- Analyzing or modifying an Android APK during an authorized assessment.\n- Hooking runtime behavior of an app you own or are cleared to test.\n\n## 适用范围\n\n当任务属于以下场景时优先使用本 skill：\n\n- 分析 APK 的 Java 业务逻辑\n- 定位登录、签名、风控、证书校验、root 检测\n- 查看与修改 `AndroidManifest.xml`\n- 查看与修改 smali\n- 重打包 APK\n- 用 Frida 做 Java\u002Fnative 动态 Hook\n- APK 内含 `.so` 时切到 native 分析\n\n## 当前机器已验证可用的 CLI 工具\n\n- `jadx` `1.5.5`\n- `apktool` `3.0.2`\n- `frida-ps` `17.9.6`\n- `adb`\n- `java`\n\n## 优先使用脚本的场景\n\n以下流程高频且参数容易出错，优先用 skill 自带脚本：\n\n- 一次性完成 `jadx + apktool` 落盘并产出摘要：`scripts\u002Fdecode.ps1`\n- Frida 设备检查、进程列举、spawn\u002Fattach 注入：`scripts\u002Ffrida-run.ps1`\n- 重建、对齐、签名、安装 APK：`scripts\u002Frebuild-sign-install.ps1`\n- 快速抽取 Manifest 关键组件与权限：`scripts\u002Fmanifest-summary.ps1`\n\n以下一行命令保持直接调用，不单独封装：\n\n- `adb devices`\n- `adb logcat`\n- `frida-ps -U`\n- `jadx --version`\n- `apktool --version`\n\n## 自带脚本\n\n### `scripts\u002Fdecode.ps1`\n\n用途：\n\n- 统一跑 `jadx` 和 `apktool`\n- 默认在原 APK 同目录创建任务输出目录\n- 输出 `package`、`java_files`、`smali_dirs`、`so_files` 等摘要\n- 兼容 `jadx` 部分反编译错误但仍然有可用产物的情况\n\n示例：\n\n```powershell\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\decode.ps1\" -ApkPath \"D:\\DOWNLOAD\\app.apk\" -Clean\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\decode.ps1\" -ApkPath \"D:\\DOWNLOAD\\app.apk\" -Name demo -SkipJadx\n```\n\n### `scripts\u002Ffrida-run.ps1`\n\n用途：\n\n- 统一 Frida 的设备、进程、spawn\u002Fattach 入口\n- 避免手写参数时混淆 `-f`、`-n`、`-U`\n\n示例：\n\n```powershell\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\frida-run.ps1\" -ListDevices\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\frida-run.ps1\" -Usb -ListProcesses\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\frida-run.ps1\" -Usb -Spawn -Package com.example.app -ScriptPath \"D:\\hooks\\test.js\"\n```\n\n### `scripts\u002Frebuild-sign-install.ps1`\n\n用途：\n\n- `apktool b` 重建 APK\n- `zipalign` 对齐\n- `apksigner` 签名与验签\n- 可选直接 `adb install`\n\n示例：\n\n```powershell\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\rebuild-sign-install.ps1\" -ProjectDir \"C:\\work\\apktool_out\" -Clean\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\rebuild-sign-install.ps1\" -ProjectDir \"C:\\work\\apktool_out\" -Install -Reinstall -DeviceSerial \"127.0.0.1:7555\"\n```\n\n说明：\n\n- 默认生成并复用调试 keystore\n- 默认输出到 `ProjectDir` 同目录，便于和原始包、解包目录放在一起\n\n### `scripts\u002Fmanifest-summary.ps1`\n\n用途：\n\n- 抽取包名\n- 列权限\n- 列 activity\u002Fservice\u002Freceiver\u002Fprovider\n- 标出主启动 activity\n\n示例：\n\n```powershell\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\manifest-summary.ps1\" -ManifestPath \"C:\\work\\apktool_out\\AndroidManifest.xml\"\n```\n\n如果要分析 `.so`、`lib\u002Farm64-v8a\u002F*.so`、`lib\u002Farmeabi-v7a\u002F*.so`，再结合：\n\n- `ida-reverse`\n- `radare2`\n\n## 工具分工\n\n### `jadx`\n\n用于：\n\n- Java 反编译阅读\n- 包名、类名、方法名搜索\n- 先从高层逻辑理解 APK\n\n常用命令：\n\n```bash\njadx -d jadx_out app.apk\njadx --single-class com.example.LoginActivity -d jadx_out app.apk\njadx --deobf -d jadx_out app.apk\n```\n\n### `JEB Pro`（可选商业工具）\n\n用于：\n\n- Android DEX \u002F APK \u002F ARM 的交叉验证与深度反编译\n- 在 JADX 输出不完整或混淆较重时补充静态分析\n- 对同一目标的类、方法与调用关系进行第二工具链校验\n\n边界：\n\n- JEB Pro 是商业软件，必须由用户自行取得并安装有效许可证；本包不会下载、破解或规避许可。\n- 仅在 `tool-index` 已确认本机 JEB 可用时调用；否则继续使用 `jadx`、`apktool`、Ghidra、IDA 或 radare2。\n- 第三方 JEB MCP bridge 不是本包依赖。安装前必须按 `..\u002Fops\u002Fskill-supply-chain.md` 审阅源码、权限、网络行为和版本，再由用户明确确认注册。\n\n### `apktool`\n\n用于：\n\n- 解包 APK\n- 查看和修改 `AndroidManifest.xml`\n- 查看和修改 smali\n- 重建 APK\n\n常用命令：\n\n```bash\napktool d app.apk -o apktool_out\napktool b apktool_out -o rebuilt.apk\n```\n\n### `frida`\n\n用于：\n\n- 动态观察 Java 方法调用\n- Hook native 导出函数\n- 绕过 root 检测、证书校验、调试检测\n\n常用命令：\n\n```bash\nfrida-ps -U\nfrida -U -f com.example.app -l hook.js\nfrida-trace -U -f com.example.app -j '*!*certificate*'\n```\n\n### `adb`\n\n用于：\n\n- 设备连接\n- 安装 APK\n- 查看日志\n- 拉取文件\n\n常用命令：\n\n```bash\nadb devices\nadb install -r app.apk\nadb shell pm list packages\nadb logcat\nadb pull \u002Fdata\u002Flocal\u002Ftmp\u002Ffile .\n```\n\n## 推荐工作流\n\n### 1. Triage\n\n先确定 APK 大致构成，不急着改包或 Hook。\n\n建议动作：\n\n1. 用 `jadx -d jadx_out app.apk` 导出 Java 代码\n2. 用 `apktool d app.apk -o apktool_out` 导出 smali 和资源\n3. 先看：\n   - `AndroidManifest.xml`\n   - 主 `package`\n   - `application`、`activity`、`service`、`receiver`\n   - `lib\u002F` 目录里是否有 `.so`\n4. Issue #65 威胁形态速查（授权样本\u002F设备；详见 `..\u002Freverse-engineering\u002Freferences\u002Fnonpe-format-cookbook.md` §7–8）：\n   - 透明\u002F隐藏图标（AU）：`aapt dump badging` + manifest theme\u002Flabel\u002Ficon → `E-android-hidden-icon-manifest`\n   - Magisk\u002F脚本格机特征与远程 curl|sh（AR\u002FAS）→ 特征与 URL 入证，**不执行**破坏命令 \u003C!-- security-allowlist: curl-pipe-bash -->\n   - 持久化路径（AT）：`service.d` \u002F `priv-app` 等 → `E-android-persistence`\n\n### 2. Java 逻辑观察\n\n优先从 `jadx_out` 读：\n\n- `MainActivity`\n- `Application`\n- 登录、网络、加密、风控相关类\n- 第三方 SDK 初始化类\n\n常见关键词：\n\n- `login`\n- `sign`\n- `encrypt`\n- `cipher`\n- `token`\n- `root`\n- `certificate`\n- `trust`\n- `okhttp`\n- `retrofit`\n- `webview`\n\n如果 Java 代码可读，先在这里定位业务逻辑。\n\n### 3. Smali 与资源层确认\n\n当 `jadx` 结果不完整、混淆重、或需要实际 patch 时，切到 `apktool_out`：\n\n- 看 `smali*\u002F`\n- 看 `res\u002Fvalues\u002Fstrings.xml`\n- 看 `AndroidManifest.xml`\n\n优先 patch：\n\n- `android:exported`\n- 调试标记\n- root 检测返回值\n- 登录验证逻辑\n- 证书校验分支\n\n### 4. 重建与安装\n\n修改后：\n\n```bash\napktool b apktool_out -o rebuilt.apk\n```\n\n或者直接用脚本闭环：\n\n```powershell\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\rebuild-sign-install.ps1\" -ProjectDir \"apktool_out\" -Install -Reinstall -DeviceSerial \"127.0.0.1:7555\"\n```\n\n说明：\n\n- 本 skill 只保证 `apktool` 重建链路\n- 若后续需要正式安装到设备，通常还需要签名流程\n- 如果任务进入签名\u002F对齐，补充 `apksigner` \u002F `zipalign`\n\n### 5. 动态 Hook\n\n静态分析不足时，用 Frida：\n\n- Hook 登录函数\n- Hook `OkHttp` \u002F `Retrofit` \u002F `WebView` 关键点\n- Hook `javax.crypto`、`MessageDigest`\n- Hook root 检测函数\n- Hook SSL pinning 逻辑\n\n原则：\n\n- 先 Hook Java 层，再看是否需要 native Hook\n- 先打印参数与返回值，再决定是否主动修改返回值\n\n建议：\n\n- 简单一次性命令直接用 `frida-*`\n- 需要稳定复用的注入流程优先走 `scripts\u002Ffrida-run.ps1`\n\n### 6. Native `.so` 分流\n\n如果 APK 中包含关键 `.so`：\n\n- 用 `apktool` 或 `jadx` 找到 `lib\u002F**\u002F*.so`\n- 若只是导出符号、字符串、快速 triage，可用 `radare2`\n- 若要长期深入分析、反编译、改名、类型恢复，用 `ida-reverse`\n\n遇到这些信号要尽快切 native：\n\n- Java 层只是 JNI 包装\n- 核心签名逻辑不在 Java\n- `System.loadLibrary()` 后关键逻辑消失\n- 证书校验\u002F风控在 `.so` 中\n\n## 输出要求\n\n最终至少说明：\n\n- 入口组件与关键类\n- 关键逻辑在 Java、smali 还是 `.so`\n- 已确认的敏感点：登录、签名、root、SSL、WebView、JNI\n- 如果做了 patch，说明改了什么\n- 如果做了 Hook，说明 Hook 了哪个类\u002F方法\u002F导出函数\n\n## 禁止事项\n\n- 不要一开始就盲目改 smali\n- 不要在没看 manifest 和主入口前就写 Hook\n- 不要把 Java 反编译不完整直接等同于“逻辑不可分析”\n- 不要在 `.so` 明显承载核心逻辑时继续死磕 Java 层\n\n## 快速命令备忘\n\n```bash\n# 反编译 Java\n\n> ⚠️ Security notice: examples below may include download-and-execute patterns, shown for defensive understanding and authorized testing only. Never run them against systems you do not own.\n\njadx -d jadx_out app.apk\n\n# 解包 APK\napktool d app.apk -o apktool_out\n\n# 重建 APK\napktool b apktool_out -o rebuilt.apk\n\n# 设备与进程\nadb devices\nfrida-ps -U\n\n# 启动并注入\nfrida -U -f com.example.app -l hook.js\n```\n\n---\n\n## 路由上下文\n\n**上游入口**: `skills\u002FSKILL.md`（总控）、`routing.md`\n**下游出口**:\n- 核心逻辑在 `.so` → `ida-reverse\u002F` 或 `radare2\u002F`\n- 需动态 Hook\u002F验证 → `reverse-engineering\u002Ftools-dynamic.md`（Frida 章节）\n- 通用逆向方法论 → `reverse-engineering\u002FSKILL.md`\n\n**同级关联模块**: `reverse-engineering\u002F`（.so 分析和 Frida 进阶用法）\n\n---\n\n## 按需自举（On-Demand Bootstrap）\n\n本 skill 的入口脚本已接入统一自举系统。缺少工具时不会直接报错，而是自动尝试安装。\n\n### 自动化能力边界\n\n| 工具 | 可自动安装 | 安装方式 | 说明 |\n|------|-----------|---------|------|\n| jadx | ✓ | GitHub Release ZIP | 自动下载解压到 `%USERPROFILE%\\Tools\\jadx\\` |\n| apktool | ✓ | GitHub Release JAR + wrapper | 自动下载 jar 并生成 bat 到 `%USERPROFILE%\\Tools\\apktool\\` |\n| JEB Pro | ✗ | 用户手动安装并提供有效许可证 | 可选的 Android \u002F ARM 交叉验证工具；第三方 MCP bridge 需单独审计 |\n| frida \u002F frida-ps | ✓ | pip install frida-tools | 需要 Python 已安装 |\n| adb | ✓ | winget \u002F fallback path | 自动安装 Android Platform-Tools |\n| zipalign | ✗ | 需手动安装 Android Build-Tools | `sdkmanager \"build-tools;35.0.0\"` |\n| apksigner | ✗ | 需手动安装 Android Build-Tools | 同上 |\n\n### 自举触发点\n\n- `scripts\u002Fdecode.ps1`：缺 jadx 或 apktool 时自动调用 `bootstrap-reverse.ps1`\n- `scripts\u002Frebuild-sign-install.ps1`：缺 adb 或 apktool 时自动调用 bootstrap\n- `scripts\u002Ffrida-run.ps1`：当前仍为手动检查（frida 通常已通过 pip 安装）\n\n### 自举失败时\n\n如果自动安装失败，脚本会抛出明确错误并附带手动安装链接。常见原因：\n- 网络不通（GitHub API \u002F PyPI 不可达）\n- winget 不可用（Windows 版本过低）\n- Java 未安装（apktool 依赖 JDK）\n\n\n## 任务完成自检（声称完成前 MUST 通过）\n\n- [ ] 我是否执行了工作流中的每一步（而不是只阅读）？\n- [ ] 我是否基于 `tool-index` 使用了真实工具路径？\n- [ ] 我是否产出了可复现证据（命令\u002F脚本\u002F截图\u002F报告）？\n- [ ] 我是否完成并回写了 RULES 要求的 Checklist 项？\n- [ ] 若命中隐藏图标\u002F格机\u002F持久化线索：是否按 U–AV cookbook 记录 E-android-* Evidence（授权范围内）？\n\n## Limitations\n\n- Repackaging and hooking tamper with the target app; never do this on apps outside your authorization.\n- Requires local Android toolchain (jadx\u002Fapktool\u002FFrida\u002Fadb); heavily obfuscated or packed apps may resist static analysis.\n\n> Adapted from [zhaoxuya520\u002Freverse-skill](https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill) (MIT).\n","> **⚠️ AUTHORIZED USE ONLY**\n> This skill is for educational purposes or authorized security assessments only.\n> You must have explicit, written permission from the system owner before using this tool.\n> Misuse of this tool is illegal and strictly prohibited.\n\n> **Mandatory confirmation gate**\n> Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:\n> 1. Ask the user to state the exact target URL, IP, account, or resource.\n> 2. Ask the user to confirm written authorization and the permitted scope.\n> 3. Show the exact command(s) and explain their expected effect.\n> 4. Wait for explicit confirmation in the current conversation.\n>\n> Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.\n\n## When to Use\n\n- Analyzing or modifying an Android APK during an authorized assessment.\n- Hooking runtime behavior of an app you own or are cleared to test.\n\n## 适用范围\n\n当任务属于以下场景时优先使用本 skill：\n\n- 分析 APK 的 Java 业务逻辑\n- 定位登录、签名、风控、证书校验、root 检测\n- 查看与修改 `AndroidManifest.xml`\n- 查看与修改 smali\n- 重打包 APK\n- 用 Frida 做 Java\u002Fnative 动态 Hook\n- APK 内含 `.so` 时切到 native 分析\n\n## 当前机器已验证可用的 CLI 工具\n\n- `jadx` `1.5.5`\n- `apktool` `3.0.2`\n- `frida-ps` `17.9.6`\n- `adb`\n- `java`\n\n## 优先使用脚本的场景\n\n以下流程高频且参数容易出错，优先用 skill 自带脚本：\n\n- 一次性完成 `jadx + apktool` 落盘并产出摘要：`scripts\u002Fdecode.ps1`\n- Frida 设备检查、进程列举、spawn\u002Fattach 注入：`scripts\u002Ffrida-run.ps1`\n- 重建、对齐、签名、安装 APK：`scripts\u002Frebuild-sign-install.ps1`\n- 快速抽取 Manifest 关键组件与权限：`scripts\u002Fmanifest-summary.ps1`\n\n以下一行命令保持直接调用，不单独封装：\n\n- `adb devices`\n- `adb logcat`\n- `frida-ps -U`\n- `jadx --version`\n- `apktool --version`\n\n## 自带脚本\n\n### `scripts\u002Fdecode.ps1`\n\n用途：\n\n- 统一跑 `jadx` 和 `apktool`\n- 默认在原 APK 同目录创建任务输出目录\n- 输出 `package`、`java_files`、`smali_dirs`、`so_files` 等摘要\n- 兼容 `jadx` 部分反编译错误但仍然有可用产物的情况\n\n示例：\n\n```powershell\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\decode.ps1\" -ApkPath \"D:\\DOWNLOAD\\app.apk\" -Clean\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\decode.ps1\" -ApkPath \"D:\\DOWNLOAD\\app.apk\" -Name demo -SkipJadx\n```\n\n### `scripts\u002Ffrida-run.ps1`\n\n用途：\n\n- 统一 Frida 的设备、进程、spawn\u002Fattach 入口\n- 避免手写参数时混淆 `-f`、`-n`、`-U`\n\n示例：\n\n```powershell\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\frida-run.ps1\" -ListDevices\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\frida-run.ps1\" -Usb -ListProcesses\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\frida-run.ps1\" -Usb -Spawn -Package com.example.app -ScriptPath \"D:\\hooks\\test.js\"\n```\n\n### `scripts\u002Frebuild-sign-install.ps1`\n\n用途：\n\n- `apktool b` 重建 APK\n- `zipalign` 对齐\n- `apksigner` 签名与验签\n- 可选直接 `adb install`\n\n示例：\n\n```powershell\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\rebuild-sign-install.ps1\" -ProjectDir \"C:\\work\\apktool_out\" -Clean\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\rebuild-sign-install.ps1\" -ProjectDir \"C:\\work\\apktool_out\" -Install -Reinstall -DeviceSerial \"127.0.0.1:7555\"\n```\n\n说明：\n\n- 默认生成并复用调试 keystore\n- 默认输出到 `ProjectDir` 同目录，便于和原始包、解包目录放在一起\n\n### `scripts\u002Fmanifest-summary.ps1`\n\n用途：\n\n- 抽取包名\n- 列权限\n- 列 activity\u002Fservice\u002Freceiver\u002Fprovider\n- 标出主启动 activity\n\n示例：\n\n```powershell\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\manifest-summary.ps1\" -ManifestPath \"C:\\work\\apktool_out\\AndroidManifest.xml\"\n```\n\n如果要分析 `.so`、`lib\u002Farm64-v8a\u002F*.so`、`lib\u002Farmeabi-v7a\u002F*.so`，再结合：\n\n- `ida-reverse`\n- `radare2`\n\n## 工具分工\n\n### `jadx`\n\n用于：\n\n- Java 反编译阅读\n- 包名、类名、方法名搜索\n- 先从高层逻辑理解 APK\n\n常用命令：\n\n```bash\njadx -d jadx_out app.apk\njadx --single-class com.example.LoginActivity -d jadx_out app.apk\njadx --deobf -d jadx_out app.apk\n```\n\n### `JEB Pro`（可选商业工具）\n\n用于：\n\n- Android DEX \u002F APK \u002F ARM 的交叉验证与深度反编译\n- 在 JADX 输出不完整或混淆较重时补充静态分析\n- 对同一目标的类、方法与调用关系进行第二工具链校验\n\n边界：\n\n- JEB Pro 是商业软件，必须由用户自行取得并安装有效许可证；本包不会下载、破解或规避许可。\n- 仅在 `tool-index` 已确认本机 JEB 可用时调用；否则继续使用 `jadx`、`apktool`、Ghidra、IDA 或 radare2。\n- 第三方 JEB MCP bridge 不是本包依赖。安装前必须按 `..\u002Fops\u002Fskill-supply-chain.md` 审阅源码、权限、网络行为和版本，再由用户明确确认注册。\n\n### `apktool`\n\n用于：\n\n- 解包 APK\n- 查看和修改 `AndroidManifest.xml`\n- 查看和修改 smali\n- 重建 APK\n\n常用命令：\n\n```bash\napktool d app.apk -o apktool_out\napktool b apktool_out -o rebuilt.apk\n```\n\n### `frida`\n\n用于：\n\n- 动态观察 Java 方法调用\n- Hook native 导出函数\n- 绕过 root 检测、证书校验、调试检测\n\n常用命令：\n\n```bash\nfrida-ps -U\nfrida -U -f com.example.app -l hook.js\nfrida-trace -U -f com.example.app -j '*!*certificate*'\n```\n\n### `adb`\n\n用于：\n\n- 设备连接\n- 安装 APK\n- 查看日志\n- 拉取文件\n\n常用命令：\n\n```bash\nadb devices\nadb install -r app.apk\nadb shell pm list packages\nadb logcat\nadb pull \u002Fdata\u002Flocal\u002Ftmp\u002Ffile .\n```\n\n## 推荐工作流\n\n### 1. Triage\n\n先确定 APK 大致构成，不急着改包或 Hook。\n\n建议动作：\n\n1. 用 `jadx -d jadx_out app.apk` 导出 Java 代码\n2. 用 `apktool d app.apk -o apktool_out` 导出 smali 和资源\n3. 先看：\n   - `AndroidManifest.xml`\n   - 主 `package`\n   - `application`、`activity`、`service`、`receiver`\n   - `lib\u002F` 目录里是否有 `.so`\n4. Issue #65 威胁形态速查（授权样本\u002F设备；详见 `..\u002Freverse-engineering\u002Freferences\u002Fnonpe-format-cookbook.md` §7–8）：\n   - 透明\u002F隐藏图标（AU）：`aapt dump badging` + manifest theme\u002Flabel\u002Ficon → `E-android-hidden-icon-manifest`\n   - Magisk\u002F脚本格机特征与远程 curl|sh（AR\u002FAS）→ 特征与 URL 入证，**不执行**破坏命令 \u003C!-- security-allowlist: curl-pipe-bash -->\n   - 持久化路径（AT）：`service.d` \u002F `priv-app` 等 → `E-android-persistence`\n\n### 2. Java 逻辑观察\n\n优先从 `jadx_out` 读：\n\n- `MainActivity`\n- `Application`\n- 登录、网络、加密、风控相关类\n- 第三方 SDK 初始化类\n\n常见关键词：\n\n- `login`\n- `sign`\n- `encrypt`\n- `cipher`\n- `token`\n- `root`\n- `certificate`\n- `trust`\n- `okhttp`\n- `retrofit`\n- `webview`\n\n如果 Java 代码可读，先在这里定位业务逻辑。\n\n### 3. Smali 与资源层确认\n\n当 `jadx` 结果不完整、混淆重、或需要实际 patch 时，切到 `apktool_out`：\n\n- 看 `smali*\u002F`\n- 看 `res\u002Fvalues\u002Fstrings.xml`\n- 看 `AndroidManifest.xml`\n\n优先 patch：\n\n- `android:exported`\n- 调试标记\n- root 检测返回值\n- 登录验证逻辑\n- 证书校验分支\n\n### 4. 重建与安装\n\n修改后：\n\n```bash\napktool b apktool_out -o rebuilt.apk\n```\n\n或者直接用脚本闭环：\n\n```powershell\npwsh -File \"\u003Cskill-root>\\apk-reverse\\scripts\\rebuild-sign-install.ps1\" -ProjectDir \"apktool_out\" -Install -Reinstall -DeviceSerial \"127.0.0.1:7555\"\n```\n\n说明：\n\n- 本 skill 只保证 `apktool` 重建链路\n- 若后续需要正式安装到设备，通常还需要签名流程\n- 如果任务进入签名\u002F对齐，补充 `apksigner` \u002F `zipalign`\n\n### 5. 动态 Hook\n\n静态分析不足时，用 Frida：\n\n- Hook 登录函数\n- Hook `OkHttp` \u002F `Retrofit` \u002F `WebView` 关键点\n- Hook `javax.crypto`、`MessageDigest`\n- Hook root 检测函数\n- Hook SSL pinning 逻辑\n\n原则：\n\n- 先 Hook Java 层，再看是否需要 native Hook\n- 先打印参数与返回值，再决定是否主动修改返回值\n\n建议：\n\n- 简单一次性命令直接用 `frida-*`\n- 需要稳定复用的注入流程优先走 `scripts\u002Ffrida-run.ps1`\n\n### 6. Native `.so` 分流\n\n如果 APK 中包含关键 `.so`：\n\n- 用 `apktool` 或 `jadx` 找到 `lib\u002F**\u002F*.so`\n- 若只是导出符号、字符串、快速 triage，可用 `radare2`\n- 若要长期深入分析、反编译、改名、类型恢复，用 `ida-reverse`\n\n遇到这些信号要尽快切 native：\n\n- Java 层只是 JNI 包装\n- 核心签名逻辑不在 Java\n- `System.loadLibrary()` 后关键逻辑消失\n- 证书校验\u002F风控在 `.so` 中\n\n## 输出要求\n\n最终至少说明：\n\n- 入口组件与关键类\n- 关键逻辑在 Java、smali 还是 `.so`\n- 已确认的敏感点：登录、签名、root、SSL、WebView、JNI\n- 如果做了 patch，说明改了什么\n- 如果做了 Hook，说明 Hook 了哪个类\u002F方法\u002F导出函数\n\n## 禁止事项\n\n- 不要一开始就盲目改 smali\n- 不要在没看 manifest 和主入口前就写 Hook\n- 不要把 Java 反编译不完整直接等同于“逻辑不可分析”\n- 不要在 `.so` 明显承载核心逻辑时继续死磕 Java 层\n\n## 快速命令备忘\n\n```bash\n# 反编译 Java\n\n> ⚠️ Security notice: examples below may include download-and-execute patterns, shown for defensive understanding and authorized testing only. Never run them against systems you do not own.\n\njadx -d jadx_out app.apk\n\n# 解包 APK\napktool d app.apk -o apktool_out\n\n# 重建 APK\napktool b apktool_out -o rebuilt.apk\n\n# 设备与进程\nadb devices\nfrida-ps -U\n\n# 启动并注入\nfrida -U -f com.example.app -l hook.js\n```\n\n---\n\n## 路由上下文\n\n**上游入口**: `skills\u002FSKILL.md`（总控）、`routing.md`\n**下游出口**:\n- 核心逻辑在 `.so` → `ida-reverse\u002F` 或 `radare2\u002F`\n- 需动态 Hook\u002F验证 → `reverse-engineering\u002Ftools-dynamic.md`（Frida 章节）\n- 通用逆向方法论 → `reverse-engineering\u002FSKILL.md`\n\n**同级关联模块**: `reverse-engineering\u002F`（.so 分析和 Frida 进阶用法）\n\n---\n\n## 按需自举（On-Demand Bootstrap）\n\n本 skill 的入口脚本已接入统一自举系统。缺少工具时不会直接报错，而是自动尝试安装。\n\n### 自动化能力边界\n\n| 工具 | 可自动安装 | 安装方式 | 说明 |\n|------|-----------|---------|------|\n| jadx | ✓ | GitHub Release ZIP | 自动下载解压到 `%USERPROFILE%\\Tools\\jadx\\` |\n| apktool | ✓ | GitHub Release JAR + wrapper | 自动下载 jar 并生成 bat 到 `%USERPROFILE%\\Tools\\apktool\\` |\n| JEB Pro | ✗ | 用户手动安装并提供有效许可证 | 可选的 Android \u002F ARM 交叉验证工具；第三方 MCP bridge 需单独审计 |\n| frida \u002F frida-ps | ✓ | pip install frida-tools | 需要 Python 已安装 |\n| adb | ✓ | winget \u002F fallback path | 自动安装 Android Platform-Tools |\n| zipalign | ✗ | 需手动安装 Android Build-Tools | `sdkmanager \"build-tools;35.0.0\"` |\n| apksigner | ✗ | 需手动安装 Android Build-Tools | 同上 |\n\n### 自举触发点\n\n- `scripts\u002Fdecode.ps1`：缺 jadx 或 apktool 时自动调用 `bootstrap-reverse.ps1`\n- `scripts\u002Frebuild-sign-install.ps1`：缺 adb 或 apktool 时自动调用 bootstrap\n- `scripts\u002Ffrida-run.ps1`：当前仍为手动检查（frida 通常已通过 pip 安装）\n\n### 自举失败时\n\n如果自动安装失败，脚本会抛出明确错误并附带手动安装链接。常见原因：\n- 网络不通（GitHub API \u002F PyPI 不可达）\n- winget 不可用（Windows 版本过低）\n- Java 未安装（apktool 依赖 JDK）\n\n\n## 任务完成自检（声称完成前 MUST 通过）\n\n- [ ] 我是否执行了工作流中的每一步（而不是只阅读）？\n- [ ] 我是否基于 `tool-index` 使用了真实工具路径？\n- [ ] 我是否产出了可复现证据（命令\u002F脚本\u002F截图\u002F报告）？\n- [ ] 我是否完成并回写了 RULES 要求的 Checklist 项？\n- [ ] 若命中隐藏图标\u002F格机\u002F持久化线索：是否按 U–AV cookbook 记录 E-android-* Evidence（授权范围内）？\n\n## Limitations\n\n- Repackaging and hooking tamper with the target app; never do this on apps outside your authorization.\n- Requires local Android toolchain (jadx\u002Fapktool\u002FFrida\u002Fadb); heavily obfuscated or packed apps may resist static analysis.\n\n> Adapted from [zhaoxuya520\u002Freverse-skill](https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill) (MIT).\n",{"name":5,"risk":43,"source":44,"license":14,"date_added":45,"description":7,"source_repo":46,"source_type":28,"license_source":47},"offensive","https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill","2026-08-25","zhaoxuya520\u002Freverse-skill","https:\u002F\u002Fgithub.com\u002Fzhaoxuya520\u002Freverse-skill\u002Fblob\u002Fmain\u002FLICENSE","f3312ba749561b6159f477dbfc9313c875d40a56",".agents\u002Fskills_archive\u002Fapk-reverse","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612","2026-10-25 23:50:58",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill apk-reverse",{"tool":59,"command":60},"bunx","bunx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill apk-reverse",{"tool":62,"command":63},"pnpm","pnpm dlx skills add duc-duy-1612\u002FOnline-Delivery-Systems-Web --skill apk-reverse","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fapk-reverse\u002FSKILL.md",true,[67,73,77,81],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fandroid-advanced.md","REFERENCE","参考文档",10876,"https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fapk-reverse\u002Freferences\u002Fandroid-advanced.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fapk-security-checklist.md",6979,"https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fapk-reverse\u002Freferences\u002Fapk-security-checklist.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Ffrida-bypass-kit.md",2436,"https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fapk-reverse\u002Freferences\u002Ffrida-bypass-kit.md",{"path":82,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Ffrida-cookbook.md",14149,"https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fapk-reverse\u002Freferences\u002Ffrida-cookbook.md",[86,110,134,156,173,193],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":38},"01M6Q0FA5FZ410Z33Z3TFQ4DBA","zero-trust","Implement zero-trust network architecture. Configure identity-based access, micro-segmentation, and continuous verification. Use when implementing modern security architectures.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzero-trust\u002FSKILL.md",[],[93,94,95,96,97,98,88,99,100,101,102,103,28,27,104,105,106,107,108,109],"ZeRO","trust","zero trust","architecture","assessment","verification","segmentation","devops-security","access","configure","only","active","critical","scope","scripts","relevant","implementing",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":38},"01M6Q0F1YZJW3KX5FBKEVZ8CV4","zcode-delegate","Delegate coding tasks to the Z.AI ZCode CLI only when the user explicitly requests it, while the orchestrator retains review and landing responsibility.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fzcode-delegate\u002FSKILL.md",[],[117,118,119,120,121,122,123,124,125,126,127,128,129,103,130,28,131,132,105,133],"delegate","zcode","zcode delegate","review","cli","orchestration","tasks","run","Bash","model","node","read","orchestrator","files","desktop app","app","agent-orchestration",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":38},"01M6Q0ETK41VGNMYEXW0T00AJN","youtube-transcript","Fetch YouTube transcripts through DeepAPI or local fallback tooling and save clean text output.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript\u002FSKILL.md",[],[141,142,143,144,37,145,146,36,34,147,148,149,150,28,27,151,152,153,154,155],"transcript","youtube transcript","youtube","safe","codex","research","text","fetch","tooling","clean","local","output","deepapi","youtube transcripts","blob",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":38},"01M6Q0EPPH2PVMDW40017F8WX0","youtube-transcript-skills","Fetch YouTube video transcripts, search videos\u002Fchannels, browse channels, and extract playlists via the getyoutubetranscript.com API - free tier, no card required.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-transcript-skills\u002FSKILL.md",[],[141,142,143,163,144,164,37,145,36,165,166,167,168,148,169,28,27,170,171,172],"youtube transcript skills","gemini","search","api","Video","browse","api-integration","free","card","channels",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":38},"01M6Q0EAB96PX83W5PTE8A0R8D","youtube-notetaker","Turn YouTube talks into local study notes with slides, transcripts, editable annotations, and a markdown-backed viewer.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-notetaker\u002FSKILL.md",[],[143,180,181,121,144,182,183,184,185,36,167,186,187,188,189,27,190,151,191,192],"youtube notetaker","notetaker","workflow","official","notes","code","markdown","slides","annotations","README","study","dair-academy","viewer",{"skillNo":194,"name":195,"nameZh":6,"description":196,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":197,"categories":198,"keywords":199,"publishedAt":38},"01M6Q0E55F0GW5MX48V8HXS8B5","youtube-full","Fetch YouTube transcripts, search videos, browse channels, and extract playlists via TranscriptAPI — no yt-dlp, no Google API key, works from any cloud server.","https:\u002F\u002Fgithub.com\u002Fduc-duy-1612\u002FOnline-Delivery-Systems-Web\u002Fblob\u002Fmain\u002F.agents\u002Fskills_archive\u002Fyoutube-full\u002FSKILL.md",[],[200,143,201,202,144,164,165,203,204,166,167,168,148,205,169,28,27,170,206,154],"youtube full","full","google","server","dlp","credits","automatic"]