Bulk Actions — JSON Config Reference
Directory:
scripts/config-files_bulk-actions/
For implementation details (command dispatch, repository, ViewModel, UI), see Bulk Actions — Implementation Deep Dive.
1. Naming Convention
Every file follows the pattern:
blkacts_<scope>_<commands>_<outcome>[-<variant>].json| Segment | Values |
|---|---|
<scope> | single — one command; multi — two or more; full — all 9 commands |
<commands> | ping, dig, ntp, portscan, checkcert, devinfo, tracert, googletimesync, lanscan (comma-separated for multi) |
<outcome> | success, error, timeout, nxdomain, closed, mixed, partial |
<variant> | noshort, long, csv, tilde, saf, nooutput, invalid, syntax, range, fullrange, adbpath |
adbpath variant — configs that use tilde (~) or absolute paths (/sdcard/…) intended for ADB run-as push workflows where the app's private directory is the target.
2. File Inventory (74 files)
2.1 Single-command smoke tests (15 files)
| File | Command | Expected outcome |
|---|---|---|
blkacts_single_ping_success.json | ping -c 2 google.com | SUCCESS |
blkacts_single_ping_success_adbpath.json | ping -c 2 google.com | SUCCESS (ADB path variant) |
blkacts_single_ping_only.json | 5 ping commands | SUCCESS (multi-ping suite) |
blkacts_single_ping_only_adbpath.json | 5 ping commands | SUCCESS (ADB path variant) |
blkacts_single_dig_success.json | dig @8.8.8.8 google.com | SUCCESS |
blkacts_single_dig_nxdomain.json | dig @8.8.8.8 nonexistent.invalid | ERROR (NXDOMAIN) |
blkacts_single_ntp_success.json | ntp pool.ntp.org | SUCCESS |
blkacts_single_portscan_open.json | port-scan -p 80 google.com | SUCCESS (port 80 open) |
blkacts_single_portscan_closed.json | port-scan -p 1-10 127.0.0.1 | CLOSED (no open ports) |
blkacts_single_portscan_nxdomain.json | port-scan 80 nonexistent.invalid | ERROR (host not found) |
blkacts_single_portscan_only.json | 9 port-scan variants | Mixed (success/error/closed) |
blkacts_single_portscan_only_adbpath.json | 9 port-scan variants | Mixed (ADB path variant) |
blkacts_single_portscan_csv.json | 4 port-scan commands | CSV output |
blkacts_single_portscan_fullrange.json | port-scan 1-65534 google.com | Full port range scan |
blkacts_single_checkcert_success.json | checkcert -p 443 google.com | SUCCESS |
blkacts_single_checkcert_badhost.json | checkcert -p 443 nonexistent.invalid | ERROR |
blkacts_single_devinfo_success.json | device-info | SUCCESS |
blkacts_single_devinfo_outfile.json | device-info + port-scan | SUCCESS (with output file) |
blkacts_single_tracert_success.json | tracert -t 5 google.com | SUCCESS |
blkacts_single_tracert_badhost.json | tracert -t 5 nonexistent.invalid | ERROR |
blkacts_single_googletimesync_success.json | google-timesync | SUCCESS |
blkacts_single_lanscan_success.json | lan-scan | SUCCESS or ERROR (no WiFi) |
2.2 Multi-command combos (12 files)
| File | Commands | Expected outcome |
|---|---|---|
blkacts_multi_ping_dig_success.json | ping + dig | Both SUCCESS |
blkacts_multi_ping_ntp_success.json | ping + ntp | Both SUCCESS |
blkacts_multi_dig_ntp_success.json | dig + ntp | Both SUCCESS |
blkacts_multi_dig_param-inverted_success.json | dig @8.8.8.8 google.com + dig google.com @8.8.8.8 | Both SUCCESS (parameter order variants) |
blkacts_multi_ping_portscan_success.json | ping + port-scan | Both SUCCESS |
blkacts_multi_ping_checkcert_success.json | ping + checkcert | Both SUCCESS |
blkacts_multi_ping_tracert_success.json | ping + tracert | Both SUCCESS |
blkacts_multi_dig_portscan_mixed.json | dig (success) + port-scan (bad host) | Mixed success/error |
blkacts_multi_devinfo_portscan_success.json | device-info + port-scan | Both SUCCESS |
blkacts_multi_portscan_range.json | Multiple port range scans | Mixed (success/error) |
blkacts_multi_all9_success.json | All 9 commands | Mostly SUCCESS |
blkacts_multi_all9_mixed.json | All 9 with bad hosts | Mixed success/error |
2.3 Timeout scenarios (6 files)
| File | Timeout mechanism | Expected outcome |
|---|---|---|
blkacts_timeout_config_level.json | Config-level timeout: 1 | TIMEOUT on both commands |
blkacts_timeout_command_level.json | Inline -t 1 on one command | First SUCCESS, second TIMEOUT |
blkacts_timeout_mixed.json | Inline -t 1 on tracert | ping SUCCESS, tracert TIMEOUT |
blkacts_timeout_portscan_slow.json | -t 1 on slow port range | TIMEOUT (unreachable host) |
blkacts_timeout_dig_slow.json | -t 1 on unreachable DNS server | TIMEOUT |
blkacts_multi_timeout.json | Config-level timeout: 42 + inline -t 10 | Mixed (success/timeout) |
2.4 CSV output (5 files)
| File | Commands | CSV flag |
|---|---|---|
blkacts_csv_single_ping.json | ping | output-as-csv: "true" |
blkacts_csv_multi_commands.json | ping + dig + ntp | output-as-csv: "true" |
blkacts_csv_mixed_results.json | ping (good) + dig (bad) | output-as-csv: "true" |
blkacts_csv_full_all9.json | All 9 commands | output-as-csv: "true" |
blkacts_csv_https_cert.json | 5 checkcert variants (good + bad certs) | output-as-csv: "true" |
2.5 Edge cases (11 files)
| File | Scenario | Purpose |
|---|---|---|
blkacts_edge_empty_run.json | "run": {} | Empty command map — no commands to execute |
blkacts_edge_no_output_file.json | No output-file key | In-memory results only, no file write |
blkacts_edge_tilde_path.json | output-file: "~/Downloads/…" | Tilde expansion to app private directory |
blkacts_edge_absolute_path.json | output-file: "/tmp/…" | Absolute path handling |
blkacts_edge_saf_path.json | output-file: "/sdcard/Download/…" | SAF (Storage Access Framework) path |
blkacts_edge_zero_timeout.json | "timeout": 0 | Treated as no timeout (defaults to 30s) |
blkacts_edge_negative_timeout.json | "timeout": -5 | Treated as no timeout (ignored) |
blkacts_edge_blank_commands.json | Commands with "" and " " values | Blank commands are filtered out |
blkacts_edge_whitespace_trimmed.json | Command with leading/trailing spaces | Values are trimmed |
blkacts_edge_single_command.json | One command, no numbering | Minimal valid config |
blkacts_edge_many_commands.json | 21 ping commands | Large command map parsing |
2.6 No output file (1 file)
| File | Scenario | Purpose |
|---|---|---|
blkacts_no_output_file.json | No output-file key, 10 commands | Results stay in-memory only — no file write. Tests the config without any output path defined. |
2.7 Invalid / malformed (6 files)
| File | Scenario | Expected error |
|---|---|---|
blkacts_invalid_missing_run.json | No run key | IllegalArgumentException: Missing required 'run' object |
blkacts_invalid_not_json.json | Plain text, not JSON | Parse failure |
blkacts_invalid_broken_json.json | Missing closing } | JSON syntax error |
blkacts_invalid_empty_file.json | Empty file | Parse failure |
blkacts_invalid_no_commands.json | "run": null | Parse failure |
blkacts_invalid_toocomplexe.json | Array-based run (old format) | Parse failure — only object-based run is supported |
2.8 Full suite (3 files)
| File | Commands | Notes |
|---|---|---|
blkacts_full_example.json | All 9 command types (25 commands) | No timeout; covers every tool; writes to /sdcard/Download/ |
blkacts_full_timeout.json | All 9 command types (18 commands) | Config-level timeout: 60; inline -t N overrides per command |
blkacts_sleep_andothers.json | ntp + sleep 5 + dig + sleep 1 + ping | Demonstrates sleep pseudo-command interleaved with real tools |
2.9 HTTPS certificate test (2 files)
| File | Commands | Notes |
|---|---|---|
blkacts_https_cert_adbpath.json | 5 checkcert variants (good + bad certs) | Writes to ~/ (app private dir); includes expired, self-signed, untrusted-root |
blkacts_proxy_checkcert_timesync.json | 2 checkcert + google-timesync | Includes url-proxypac field for proxy routing test |
2.10 Small configs (2 files)
| File | Scenario | Notes |
|---|---|---|
blkacts_small_output_file.json | 3 commands with output-file | Minimal config with output path |
blkacts_small_nooutput_saf.json | 3 commands, no output-file | Writes to /sdcard/Download/ via SAF |
3. JSON Schema Reference
{
"output-file": "<optional string, path to write results>",
"output-as-csv": "<optional string, \"true\" or \"false\">",
"timeout": "<optional integer, seconds for per-command timeout>",
"url-proxypac": "<optional string, PAC URL for proxy routing>",
"file-proxypac": "<optional string, PAC file path for proxy routing>",
"log-proxy": "<optional boolean, enable proxy logging>",
"run": {
"<command-name>": "<command-string>",
...
}
}Top-level fields
| Field | Type | Required | Description |
|---|---|---|---|
output-file | string | No | File path for results. ~ is expanded to the app's private files directory (/data/user/0/<package>/files/). Use ~/ (not ~/Downloads/) — Android devices use ~/Download/ as the correct tilde-expanded path for external storage. |
output-as-csv | string ("true" / "false") | No | If "true", output is CSV format instead of plain text report. |
timeout | integer (seconds) | No | Default per-command timeout. Overridden by inline -t N. Zero or negative → defaults to 30 s. |
url-proxypac | string | No | PAC URL for proxy routing. Applied to checkcert and google-timesync commands. Mutually exclusive with file-proxypac. |
file-proxypac | string | No | PAC file path (on device) for proxy routing. Mutually exclusive with url-proxypac. Validated at parse time (file must exist and be readable). |
log-proxy | boolean | No | When true, overrides global proxy logging setting. When absent, global setting applies. |
run | object | Yes | Map of command-name → command-string. Empty object is valid (zero commands). |
Supported command strings
| Prefix | Example | Description |
|---|---|---|
ping | ping -c 4 -t 10 google.com | ICMP ping |
dig | dig @8.8.8.8 google.com or dig google.com @8.8.8.8 | DNS lookup (supports both parameter orders) |
ntp | ntp pool.ntp.org | NTP time query |
port-scan | port-scan -p 80,443 google.com or port-scan 80,443 google.com | TCP port scan (supports -p flag and positional) |
checkcert | checkcert -p 443 google.com | HTTPS certificate check |
device-info | device-info | Device identity/network/battery/storage |
tracert | tracert -t 20 google.com | TTL-probing traceroute |
google-timesync | google-timesync | Google Time Sync |
lan-scan | lan-scan | LAN device discovery |
sleep | sleep 5 | Coroutine delay (1–3600 seconds) |
Unknown command prefixes fall through to raw Runtime.exec() shell execution.
4. Directory Structure
scripts/config-files_bulk-actions/
├── blkacts_single_*.*.json ← 15 single-command smoke tests
├── blkacts_multi_*.*.json ← 12 multi-command combos
├── blkacts_timeout_*.*.json ← 6 timeout scenarios
├── blkacts_csv_*.*.json ← 5 CSV output tests
├── blkacts_edge_*.*.json ← 11 edge-case tests
├── blkacts_invalid_*.*.json ← 6 invalid/malformed tests
├── blkacts_full_*.*.json ← 3 full-suite examples
├── blkacts_https_cert_*.json ← 2 HTTPS certificate test configs
├── blkacts_proxy_*.json ← 1 proxy routing test config
├── blkacts_no_output_file.json ← No output file variant
├── blkacts_small_*.*.json ← 2 small config variants
└── blkacts_sleep_*.json ← 1 sleep pseudo-command test5. Test Coverage Summary
| Category | Files | What it validates |
|---|---|---|
| Single-command smoke | 15 | Each of the 9 commands, plus success/error/closed/warning states |
| Multi-command combos | 12 | Sequential execution, mixed outcomes, parameter order variants |
| Timeout scenarios | 6 | Config-level vs. command-level timeout, mixed success/timeout |
| CSV output | 5 | CSV format generation for single, multi, mixed, full, and HTTPS cert suites |
| Edge cases | 11 | Empty run, no output file, tilde/absolute/SAF paths, zero/negative timeout, blank commands, whitespace trimming, single command, large maps |
| No output file | 1 | Config without output-file — results stay in-memory |
| Invalid/malformed | 6 | Missing run key, non-JSON, broken JSON, empty file, null run, array-based run |
| Full suite | 3 | All 9 commands, success and mixed outcomes, sleep interleaving |
| HTTPS cert | 2 | HTTPS cert batch testing, proxy routing with PAC URL |
| Small configs | 2 | Minimal valid configs with and without output file |
| Total | 74 |