hgxszhj/https-github.com-zhaoxuya520-reverse-skill / skills/apk-reverse
apk-reverse
Flagged在 CLI 环境下做 Android APK 逆向时使用。适用于 APK 解包、Java 反编译、smali 修改、重打包、Frida 动态 Hook,以及按需切换到 so/native 分析。优先使用本机已安装的 jadx、apktool、frida、adb、ida-reverse、radare2。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.5 KB |
| references/android-advanced.md | markdown | 10.6 KB |
| references/apk-security-checklist.md | markdown | 6.8 KB |
| references/frida-bypass-kit.md | markdown | 2.4 KB |
| references/frida-cookbook.md | markdown | 13.8 KB |
| scripts/decode.ps1 | script | 5.6 KB |
| scripts/decode.sh | script | 4.8 KB |
| scripts/frida-run.ps1 | script | 3.9 KB |
| scripts/frida-run.sh | script | 4.0 KB |
| scripts/manifest-summary.ps1 | script | 2.6 KB |
| scripts/rebuild-sign-install.ps1 | script | 6.7 KB |
| scripts/rebuild-sign-install.sh | script | 6.6 KB |
scripts/frida-run.ps1
View on GitHub#requires -Version 5
[CmdletBinding()]
param(
[string]$Package,
[string]$Process,
[string]$RemoteHost = '127.0.0.1:27042',
[string]$ScriptPath,
[switch]$Usb,
[switch]$Spawn,
[switch]$Pause,
[switch]$ListDevices,
[switch]$ListProcesses
)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
[Console]::InputEncoding = [System.Text.UTF8Encoding]::new($false)
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
$OutputEncoding = [System.Text.UTF8Encoding]::new($false)
function Get-PythonScriptCandidates {
param([Parameter(Mandatory = $true)][string]$ExecutableName)
$roots = @(
(Join-Path $env:APPDATA 'Python'),
(Join-Path $env:LOCALAPPDATA 'Programs\Python')
)
$candidates = New-Object System.Collections.Generic.List[string]
foreach ($root in $roots) {
if (-not (Test-Path -LiteralPath $root)) {
continue
}
$matches = Get-ChildItem -LiteralPath $root -Directory -ErrorAction SilentlyContinue
foreach ($dir in $matches) {
$candidate = Join-Path $dir.FullName (Join-Path 'Scripts' $ExecutableName)
if (Test-Path -LiteralPath $candidate) {
$candidates.Add($candidate)
}
}
}
return $candidates
}
function Get-ToolPath {
param([Parameter(Mandatory = $true)][string]$Name)
$cmd = Get-Command $Name -ErrorAction SilentlyContinue
if ($cmd) {
return $cmd.Source
}
foreach ($candidate in Get-PythonScriptCandidates -ExecutableName ($Name + '.exe')) {
if (Test-Path -LiteralPath $candidate) {
return $candidate
}
}
# Attempt auto-bootstrap for frida tools
$bootstrapScript = Join-Path $PSScriptRoot '..\..\scripts\bootstrap-reverse.ps1'
if (($Name -in @('frida', 'frida-ps', 'frida-ls-devices')) -and (Test-Path -LiteralPath $bootstrapScript)) {
Write-Host "INFO: $Name not found, attempting auto-bootstrap (pip install frida-tools)..." -ForegroundColor Yellow
& powershell.exe -NoProfile -ExecutionPolicy Bypass -File $bootstrapScript -Capability @('frida') -SkipRefresh
$cmd = Get-Command $Name -ErrorAction SilentlyContinue
if ($cmd) {
Write-Host "INFO: $Name bootstrapped successfully." -ForegroundColor Green
return $cmd.Source
}
foreach ($candidate in Get-PythonScriptCandidates -ExecutableName ($Name + '.exe')) {
if (Test-Path -LiteralPath $candidate) {
return $candidate
}
}
}
throw "Missing required CLI tool: $Name — install with: pip install frida-tools"
}
$fridaLsDevices = Get-ToolPath -Name 'frida-ls-devices'
$fridaPs = Get-ToolPath -Name 'frida-ps'
$frida = Get-ToolPath -Name 'frida'
$python = Get-Command python -ErrorAction SilentlyContinue
if (-not $python) {
throw 'Missing required CLI tool: python'
}
$pythonExe = $python.Source
if ($ListDevices) {
& $pythonExe -c "import frida; [print(f'{d.id}`t{d.type}`t{d.name}') for d in frida.enumerate_devices()]"
exit $LASTEXITCODE
}
$target = if ($Package) { $Package } elseif ($Process) { $Process } else { '' }
if ([string]::IsNullOrWhiteSpace($target) -and -not $ListProcesses) {
throw 'Provide -Package or -Process, or use -ListProcesses.'
}
$deviceFlag = if ($Usb) { '-U' } else { '-H' }
if ($ListProcesses) {
$processArgs = @()
if ($Usb) {
$processArgs += '-U'
}
else {
$processArgs += @('-H', $RemoteHost)
}
& $fridaPs @processArgs
exit $LASTEXITCODE
}
if (-not (Test-Path -LiteralPath $ScriptPath)) {
throw "Frida script not found: $ScriptPath"
}
$fridaArgs = @($deviceFlag)
if (-not $Usb) {
$fridaArgs += $RemoteHost
}
if ($Spawn) {
$fridaArgs += '-f'
} else {
$fridaArgs += '-n'
}
$fridaArgs += $target
$fridaArgs += '-l'
$fridaArgs += $ScriptPath
if (-not $Pause) {
$fridaArgs += '--no-pause'
}
& $frida @fridaArgs
exit $LASTEXITCODE
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |