Skip to content

Android

Parrier tests Android apps two ways. Give it an APK for static analysis (copy it into ~/.parrier/targets first), or an installed package on a device for dynamic testing with Frida hooks and traffic capture.

Terminal window
parrier apk /targets/app.apk # static
parrier -t android://com.example.app # dynamic, on a device

No container gets USB access. Parrier reaches your devices through the adb server on your host, so any device or emulator adb devices shows is usable.

  1. Expose the host adb server to containers.

    Nothing to do. Containers reach the host’s default adb server at host.docker.internal:5037.

  2. Check that Parrier sees the device.

    Terminal window
    parrier devices

    With several devices attached, set PARRIER_ANDROID_DEVICE=<serial>.

  3. Install frida-server. Frida injection needs a rooted device or emulator.

    Terminal window
    parrier android setup
  4. Pick the app with /devices in the console, or pass -t android://<package>.

Tool What it does
pull_apk Pull installed APKs, with their sha256
hermes_decompile Turn React Native Hermes bundles into readable code
ensure_frida Install and start the pinned frida-server (17.10.1)
frida_enumerate List classes, methods and native modules
frida_spawn_hook, frida_attach Run a Frida script on spawn or against a running app
frida_script Built-in scripts: unpin, native_unpin, flutter_unpin, bypass, trace, http_capture
setup_android_proxy Route the device through Caido and trust its CA

Hooks run for one window: 8 seconds by default, 120 at most. The lab image, built from a source checkout with ./parrier.sh build-lab, adds jadx, apktool, radare2 and objection.

Each Android device run starts its own Caido sidecar, parrier-caido-<run>, on a free host loopback port. The device reaches it through adb reverse. Set PARRIER_CAIDO_SIDECAR_PORT to pin the port.

The sidecar needs Docker Desktop for now. On Linux, or to use your own instance, point Parrier at an external Caido:

Terminal window
export PARRIER_CAIDO_URL=http://host.docker.internal:<port>
export PARRIER_CAIDO_TOKEN=<token> # without it, Caido must allow guests

That Caido must listen on the host loopback at the same port and start with --ui-domain host.docker.internal, or its DNS-rebinding protection answers 403.

If a killed run left a proxy setting on the device, clear it:

Terminal window
parrier android proxy-clear