octopus.commands.instrument

octopus.commands.instrument.common(device, output_path, no_screen_record, no_network_capture, no_instrumentation, duration, overwrite)[source]

Run the capture session for a given device.

Sets up signal handlers for graceful shutdown, initializes the CaptureManager, and runs the capture session for the specified duration or until interrupted.

Parameters:
  • device – The Android device instance to capture from.

  • output_path – Path to the directory where output will be saved.

  • no_screen_record – If True, disables screen recording.

  • no_network_capture – If True, disables network traffic capture.

  • no_instrumentation – If True, disables app instrumentation.

  • duration – Duration in seconds to run the capture. If 0 or less, runs until a stop signal is received.

  • overwrite – If True, allows overwriting existing output files.

octopus.commands.instrument.tcp_mode(adb_host, adb_port, device_host, device_port, output_path, no_screen_record, no_network_capture, no_instrumentation, duration, overwrite)[source]

Start a capture session using a TCP-connected Android device.

Creates an AndroidDeviceTcp instance and delegates to common() to run the capture session.

Parameters:
  • adb_host – Hostname or IP address of the ADB server.

  • adb_port – Port number of the ADB server.

  • device_host – Hostname or IP address of the Android device.

  • device_port – Port number used to connect to the Android device.

  • output_path – Path to the directory where output will be saved.

  • no_screen_record – If True, disables screen recording.

  • no_network_capture – If True, disables network traffic capture.

  • no_instrumentation – If True, disables app instrumentation.

  • duration – Duration in seconds to run the capture. If 0 or less, runs until a stop signal is received.

  • overwrite – If True, allows overwriting existing output files.

octopus.commands.instrument.usb_mode(adb_host, adb_port, device_id, output_path, no_screen_record, no_network_capture, no_instrumentation, duration, overwrite)[source]

Start a capture session using a USB-connected Android device.

Creates an AndroidDeviceUsb instance and delegates to common() to run the capture session.

Parameters:
  • adb_host – Hostname or IP address of the ADB server.

  • adb_port – Port number of the ADB server.

  • device_id – The serial ID of the USB-connected Android device.

  • output_path – Path to the directory where output will be saved.

  • no_screen_record – If True, disables screen recording.

  • no_network_capture – If True, disables network traffic capture.

  • no_instrumentation – If True, disables app instrumentation.

  • duration – Duration in seconds to run the capture. If 0 or less, runs until a stop signal is received.

  • overwrite – If True, allows overwriting existing output files.