Skip to content

Add CLI flags for unattended acquisition#112

Open
Nxtmaster10 wants to merge 2 commits into
mvt-project:mainfrom
Nxtmaster10:unattended-flags
Open

Add CLI flags for unattended acquisition#112
Nxtmaster10 wants to merge 2 commits into
mvt-project:mainfrom
Nxtmaster10:unattended-flags

Conversation

@Nxtmaster10

@Nxtmaster10 Nxtmaster10 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds CLI flags for every interactive prompt so a full acquisition can be scripted end to end:

Flag Values Prompt
-backup / -b sms, all, none Backup
-download / -d all, non-system, none Download
-remove-trusted / -r yes, no Remove (trusted-APK removal)
-intrusion-logs / -i yes, no Intrusion Logs
-non-interactive / -n fail instead of prompting, skip the final "Press Enter"

No flag passed keeps today's interactive behavior exactly. Invalid values fail before the acquisition starts, listing the valid tokens. With -non-interactive, androidqf errors upfront if a prompt could be reached without its flag (and if multiple devices are attached without -serial, or -module names no module) instead of silently picking a default - a forensic tool should not quietly decide what to collect.

androidqf -serial <serial> -backup none -download all -remove-trusted no -intrusion-logs no -non-interactive

Design notes

  • The final systemPause() is gated on -non-interactive rather than TTY detection: explicit, deterministic, no new dependency, and it cannot change behavior for anyone not passing the flag.
  • CLI tokens map onto the existing prompt string constants; prompt wording and ordering are unchanged, including the AAPM early return in intrusion_logs - the flag cannot force the module onto a non-AAPM device.
  • Upfront validation is deliberately I/O-free and conservative: -intrusion-logs is required (when the module will run) even on non-AAPM devices, and -remove-trusted even for encrypted streaming output. In both cases the value is harmlessly unused, mirroring how -remove-trusted is ignored with -download none; checking those conditions during validation would need device or key-file I/O before the run starts.
  • adb backup still requires authorizing the backup on the device - an Android security control no flag can bypass. Only -backup none is fully unattended; the README and the -backup help text say so.
  • The flag.BoolVar(&verbose, "f", ...) error will be fixed with fix: matching of the "f" cli option to the fast var #111. - landed on main, rebased

@Nxtmaster10

Copy link
Copy Markdown
Contributor Author

rebased onto main so the fix from #111 is also on this branch - your documentation changes look good ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants