
Android APK रिवर्स इंजीनियरिंग के लिए एजेंट स्किल: dex पैचिंग, अनपैकिंग, रीपैकिंग, विज्ञापन और पेवॉल हटाना, नेटिव .so विश्लेषण, और Frida के साथ रनटाइम इंस्ट्रुमेंटेशन।
English · 简体中文
क्षमताएँ · संरचना · इंस्टॉल · आवश्यकताएँ · विफलता सूची · दायरा · रखरखाव · अस्वीकरण
Android APK रिवर्स इंजीनियरिंग, डीब्लोटिंग, विज्ञापन हटाने, सर्जिकल dex पैचिंग, रीपैकिंग, और रनटाइम/सर्वर विश्लेषण के लिए एक Agent Skill।
यह एक skill है, ट्यूटोरियल नहीं: इसे इस तरह लिखा गया है कि एक एजेंट (Claude Code,
Codex, या Agent Skills फ़ॉर्मेट का समर्थन करने वाला कोई भी हार्नेस) इसे काम करते समय लोड कर सके, इसलिए इसे
प्रगतिशील प्रकटीकरण के लिए व्यवस्थित किया गया है — एक छोटा निर्णय-केंद्रित SKILL.md, विस्तृत
संदर्भ जो केवल तब लोड होते हैं जब किसी चरण को उनकी आवश्यकता होती है, और पैरामीटरयुक्त स्क्रिप्ट्स जिन्हें आप सीधे चला सकते हैं।
SKILL.md को जानबूझकर सलाह के बजाय गेट्स वाली एक प्रक्रिया के रूप में लिखा गया है, क्योंकि
देखा गया विफलता मोड अज्ञानता नहीं है — यह एक मॉडल का पूरी चीज़ पढ़ना, उससे सहमत होना, और
फिर भी पहले सिद्धांतों से तर्क करना है।
इसलिए मुख्य भाग में चार चीज़ें हैं जिन पर कार्य करना है, न कि पढ़ना:
और अंत में एक चीज़ जिसे रोका जाना है: "done" की एक परिभाषा है (छह मदें)। एक साफ़ लॉग उनमें से एक नहीं है। सभी छह से कम कुछ भी एक चेकपॉइंट है, और इसे शेष कार्य के साथ एक चेकपॉइंट के रूप में रिपोर्ट किया जाना चाहिए।
यदि आप इसे पढ़ने वाले एजेंट हैं: सबसे सस्ता संभव पहला कमांड है
python skills/apk-reverse/scripts/doctor.py। यह आपको बताता है कि इनमें से कौन-से टूल यहाँ मौजूद हैं, कौन-सी
स्क्रिप्ट्स वास्तव में चल सकती हैं, और क्या पर्यावरण में कुछ पहले से ही आपके
मापों को दूषित कर रहा है।
fault addr 0x4) शामिल है जो बिल्कुल एक साधारण null-dereference
बग जैसा दिखता है, और "इसे निष्क्रिय करो, लेकिन कभी इसे वापस न लौटाने वाला बनाकर नहीं" नियम जो तय करता है कि
फ़िक्स काम करता है या पूरे ऐप को इस तरह फ्रीज़ कर देता है जो कारण जैसा बिल्कुल नहीं दिखता।SKILL.md, references/ और scripts/ सभी स्किल डायरेक्टरी, skills/apk-reverse/ के अंदर हैं।
रिपॉज़िटरी रूट पर सब कुछ स्किल्स में साझा किया गया रखरखाव टूलिंग है, किसी
इंस्टॉल किए गए स्किल का हिस्सा नहीं।```
SKILL.md a procedure with gates, not background reading:
how-to-use -> four override rules (R1-R4)
symptom index (a matching row is a stop signal)
four gates (G1-G4, actions with pass criteria)
thirteen classification questions
the workflow, with a per-step skip condition and a two-strike rule
what "done" means -> stop conditions -> constraints -> indexes
references/ loaded on demand, one topic each
recon.md identify packer, SDKs, code location, tamper checks; unpacking
server-config-and-updates.md
the most common shape of "ad" and the one usually mis-diagnosed:
the server supplies UI the client renders (launch screen, popup,
announcement, tab set). The two-layer fetch that proves it, how to
find the config DTOs by the field names data classes keep, why you
patch the decision and not the data, deciding the scope of "remove",
and remote re-enable / cached config durability
byte-level-patching.md equal-length byte edits: why they beat method rebuilding (measured),
locating an instruction's exact offset without scraping listings,
the instruction width traps that desynchronise a decode, neutralise
a branch vs redirect it, dex header integrity field order, and the
verifier's move-result rule
packers.md hardened targets: rejection signals, measuring the validation
boundary with single-variable tests, choosing a native host
code-virtualization-and-custom-linkers.md
the layer between "packed" and "clean": whole classes turned into
native declarations, a private loader whose SONAME does not match
its filename, an embedded self-decrypting payload, a Java-layer
"signature killer" that logs success while a native check kills you.
The keep-it/drop-it deadlock, how to separate the checker from the
implementation, and the string-redirect technique that ends it
without neutralizing anything
framework-runtimes.md Flutter / React Native / Unity: which layer owns the UI, and how to
find logic when there are no symbols (string encoding traps)
dart-aot.md Dart AOT in depth: version pinning and building a matching decompiler,
the object pool and reference indexes, register/boolean conventions,
the three signatures that identify business logic, locating, patching.
Begins with the snapshot-decoding front end it depends on (aotopsy or
blutter) because the pool listing is an input, not something this skill
produces itself
native-and-so.md .so hosts, DT_NEEDED vs JNI_OnLoad, relocation limits,
relocation-free bootstrapping, replacing Java methods natively,
and which ABI/library is
native-tamper-and-suicide.md how a hardened library kills its own process: the visible
mechanisms, how to tell which one actually fires, how to find the
site, forged section headers, function boundaries from
PT_GNU_EH_FRAME, scanner traps, and neutralising safely
detection-and-anti-analysis.md when the app fights back or the tool cannot run here: telling
detection apart from a broken environment, deciding by cost instead
of escalating, recognising an environment where dynamic analysis
simply does not work, and keeping the "blocks my analysis" question
separate from "blocks the deliverable"
toolchain.md what to install, how to invoke it non-interactively, which tools
are GUI-only, version-alignment traps, working offline,
, and which signer to use
long-task-discipline.md live record, conclusion grading, drift control, timeout and
wait calibration, deliverable-form drift, captures-you-never-looked-at,
long-context decay, handover
ad-removal.md ad taxonomy, wrapper mapping, callback trap, global gates, verification
updates-and-forced-upgrade.md keeping a patched build alive: locating the version check, the
two-layer patch (no-op the routine, neutralise the comparison), what not
to touch (manifest version, installer permission, host blocking),
self-update and hot-update/remote-config channels, verifying that no
version request is issued at all
account-gates.md sign-in walls, forced phone binding, guest mode: telling a client-side
gate (patchable) apart from an account-scoped resource (not), why
fabricating a session is worse than staying signed out, and the
unavoidable session loss after a reinstall
signature-derived-keys.md when the app's own signing certificate is used as key material:
detection greps, why offline extraction is unreliable, the
hardcode-then-verify procedure
membership-and-limits.md server vs client authority; what is and is not patchable
server-api.md probe an app's API; prove who owns the gate
tls-and-cert.md feature-scoped network failures: expired certs, dual trust chains
third-party-builds.md auditing a "cracked"/"modded" APK before trusting it
dex-patching.md patch-layer table + dexlib2 technique in depth
patch-audit.md proving a patch and is : length-vs-bytes
comparison, the equal-length-replacement blind spot, verifier-level
legality (move-result adjacency) checked statically, text-matching
patch traps, and reporting a missing patch
repack-and-sign.md repack rules, unpack-and-repack, signing, post-install hazards
runtime-data.md DataStore / SharedPreferences / SQLite / protobuf; when the app
rewrites your edit, and decoding a value that looks encrypted
dynamic-frida.md Frida setup, version pinning, the four-layer probe, hook strategy
environment.md device/emulator setup, root, ADB, offline devices, log signals,
emulator console control and recovery, preflight, look-at-the-screen
verification.md the claim ladder; what "done" means
desensitization-and-leak-scans.md
publishing discipline: what must be desensitized and what must stay,
the do-not-anonymize list, the leak scanner and its exit states, and
the entry-point file as a prompt surface
precedents/ the positive case library: route including dead ends, a grade per
assertion, measured pit-falls, and the write-back checklist
routing.md the on-demand inventory: every reference with when to load it, every
script with what it does, and a mirror of the symptom index
rasc-and-droidsaw.md the Rust re-implementation of the ASC indexer: measured speedup and
identical class sets, the enum shape where it silently drops bodies,
and how to build and verify it
evidence-summary.md the condensation that ships with the skill: capability, one-line
conclusion, strength, and the evidence you can actually open in an
installed copy
../evals/ NOT a spec directory either, but the location the Agent
Skills guidance recommends: evals.json holds the
with-skill / without-skill cases this skill has not run,
with the method for running them written into the file
../evidence/ NOT a spec directory: the machine-readable companions to the evidence
summary reference above -- capability-matrix.json (the same rows with
more fields), tested-tool-versions.json (versions and the probe behind
each), known-limitations.md (the installer-facing limit list). Shipped
inside the skill so an installed copy can answer "was this verified, and
how strongly" without the repository
pitfalls.md the failure catalogue -- read before building
advanced-unpacking.md the dump landed but the bodies are empty: extraction-shell diagnosis by
trivial-body ratio, FART-style active invocation and why its classic hooks
died on Android 12-16, code_item splicing, the root-side dump for when
frida itself is refused, and the honest VMP boundary
lsposed-and-modules.md the repack is refused, so deliver a system-level hook module instead:
module anatomy, a gradle-free build chain, scope configuration and how to
verify injection, and the layer a Java module cannot reach
emulation-and-rpc.md call the routine instead of reading it: Unidbg/Unicorn emulation and its
environment-filling cost, versus service-ifying a live function over Frida RPC
native-dbi-and-deobfuscation.md
OLLVM shapes, Frida-Stalker traces, the trace-to-CFG route, the
Stalker/QBDI/emulation decision, and two measured boundaries (a follow that
delivers no events, and a crash from following a hot libc export)
protocol-reverse.md protobuf without a schema, schema recovery from decompiled code, gRPC frame
capture, the QUIC/HTTP3 limit, and native-side certificate pinning
kernel-and-environment-hardening.md
userspace hooking provably cannot reach the check: raw svc, init_array-early
detection, what each root scheme hides, the kernel-route map with its version
gate, and when to stop escalating
on-device-tooling.md working from the phone itself: MT Manager edit/repack/sign and its APK MCP,
LSPosed Manager, Termux+frida, on-device data inspection
java2c-and-jni-sinking.md Java2C and JNI sinking, the two hardening shapes most easily confused
with an extraction shell: the table that separates landing shell /
extraction shell / VMP / Java2C / JNI sinking, why the code is in the
and in a dumped dex, and why a symbol search
comes back empty (dynamic registration, )
split-apk.md App Bundle / split APK sets: what the set is, pulling it off a device,
merging into one APK vs signing the set as a unit, the install refusals
and what each means, and making an installable fixture from a pulled set
vmp-differential-analysis.md
the known-plaintext differential for a real Dex VMP: which links can be
automated and which cannot (the upload is the bottleneck), the coverage a
compiled fixture can reach, how to a derived private-opcode
table, smali generation, and when the route is closed
coverage-and-limits.md the claim ladder applied to the skill itself: the evidence behind each
covered item, the dependencies this skill does not ship, and what was
never exercised
handoff-boundaries.md where this skill ends and another discipline begins: the JNI form
table, the packer-versus-loader split, and what "verified" means for
each of the four deliverable forms
scripts/ parameterized, path-agnostic
doctor.py run this first: capability report + per-script runnability, finds
tools installed off-PATH or as runnable jars, and surfaces the
environment facts that poison experiments (clock skew, leftover
adb forward / proxy, a device-side frida process already running)
dexutil.py dependency-free dex reader: structural walk + exact instruction
decode, dex header recompute/verify (correct checksum/signature
order), branch-target and operand helpers. Library shared by the
dex scripts, also runs standalone to dump one method with offsets
dex_find_insn.py locate an instruction by decoded semantics and print its exact byte
offset with context and both sides of any branch -- how you find a
patch site instead of guessing offsets
dex_patch_bytes.py equal-length byte patches from a JSON spec: semantic match, polarity
pin via expect_next, equal-length enforcement, verifier check, dex
header recompute, re-decode to prove it landed (--dry-run first)
dex_check_verifier.py tier-3 check: does any conditional branch target a move-result
(bypassing its producer)? Compares two builds and separates
pre-existing findings from regressions your patch introduced
coldstart.py cold-launch capture: timed screenshot burst + logcat signals +
installed-build facts + launch timing, and warns when the foreground
activity is not your app
so_constpatch.py same-length in-place rewrite of an isolated string constant, for
redirecting a library load instead of defeating a check
smtool.py baksmali/smali wrapper with a configurable classpath
dexpatch/ dexlib2 method-level rewriter (for changes that need new instructions)
patch_smali.py method-body replacement in a smali tree
dex_strpatch.py byte-level string patch with a string_ids ordering guard
dex_classdiff.py prove a dex edit was surgical
dex_strings.py strings/URLs/SDK markers without a decompiler
dart_pool_strings.py recover literals from a Dart AOT snapshot (framed entries, the
one-byte vs UTF-16 split, file offsets, run-length noise filter)
dart_pprefs.py build/query the object-pool -> code-site index for a Dart snapshot
dart_disasm.py annotated windowed disassembly of Dart AOT code + B/BL caller index
find_refs.py count callers of a method before patching it
repack.py rebuild APK, strip only signatures, keep META-INF/services/, write a
4-byte-aligned archive (resources.arsc STORED+aligned), sign, verify;
also split APK / App Bundle sets: inventory, sign every member with one
keystore, or merge code/native members into a standalone APK
devsh.py quoting-safe ADB shell helper
usb_net_proxy.py give an offline device network over USB
datastore_inject.py encode/inject AndroidX DataStore preferences safely
probe_api.py probe an HTTP API with the right headers
grab_crash.py recover stacks hidden by a crash-reporter SDK
install_test.py install + launch health check with logcat signal scan
frida_probe.js four-layer runtime probe (app net layer + OkHttp + java.net + exceptions)
run_probe.py inject the probe, stream it to a log file, stay resident
tls_check.py strict certificate check for one or more hosts
preflight.py environment check before every experiment block (device, root,
ABI/translation, clock skew, leftover proxy/forwards, dead server)
lib_map.py what is into a live process: per-library path,
base, architecture, and whether it came from the APK or was
materialized at runtime
elf_plt.py resolve a PLT stub to its imported symbol (x86_64 + aarch64) from
the relocation table; list a symbol's callers; byte-diff two
libraries and name the symbol each changed stub belongs to
apk_diff.py entry-level diff of two builds: changed / added / removed, by
content hash so same-size replacements are caught
native_crash.py locate a native death from a log or tombstone: signal, fault
address, registers, frames split app vs system, the faulting
instruction, and a flag when the fault looks
blob_decode.py search, don't guess, the framing of a stored value
(base64/hex x rotation x deflate); re-encode the edited payload
snap.py bounded burst screenshots + control-tree capture with a stall
detector, and a verdict on whether the tree is usable at all
sig_probe.py find the exact signatures[0].toCharsString() value — offline
candidates from an APK, or the authoritative read from a device
spawn_patch_detach.py spawn under a Frida probe, detach, then launch and capture: under
spawn mode the Activity stack often never comes up, and memory
writes survive detach while hooks do not
hook_patch_only.js the minimal probe for spawn_patch_detach.py — neutralise one native
death site by offset and report PATCHED
dex_dump_validate.py dedupe, validate and rank a directory of dumped dex images: sha256
grouping, header integrity, the trivial-body ratio that separates a real
dump from an extraction-shell skeleton, and a most-likely-original ranking
(--trim for page-aligned /proc//mem captures)
dex_mem_scan.py search memory captures for embedded dex images and extract each at the
size its own header declares -- for a decrypted dex sitting in an
anonymous mapping no maps entry names
lsposed_scaffold.py generate a minimal LSPosed/Xposed module project (manifest with the
xposed meta-data, assets/xposed_init, hook class, gradle-free build notes)
frida_rpc_serve.py bridge a Frida script's rpc.exports to a local caller with reconnect
handling, so a live native function can be called rather than reversed
rpc_template.js the editable companion to frida_rpc_serve.py
stalker_trace.js instruction-level tracing with Frida Stalker: configurable targets,
trigger selection, the event stream, and output-size rules
stalker_report.py reduce a stalker_trace.js log to block histograms and call sequences,
with an explicit diagnostic for the measured zero-event case
mt_mcp_probe.py probe MT Manager's on-device APK MCP (Streamable HTTP, port 8787):
JSON-RPC handshake plus the grouped tool inventory
java2c_probe.py collect the evidence that separates Java2C from an extraction shell, a
VMP and ordinary JNI sinking: native density and stub ratio from the dex,
JNI_OnLoad / dynamic registration / toolchain strings from the ,
each item labelled strong/medium/weak
protobuf_decode_raw.py schema-free protobuf decode: hex / file / stdin to a JSON tree, every
length-delimited field kept as a candidate set with ties labelled rather
than guessed, plus a byte-exact re-encode to check a round trip
vmp_diff_harness.py build a labelled opcode-coverage fixture, derive a candidate private-
opcode map from an original/hardened dex pair, verify the comparison in a
closed loop, and render a restored stream as a smali skeleton
kernelsu_syscall_mask.py generate a KernelSU/APatch syscall-masking scaffold: an installable
userspace module skeleton plus KPM/LKM/eBPF kernel-side templates, each
with its version gate and an explicit unverified label
rasc_build.py build and verify rasc, the Rust ASC re-implementation:
--check what is present, --build clone plus cargo, --verify an APK
against droidasc and fail on any class-set difference
scan_leaks.py scan a repository for target identity before publishing it: bundle ids
in manifest / / contexts, serial-shaped tokens, PATs, inline
appkey assignments, literal endpoints, host user paths. Exemptions for
everything that must stay (tools, libraries, CVEs, hardening products,
public crackmes, placeholders), findings carry their context,
prints why a hit was suppressed, exit 0/1/2
svc_scan.py name the syscall behind an inline and the segment it sits in,
which decides whether a libc-level hook can observe the call at all;
shows neighbours because a byte scan also matches data
anti_detect_probe.js observer-only Frida probe (patches nothing): path/loader/thread/kill
hooks with caller module + offset, an environment self-report
(, frida-named mappings), and live streaming so a sub-second
self-destructing target still yields evidence
रिपॉज़िटरी में एक **executable** टेस्ट लेयर भी है, जो evidence record से अलग चीज़ है: `tests/` यह सत्यापित करता है कि स्क्रिप्ट क्या करती हैं (unit, CLI contract, no-device integration) और `tests/benchmark.md` रिकॉर्ड करता है कि किसी वास्तविक target पर किसी route ने क्या किया। `tests/README.md` इस विभाजन को बताता है, और `.github/workflows/ci.yml` gates के साथ suite चलाता है।
## Install
यह रिपॉज़िटरी एक **skills repository** है: skill `skills/apk-reverse/` पर स्थित है, जो वह layout है जिसे `skills` CLI resolve करता है, और इसे directory कॉपी करने के बजाय नाम से install किया जाता है:```
npx skills add newliver666/apk-reverse # install every skill in the repo
npx skills add newliver666/apk-reverse --list # list what is here, install nothing
npx skills add newliver666/apk-reverse --skill apk-reverse -y
npx skills use newliver666/apk-reverse@apk-reverse # use it once, without installing
CLI डिफ़ॉल्ट रूप से स्किल को आपके एजेंट की skills डायरेक्टरी में symlink करता है (--copy इसके बजाय स्वतंत्र
प्रतियाँ बनाता है), और -g वर्तमान के बजाय हर प्रोजेक्ट के लिए इंस्टॉल करता है। रिपॉज़िटरी में एक स्किल होने पर,
--skill apk-reverse आज अनावश्यक है; यह यहाँ लिखा गया है क्योंकि दूसरी स्किल होने पर यही एक स्किल का चयन करता है।
इंस्टॉल होने के बाद, एजेंट तब SKILL.md लोड करता है जब कोई कार्य उसके विवरण से मेल खाता है, और
references/* को केवल आवश्यकतानुसार शामिल करता है। कोई ग्लोबल स्टेट नहीं, कोई मशीन-विशिष्ट पथ नहीं, और कोई बिल्ड चरण नहीं।
कुछ भी अनिवार्य नहीं है; प्रत्येक स्क्रिप्ट जाँचती है कि उसे क्या चाहिए। skills/apk-reverse/scripts/doctor.py रिपोर्ट करता है
कि इनमें से कौन-कौन यहाँ मौजूद हैं, इसलिए कौन-सी स्क्रिप्ट चल सकती हैं, और — उपयोगी रूप से — कौन-से टूल PATH के अलावा कहीं और मौजूद हैं।
यदि आपका टूलचेन PATH के बाहर रहता है (एक प्रोजेक्ट-लोकल tools/ डायरेक्टरी, एक वर्ज़न्ड SDK फ़ोल्डर, कमांड के बजाय एक
रन करने योग्य .jar), तो APKREV_TOOLS को एक या अधिक डायरेक्टरियों पर सेट करें और doctor.py
उन्हें ढूँढ लेगा:```
set APKREV_TOOLS=
स्क्रिप्ट्स स्वयं सादे `python3` हैं और Windows, macOS तथा Linux पर समान रूप से काम करने के लिए बनाई गई हैं; जहाँ कोई स्निपेट केवल POSIX के लिए है वहाँ उसे चिह्नित किया गया है। यहाँ कुछ भी Unix शेल मान कर नहीं चलता।
| Tool | उपयोग |
|---|---|
| Python 3.9+ | सभी स्क्रिप्ट्स |
| **`droidasc`** (ASC) (**वैकल्पिक परंतु अत्यधिक अनुशंसित — इसे पहले इंस्टॉल करें**) | पूरे-APK क्रॉस-रेफ़रेंस इंडेक्स: `findrefs` / `listclass` / `getclass` / `getmanifest`। एक `pip install droidasc`, कोई JVM नहीं, कोई SDK नहीं, कोई इंडेक्स बिल्ड नहीं। "N हज़ार क्लासेस में से कौन इस स्ट्रिंग का उल्लेख करता है" को सब-सेकंड क्वेरी में बदल देता है, और यह उस क्लास तक पहुँचने का एकमात्र रास्ता है जिसका नाम R8 ने मैंगल कर दिया हो। **यह वह टूल है जिसकी ओर एक एजेंट को किसी भी पूर्ण डीकंपाइल से पहले पहुँचना चाहिए** — देखें `skills/apk-reverse/references/toolchain.md` §droidasc (ASC) — किसी APK से पूछें "इसका संदर्भ कौन देता है?", एक क्वेरी में |
| `ddc` (वैकल्पिक परंतु अत्यधिक अनुशंसित) | क्वेरी सबकमांड्स (`info`, `findrefs`, `strings --with-locations`, प्रति-क्लास डीकंपाइल) के साथ सिंगल-बाइनरी dex→Java डीकंपाइलर। कोई JVM नहीं। जो ASC **ढूँढता** है उसे **पढ़ता** है; पैकेज पहचान भी विश्वसनीय रूप से रिपोर्ट करता है — देखें `skills/apk-reverse/references/toolchain.md` §ddc — क्वेरी सबकमांड्स के साथ dex-to-Java (अपनाने योग्य) |
| `baksmali` / `smali` + `dexlib2` jars | डिसअसेम्बली, असेम्बली, सर्जिकल पैचिंग |
| JDK (`javac`, `java`) | dexlib2 पैचर को बनाना/चलाना; `keytool`/`jarsigner` भी प्रदान करता है |
| Android SDK build-tools (`aapt`, `zipalign`, `apksigner`) | मैनिफ़ेस्ट जानकारी, अलाइनमेंट, साइनिंग। **`apksigner` ही उपयोग करने योग्य साइनर है** — `jarsigner` आर्काइव को फिर से लिखता है और Android R+ के लिए आवश्यक अलाइनमेंट तोड़ देता है |
| `uber-apk-signer` (वैकल्पिक) | एक-चरणीय अलाइन + साइन |
| ADB | डिवाइस कार्य |
| Frida (होस्ट पैकेज + मेल खाता ऑन-डिवाइस सर्वर) | डायनामिक विश्लेषण |
| रूटेड डिवाइस या एमुलेटर | स्टैटिक विश्लेषण से आगे कुछ भी |
इनमें से किसी को `PATH` पर होने की आवश्यकता नहीं है: प्रत्येक स्क्रिप्ट उन टूल्स के लिए स्पष्ट पथ स्वीकार करती है जिन्हें वह शेल आउट करती है, और `skills/apk-reverse/references/toolchain.md` ऐसी इंस्टॉल खोजने को कवर करता है जिसके बारे में `PATH` नहीं जानता (जो `apksigner` और `keytool` के लिए सामान्य स्थिति है)।
## पहले यह पढ़ें
**यह प्रोजेक्ट केवल सीखने, शोध और अधिकृत सुरक्षा परीक्षण के लिए प्रकाशित है।** इसमें कोई एक्सप्लॉइट पेलोड, कोई लक्ष्य डेटा और कोई तृतीय-पक्ष बाइनरी शामिल नहीं है — यह एक विधि, स्क्रिप्ट्स का एक सेट और एक साक्ष्य रिकॉर्ड है। जिस भी चीज़ की ओर आप इसे इंगित करते हैं उसका विश्लेषण करने का अधिकार आपके पास होना आपकी ज़िम्मेदारी है; इस फ़ाइल के अंत में **Disclaimer** देखें।
`skills/apk-reverse/references/pitfalls.md`। यह यहाँ की सबसे मूल्यवान फ़ाइल है — इसकी प्रत्येक प्रविष्टि एक ऐसी विफलता है जिसने पूरी तरह स्वस्थ दिखते हुए एक टूटा हुआ आर्टिफ़ैक्ट उत्पन्न किया।
सबसे अधिक नुकसान पहुँचाने वाली चार:
1. रीपैक के दौरान पूरे `META-INF/` को हटाना ServiceLoader रजिस्ट्रेशनों को मिटा देता है और ऐप स्टार्टअप पर एक ऐसी त्रुटि के साथ मर जाता है जो किसी असंबंधित लाइब्रेरी का नाम लेती है।
2. `string_ids` क्रम को सुरक्षित रखे बिना बाइट-स्तरीय स्ट्रिंग को पैच करने से पूरा dex अस्वीकृत हो जाता है, जबकि चेकसम और हस्ताक्षर पूरी तरह सत्यापित होते हैं।
3. पूरे-ट्री smali राउंड-ट्रिप के साथ dex को पुनर्निर्मित करना R8 आउटपुट को अदृश्य रूप से नुकसान पहुँचाता है — क्लास टेबल्स साफ़ तुलना करती हैं, और यह केवल रनटाइम पर फटता है।
4. किसी नेटिव टर्मिनेट पथ को **वापस न लौटने** वाला बनाकर निष्क्रिय करना। एक स्पिनिंग स्टब चेक को दबाता नहीं है; यह कॉलर और उसके पीछे के हर थ्रेड को फ्रीज़ कर देता है। ऐप *बिना किसी क्रैश रिकॉर्ड के* हैंग हो जाता है, और अंततः होने वाली मृत्यु का दोष उस चीज़ पर डाल दिया जाता है जिसने फ्रीज़ हुई प्रक्रिया को मारा।
## दायरा
अपने स्वयं के एप्लिकेशनों पर काम करने, उन नमूनों पर जिनका विश्लेषण करने के लिए आप अधिकृत हैं, और CTF/प्रतियोगिता सैंडबॉक्स में काम करने के लिए बनाया गया। इसमें कोई वेंडर किया गया तृतीय-पक्ष बाइनरी और कोई लक्ष्य-विशिष्ट डेटा नहीं है।
यह क्या कवर करता है, और क्या जानबूझकर नहीं करता, यह `SKILL.md` के शीर्ष पर **Coverage** के अंतर्गत बताया गया है। संक्षिप्त संस्करण: केवल Android (iOS नहीं), और उन परतों पर गहराई से जिन पर वास्तव में काम किया गया है — dex पैचिंग, रीपैकिंग, पैकर्स और कस्टम लोडर, नेटिव टैम्पर रिस्पॉन्स, और Flutter/Dart AOT। एक एक्सटेंशन पास ने प्रलेखित मार्गों की एक दूसरी श्रेणी जोड़ी: जब रीपैक अवरुद्ध हो तो **मॉड्यूल-साइड डिलीवरी**, **एक्सट्रैक्शन-शेल रिकवरी** और उसकी VMP सीमा, पढ़ने के बजाय कॉल करने के लिए **एमुलेशन और लाइव RPC**, OLLVM के विरुद्ध **इंस्ट्रक्शन-स्तरीय ट्रेसिंग**, REST से आगे **प्रोटोकॉल रिवर्सिंग**, जब userspace हुकिंग सिद्ध रूप से पहुँच से बाहर हो तो **कर्नेल-साइड मार्ग** का नक्शा, और **ऑन-डिवाइस टूलिंग**। इसके बाद एक **बेंचमार्क पास** ने सार्वजनिक लक्ष्यों को उन मार्गों के अंतर्गत रखा (`tests/benchmark.md`): इसने **Java2C विभेदन** (वह गलत निदान जो एक एजेंट को ऐसे डिक्रिप्टेड DEX के पीछे भेज देता है जो कभी अस्तित्व में नहीं होता), **स्प्लिट APK / App Bundle हैंडलिंग**, **स्कीमा-रहित protobuf डिकोडिंग**, एक **Dex-VMP डिफ़रेंशियल** हार्नेस, और **अपने वर्ज़न गेट्स के साथ कर्नेल-मॉड्यूल टेम्पलेट्स** जोड़े — और इसने दो पूर्व दावों को सुधारा जिनके माप उनसे असहमत थे। Unity/IL2CPP लॉजिक रिकवरी, React Native/Hermes बाइटकोड इंटर्नल्स, और सर्वर-साइड प्राधिकारी को परास्त करना **कवर नहीं** किया गया है, और स्किल ऐसा कहने और रुकने के लिए लिखी गई है बजाय इसके कि वह निकटतम प्रलेखित प्रक्रिया को ऐसे लक्ष्य पर लागू करे जिसके लिए वह नहीं लिखी गई थी।
चार योग्यताएँ जिन्हें Coverage अनुभाग पूर्ण रूप से बताता है और जो यहाँ भी होनी चाहिए:
- **Flutter/Dart AOT विश्लेषण की एक निर्भरता है।** वर्कफ़्लो एक पूल लिस्टिंग (`pp.txt`-श्रेणी के आउटपुट) से शुरू होता है। उसे उत्पन्न करने के लिए एक स्नैपशॉट-डिकोडिंग डीकंपाइलर चाहिए — aotopsy (एक स्टैटिक बाइनरी, कोई टूलचेन नहीं) या blutter (सोर्स से बनाया गया, ~80 सेकंड) — और इस रिपॉज़िटरी में कोई भी नहीं है। इसे अंतर्निहित छोड़ने के बजाय एक पूर्वापेक्षा के रूप में नामित किया गया है।
- **इस रिपॉज़िटरी के हर दावे के पीछे कोई रन नहीं है।** `docs/tool-verification/` रिकॉर्ड करता है कि वास्तव में क्या मापा गया, किस लक्ष्य पर, और किस स्वतंत्र क्रॉस-चेक के साथ; जो कुछ भी वहाँ कवर नहीं है वह अनुभव से प्रलेखित है और इसे इस स्किल की अपनी दावा-सीढ़ी के अनुसार *अनुमानित* पढ़ा जाना चाहिए।
- **एक्सटेंशन पास अलग से रिकॉर्ड किया गया है और अधिकतर *अनुमानित* है।** इसका साक्ष्य `docs/tool-verification/EXTENSION-*.md` में रहता है, प्रति विषय एक फ़ाइल, अपने स्वयं के सामर्थ्य नोट के साथ। वहाँ सामान्य आकार यह है कि *टूल मापा गया, मार्ग नहीं* — इसलिए किसी भी नए दस्तावेज़ को सत्यापित मार्ग मानने से पहले उन फ़ाइलों को पढ़ें।
- **बेंचमार्क पास प्रति पंक्ति, उस पंक्ति के अपने सामर्थ्य के साथ रिकॉर्ड किया गया है।** `tests/benchmark.md` प्रत्येक सार्वजनिक लक्ष्य का नाम देता है, वे स्क्रिप्ट्स जिन्हें पंक्ति चलाती है, वास्तव में क्या हुआ (उन पंक्तियों सहित जो विफल हुईं और जिन्हें किसी ने नहीं चलाया), और साक्ष्य कितना मज़बूत है। `unverified` चिह्नित पंक्तियाँ इस रिपॉज़िटरी में साक्ष्य के बारे में कथन हैं, तंत्र के बारे में नहीं।
## रिपॉज़िटरी रखरखाव
रूट पर चार टूल्स रहते हैं और वे इंस्टॉल किए गए स्किल का हिस्सा नहीं हैं:```
check_repo.py every skill discovered, frontmatter valid, scripts runnable,
documented paths resolve, README paths explicit and existing,
and -- on the tracked surface only -- no target identity
(delegates the rules to skills/apk-reverse/scripts/scan_leaks.py
so there is one place to argue with the exemption list)
check_refs.py every cross-reference that names a section of another
document reaches a real heading in that document
check_routing.py the on-demand inventory still matches the entry point: the
symptom mirror agrees with SKILL.md, every reference file is
named in skills/apk-reverse/references/routing.md, and every
script is too
check_commands.py every command a document tells you to run is checked against
the script's own argparse table -- a documented flag that does
not exist is a drift the anchor checks cannot see
check_budget.py keep the always-loaded part from creeping: SKILL.md's whole
body (index lines included, because they load too) measured in
lines and tokens, index-row length, long files with no
navigable head, and hedged rules reported as a trend
build_scripts.py audit for machine-specific leftovers (absolute paths, credentials)
निरंतरता का एक स्वाभाविक प्रतिकार होता है -- एक टूटा हुआ पथ ज़ोर से विफल होता है, और कोई उसे ठीक कर देता है। Bloat का कोई नहीं है, यही कारण है कि तीसरा टूल मौजूद है: हर पास एक संदर्भ, एक इंडेक्स पंक्ति और एक कवरेज दावा जोड़ता है, और बिना किसी माप के रिपॉज़िटरी में कुछ भी ध्यान नहीं देता।
tests/benchmark.md में regression matrix है: dimension -> public target -> वे स्क्रिप्ट जिन्हें
पंक्ति निष्पादित करती है -> मापा गया परिणाम -> strength label। यह वह चेकलिस्ट है जिसे docs/tool-verification/ के अंतर्गत किसी भी दावे पर भरोसा करने से पहले दोबारा चलाया जाना चाहिए। नमूने tools/_work/ में डाउनलोड किए जाते हैं और कभी
कमिट नहीं किए जाते, इसलिए प्रत्येक पंक्ति अपने सार्वजनिक स्रोत का नाम देती है और उस हैश को रिकॉर्ड करती है जिसके विरुद्ध इसे चलाया गया था।
docs/tool-verification/ भी इंस्टॉल किए गए skill का हिस्सा नहीं है। यह एक वास्तविक लक्ष्य के विरुद्ध एक माप पास का साक्ष्य रिकॉर्ड है: प्रत्येक स्क्रिप्ट ने वास्तव में क्या किया, किस स्वतंत्र
विधि ने इसकी पुष्टि की, कौन से दोष पाए गए, और कौन से परिदृश्य लक्ष्य निष्पादित नहीं कर सका।
यह इसलिए मौजूद है ताकि SKILL.md में Coverage दावों को भरोसे के बजाय रन के विरुद्ध जाँचा जा सके,
और ताकि कमियाँ वहाँ लिखी जाएँ जहाँ अगला व्यक्ति उन्हें पाएगा।
LINUX DO समुदाय द्वारा गर्व से समर्थित।
केवल सीखने, शोध और अधिकृत सुरक्षा परीक्षण के लिए। इस रिपॉज़िटरी में प्रत्येक स्क्रिप्ट, संदर्भ और रिकॉर्ड किया गया परिणाम यह समझाने के लिए मौजूद है कि Android एप्लिकेशन विश्लेषण कैसे काम करता है, ताकि व्यवसायी उन टूल्स के बारे में तर्क कर सकें जो उनके पास पहले से हैं। यहाँ कुछ भी एक सेवा, एक उत्पाद, या किसी विशेष उपयोग का समर्थन नहीं है।
.so, संग्रहीत ऐप डेटा) को संशोधित करती हैं और कुछ रूटेड डिवाइस पर काम करती हैं। अपनी प्रतियाँ रखें, प्रतिलिपियों पर काम करें, और किसी ऐसी चीज़ के विरुद्ध कुछ भी चलाने से पहले SKILL.md के गेट्स पढ़ें जिसकी आप परवाह करते हैं।.gitignore उन्हें बाहर रखता है) और केवल एक स्थानीय, अनदेखे कार्यक्षेत्र में रहते हैं। साथ चलने के लिए आप जो कुछ भी प्राप्त करते हैं वह आपका है इसे सुरक्षित रखना और इसके साथ काम पूरा होने पर हटाना — अपने
स्थानीय नियमों और नमूने के साथ आई शर्तों का पालन करें। यह रिपॉज़िटरी जो प्रकाशित करती है वह विधि और साक्ष्य है, जिसमें सभी लक्ष्य पहचान हटा दी गई है।frida स्वयं अस्वीकार कर दिया जाए। माप क्या देख सकता है
और क्या नहीं, यह skills/apk-reverse/references/advanced-unpacking.md में है।svc सिस्टम कॉल,
init_array-प्रारंभिक डिटेक्शन), ऊपर और नीचे की अगली लेयर वास्तव में क्या कर सकती है, और कब एस्केलेट करना
गलत उत्तर है।.so में कंपाइल किया गया था।pm install-multiple के लिए हर सदस्य पर एक ही कीस्टोर से हस्ताक्षर करना, या जब यह वैध हो तो कोड/नेटिव सदस्यों को
एक स्टैंडअलोन APK में मर्ज करना।.soJava_*-fvisibility=hidden.sopmps--show-exemptsvc--contextTracerPid