$ show ReversecLabs/drozer
drozer is a comprehensive Android security testing framework that operates as a Python CLI application with a Twisted-based server and an on-device agent. Its primary function is to assess the security posture of Android applications and devices by enumerating components (activities, services, content providers, broadcast receivers), scanning for vulnerabilities (SQL injection, path traversal, world-writable files), and delivering exploitation payloads (reverse shells, privilege escalation). The architecture follows a client-server model: the drozer console connects to a remote server (port 31415) that communicates with an agent running on the Android device via a custom protocol defined by Protocol Buffers. The agent exposes a remote Java reflection API (pysolar) that allows the console to invoke arbitrary methods, instantiate objects, and interact with the Android runtime.
The LLM identified 2 files worth highlighting for reuse:
Provides a high-level API for remote Java reflection on Android devices over a custom Protocol Buffers wire protocol. It encapsulates resolution, construction, invocation, field access, and object deletion, abstracting the complexity of serialization and transport. This module is self-contained (depends only on pysolar's own builders and types) and can be extracted for any project requiring remote method invocation on Android or similar Java runtimes.
Extends Python's cmd.Cmd with advanced CLI features: alias substitution, environment variable expansion ($VAR), output redirection (>), command history, and deep integration with prompt_toolkit for tab-completion and toolbar. The implementation is clean, well-separated from drozer-specific logic, and could be reused to build any interactive console application requiring rich user experience without heavy dependencies.