rev-dex-dumper
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineserev-dex-dumper - Android DEX Dumper
rev-dex-dumper - Android DEX 导出工具
Dump DEX files from a running Android application's memory using via ADB.
panda-dex-dumper通过ADB使用从运行中的Android应用内存中导出DEX文件。
panda-dex-dumperTool Location
工具位置
The binary is bundled in this skill's directory. Resolve its absolute path relative to this SKILL.md file:
panda-dex-dumperskills/rev-dex-dumper/panda-dex-dumperpanda-dex-dumperskills/rev-dex-dumper/panda-dex-dumperWorkflow
工作流程
1. Push the tool to device
1. 将工具推送至设备
bash
adb push <path-to>/panda-dex-dumper /data/local/tmp/
adb shell chmod +x /data/local/tmp/panda-dex-dumperbash
adb push <path-to>/panda-dex-dumper /data/local/tmp/
adb shell chmod +x /data/local/tmp/panda-dex-dumper2. Determine target package name
2. 确定目标包名
If the user provides a package name, use it directly. Otherwise, get the foreground app:
bash
adb shell dumpsys activity top | grep 'ACTIVITY' | tail -1 | awk '{print $2}' | cut -d/ -f1如果用户提供了包名,则直接使用该包名。否则,获取前台应用的包名:
bash
adb shell dumpsys activity top | grep 'ACTIVITY' | tail -1 | awk '{print $2}' | cut -d/ -f13. Run the dumper
3. 运行导出工具
bash
adb shell "cd /data/local/tmp && ./panda-dex-dumper -p $(adb shell pidof <package_name>)"The dumped DEX files are saved to on the device.
/data/local/tmp/panda/bash
adb shell "cd /data/local/tmp && ./panda-dex-dumper -p $(adb shell pidof <package_name>)"导出的DEX文件将保存至设备上的目录。
/data/local/tmp/panda/4. Pull DEX files to host
4. 将DEX文件拉取至主机
bash
adb pull /data/local/tmp/panda/ ./Pull to the user's current working directory.
bash
adb pull /data/local/tmp/panda/ ./拉取至用户当前的工作目录。
5. Clean up device cache
5. 清理设备缓存
bash
adb shell rm -rf /data/local/tmp/panda/
adb shell rm /data/local/tmp/panda-dex-dumperbash
adb shell rm -rf /data/local/tmp/panda/
adb shell rm /data/local/tmp/panda-dex-dumperGuidelines
注意事项
- Always verify ADB connection first — run and confirm a device is listed before proceeding.
adb devices - Root may be required — uses
panda-dex-dumperto attach to the target process. If the device is not rooted, the dump will fail. Suggestptraceor running viaadb rootif needed.su - Wait for app to fully load — if the user is dumping a packed app, the real DEX is only available after the packer's class loader has decrypted it. Advise the user to navigate past the splash screen before dumping.
- Handle pidof failure — if returns empty, the app may not be running. Launch it first with
pidof.adb shell monkey -p <package_name> -c android.intent.category.LAUNCHER 1 - Multiple DEX files are normal — packed apps often produce several DEX files. All files in should be pulled.
/data/local/tmp/panda/ - Always clean up — remove both the dumped DEX files and the tool binary from the device after pulling results to avoid leaving artifacts.
- 始终先验证ADB连接 —— 运行并确认设备已列出后再继续操作。
adb devices - 可能需要Root权限 —— 使用
panda-dex-dumper来附加到目标进程。如果设备未Root,导出操作将失败。必要时建议使用ptrace或通过adb root运行。su - 等待应用完全加载 —— 如果用户要导出加壳应用的DEX,真实的DEX文件仅在壳的类加载器完成解密后才会可用。建议用户在跳过启动页后再进行导出操作。
- 处理pidof失败的情况 —— 如果返回空值,说明应用可能未运行。请先使用
pidof启动应用。adb shell monkey -p <package_name> -c android.intent.category.LAUNCHER 1 - 多个DEX文件属于正常情况 —— 加壳应用通常会生成多个DEX文件。应拉取目录下的所有文件。
/data/local/tmp/panda/ - 始终进行清理 —— 拉取结果后,务必从设备中删除导出的DEX文件和工具二进制文件,避免留下残留文件。