This change introduces the ability to patch local APK files or directories, support for separate source and target devices, and detection of common anti-tampering libraries.
Key changes:
- **Local APK Support**: Added `--apk <path>` flag to use local `.apk` files or split-APK directories instead of pulling from a device.
- **Two-Device Workflow**: Added `--source <serial>` flag to pull an APK from one device (e.g., a Play Store emulator) and install the patched version on another (e.g., a `userdebug` emulator).
- **Anti-Tampering Detection**: The patching script now scans for known integrity-protection libraries (e.g., PairIP, DexGuard, Bangcle) and issues a warning if detected.
- **Improved Disassembly**: Introduced a `--no-res` optimization when user certificate trust is not required, avoiding common `apktool` resource decoding errors.
- **Package Name Extraction**: Integrated `aapt2` to automatically detect package names from local APK files for cleaner uninstalls.
- **Enhanced Device Selection**: Updated the interactive menu to handle source/target selection and filter unauthorized devices more effectively.
- **Documentation**: Updated `README.md` and `CLAUDE.md` with new usage examples and information regarding anti-tampering limitations.
This change automates the setup of the device's global HTTP proxy to route traffic through the mitmproxy container.
Key changes:
- Detect if the target is an emulator or a physical device.
- For emulators, the proxy is set to the host loopback address (10.0.2.2).
- For physical devices, the script now attempts to automatically determine the host's local IP address (`en0`/`en1`).
- The device's global proxy settings are configured via `adb`.
- Instructions are updated to reflect the automated setup and include the command to clear the proxy settings.