Apktool is a command-line tool for reverse engineering Android APK files. It decodes binary resources (resources.arsc, AndroidManifest.xml, 9-patch images) back to nearly original form, disassembles DEX bytecode into Smali assembly using baksmali, and provides a rebuild pipeline that reassembles and signs the APK via aapt2 and apksigner. The tool manages Android framework APK installations to resolve resource references during decoding. The architecture is a multi-module Gradle project: a core library (apktool-lib) exposing programmatic APIs (ApkDecoder, ApkBuilder, ResTable, Framework), and a CLI wrapper (apktool-cli) that provides commands like decode, build, install-framework, and list-frameworks. Supporting libraries (brut.j.util, brut.j.dir, brut.j.yaml, brut.j.xml) handle I/O, directory abstraction, YAML metadata, and XML serialization. External dependencies include Google's aapt2 binary (bundled per platform) and the smali/baksmali libraries for DEX compilation. The codebase demonstrates deep knowledge of Android binary formats, with custom parsers for chunked resource tables, binary XML, and resource qualifiers, and includes extensive regression tests covering edge cases and security vulnerabilities.
fridaUiTools is a PyQt5 desktop application that serves as a comprehensive workbench for Android reverse engineering using Frida. It integrates dozens of Frida scripts for common tasks such as SSL unpinning, DEX dumping, JNI tracing, memory scanning, native hooking, and anti-debug bypass. The tool provides a unified GUI with attach/spawn modes, USB/WiFi connectivity, Frida server management, and AI-assisted script generation and log analysis. The architecture is a monolithic PyQt5 application with a main window (kmainForm.py) that orchestrates multiple dialog forms (e.g., SearchMemory, Wallbreaker, ZenTracer) and a background thread (TraceThread) for Frida script execution. While the codebase is functional and feature-rich, it suffers from tight coupling, duplicate scripts, hardcoded paths, and some dead code, making it more of a practical tool than a reference-quality codebase.