Skip to content

PandaTestGrid/panda-adbkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

panda-adbkit

基于 OpenSTF/adbkit 的独立二进制打包版本。

特别感谢 OpenSTF 团队开源的 adbkit 项目!

为什么使用打包版本?

对比项 传统方式 (npm) 打包版本
依赖 需要 Node.js 环境 无需任何依赖
安装 npm install -g adbkit 下载即用
体积 Node.js + node_modules 单个可执行文件 (~50MB)
部署 需配置 Node.js 版本 直接复制文件
CI/CD 需安装 Node.js 直接下载使用

下载

Releases 页面下载对应平台的二进制文件:

  • adbkit-macos-arm64 - macOS Apple Silicon (M1/M2/M3)
  • adbkit-macos-x64 - macOS Intel
  • adbkit-linux-x64 - Linux x64
  • adbkit-win-x64.exe - Windows x64

使用方法

macOS / Linux

# 下载后添加执行权限
chmod +x adbkit-macos-arm64

# 查看帮助
./adbkit-macos-arm64 --help

# 查看版本
./adbkit-macos-arm64 -V

Windows

adbkit-win-x64.exe --help

命令说明

Usage: adbkit [options] [command]

Options:
  -V, --version                         输出版本号
  -h, --help                            显示帮助信息

Commands:
  pubkey-convert [options] <file>       将 ADB 生成的公钥转换为 PEM 格式
  pubkey-fingerprint <file>             输出 ADB 公钥的指纹
  usb-device-to-tcp [options] <serial>  通过 TCP 代理提供 USB 设备访问
  parse-tcp-packets <file>              解析 ADB TCP 数据包

示例

# 将 USB 设备通过 TCP 共享 (默认端口 6174)
./adbkit usb-device-to-tcp DEVICE_SERIAL

# 指定端口
./adbkit usb-device-to-tcp -p 5555 DEVICE_SERIAL

# 转换公钥格式
./adbkit pubkey-convert ~/.android/adbkey.pub

# 查看公钥指纹
./adbkit pubkey-fingerprint ~/.android/adbkey.pub

前置要求

  • 系统需要安装 adb 命令行工具并添加到 PATH
  • ADB server 需要运行 (adb start-server)

在 CI/CD 中使用

# GitHub Actions 示例
- name: Download adbkit
  run: |
    curl -L -o adbkit https://github.com/PandaTestGrid/panda-adbkit/releases/download/v2.11.1/adbkit-linux-x64
    chmod +x adbkit

- name: Use adbkit
  run: ./adbkit --help

本地构建

# 安装依赖
npm install

# 构建所有平台
npm run build

# 构建指定平台
npm run build:macos      # macOS ARM64
npm run build:macos-x64  # macOS Intel
npm run build:linux      # Linux x64
npm run build:win        # Windows x64

许可证

Apache-2.0 (继承自原项目)

致谢

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors