en
Bulk Actions
JSON Plenty of Configs

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
SegmentValues
<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)

FileCommandExpected outcome
blkacts_single_ping_success.jsonping -c 2 google.comSUCCESS
blkacts_single_ping_success_adbpath.jsonping -c 2 google.comSUCCESS (ADB path variant)
blkacts_single_ping_only.json5 ping commandsSUCCESS (multi-ping suite)
blkacts_single_ping_only_adbpath.json5 ping commandsSUCCESS (ADB path variant)
blkacts_single_dig_success.jsondig @8.8.8.8 google.comSUCCESS
blkacts_single_dig_nxdomain.jsondig @8.8.8.8 nonexistent.invalidERROR (NXDOMAIN)
blkacts_single_ntp_success.jsonntp pool.ntp.orgSUCCESS
blkacts_single_portscan_open.jsonport-scan -p 80 google.comSUCCESS (port 80 open)
blkacts_single_portscan_closed.jsonport-scan -p 1-10 127.0.0.1CLOSED (no open ports)
blkacts_single_portscan_nxdomain.jsonport-scan 80 nonexistent.invalidERROR (host not found)
blkacts_single_portscan_only.json9 port-scan variantsMixed (success/error/closed)
blkacts_single_portscan_only_adbpath.json9 port-scan variantsMixed (ADB path variant)
blkacts_single_portscan_csv.json4 port-scan commandsCSV output
blkacts_single_portscan_fullrange.jsonport-scan 1-65534 google.comFull port range scan
blkacts_single_checkcert_success.jsoncheckcert -p 443 google.comSUCCESS
blkacts_single_checkcert_badhost.jsoncheckcert -p 443 nonexistent.invalidERROR
blkacts_single_devinfo_success.jsondevice-infoSUCCESS
blkacts_single_devinfo_outfile.jsondevice-info + port-scanSUCCESS (with output file)
blkacts_single_tracert_success.jsontracert -t 5 google.comSUCCESS
blkacts_single_tracert_badhost.jsontracert -t 5 nonexistent.invalidERROR
blkacts_single_googletimesync_success.jsongoogle-timesyncSUCCESS
blkacts_single_lanscan_success.jsonlan-scanSUCCESS or ERROR (no WiFi)

2.2 Multi-command combos (12 files)

FileCommandsExpected outcome
blkacts_multi_ping_dig_success.jsonping + digBoth SUCCESS
blkacts_multi_ping_ntp_success.jsonping + ntpBoth SUCCESS
blkacts_multi_dig_ntp_success.jsondig + ntpBoth SUCCESS
blkacts_multi_dig_param-inverted_success.jsondig @8.8.8.8 google.com + dig google.com @8.8.8.8Both SUCCESS (parameter order variants)
blkacts_multi_ping_portscan_success.jsonping + port-scanBoth SUCCESS
blkacts_multi_ping_checkcert_success.jsonping + checkcertBoth SUCCESS
blkacts_multi_ping_tracert_success.jsonping + tracertBoth SUCCESS
blkacts_multi_dig_portscan_mixed.jsondig (success) + port-scan (bad host)Mixed success/error
blkacts_multi_devinfo_portscan_success.jsondevice-info + port-scanBoth SUCCESS
blkacts_multi_portscan_range.jsonMultiple port range scansMixed (success/error)
blkacts_multi_all9_success.jsonAll 9 commandsMostly SUCCESS
blkacts_multi_all9_mixed.jsonAll 9 with bad hostsMixed success/error

2.3 Timeout scenarios (6 files)

FileTimeout mechanismExpected outcome
blkacts_timeout_config_level.jsonConfig-level timeout: 1TIMEOUT on both commands
blkacts_timeout_command_level.jsonInline -t 1 on one commandFirst SUCCESS, second TIMEOUT
blkacts_timeout_mixed.jsonInline -t 1 on tracertping SUCCESS, tracert TIMEOUT
blkacts_timeout_portscan_slow.json-t 1 on slow port rangeTIMEOUT (unreachable host)
blkacts_timeout_dig_slow.json-t 1 on unreachable DNS serverTIMEOUT
blkacts_multi_timeout.jsonConfig-level timeout: 42 + inline -t 10Mixed (success/timeout)

2.4 CSV output (5 files)

FileCommandsCSV flag
blkacts_csv_single_ping.jsonpingoutput-as-csv: "true"
blkacts_csv_multi_commands.jsonping + dig + ntpoutput-as-csv: "true"
blkacts_csv_mixed_results.jsonping (good) + dig (bad)output-as-csv: "true"
blkacts_csv_full_all9.jsonAll 9 commandsoutput-as-csv: "true"
blkacts_csv_https_cert.json5 checkcert variants (good + bad certs)output-as-csv: "true"

2.5 Edge cases (11 files)

FileScenarioPurpose
blkacts_edge_empty_run.json"run": {}Empty command map — no commands to execute
blkacts_edge_no_output_file.jsonNo output-file keyIn-memory results only, no file write
blkacts_edge_tilde_path.jsonoutput-file: "~/Downloads/…"Tilde expansion to app private directory
blkacts_edge_absolute_path.jsonoutput-file: "/tmp/…"Absolute path handling
blkacts_edge_saf_path.jsonoutput-file: "/sdcard/Download/…"SAF (Storage Access Framework) path
blkacts_edge_zero_timeout.json"timeout": 0Treated as no timeout (defaults to 30s)
blkacts_edge_negative_timeout.json"timeout": -5Treated as no timeout (ignored)
blkacts_edge_blank_commands.jsonCommands with "" and " " valuesBlank commands are filtered out
blkacts_edge_whitespace_trimmed.jsonCommand with leading/trailing spacesValues are trimmed
blkacts_edge_single_command.jsonOne command, no numberingMinimal valid config
blkacts_edge_many_commands.json21 ping commandsLarge command map parsing

2.6 No output file (1 file)

FileScenarioPurpose
blkacts_no_output_file.jsonNo output-file key, 10 commandsResults stay in-memory only — no file write. Tests the config without any output path defined.

2.7 Invalid / malformed (6 files)

FileScenarioExpected error
blkacts_invalid_missing_run.jsonNo run keyIllegalArgumentException: Missing required 'run' object
blkacts_invalid_not_json.jsonPlain text, not JSONParse failure
blkacts_invalid_broken_json.jsonMissing closing }JSON syntax error
blkacts_invalid_empty_file.jsonEmpty fileParse failure
blkacts_invalid_no_commands.json"run": nullParse failure
blkacts_invalid_toocomplexe.jsonArray-based run (old format)Parse failure — only object-based run is supported

2.8 Full suite (3 files)

FileCommandsNotes
blkacts_full_example.jsonAll 9 command types (25 commands)No timeout; covers every tool; writes to /sdcard/Download/
blkacts_full_timeout.jsonAll 9 command types (18 commands)Config-level timeout: 60; inline -t N overrides per command
blkacts_sleep_andothers.jsonntp + sleep 5 + dig + sleep 1 + pingDemonstrates sleep pseudo-command interleaved with real tools

2.9 HTTPS certificate test (2 files)

FileCommandsNotes
blkacts_https_cert_adbpath.json5 checkcert variants (good + bad certs)Writes to ~/ (app private dir); includes expired, self-signed, untrusted-root
blkacts_proxy_checkcert_timesync.json2 checkcert + google-timesyncIncludes url-proxypac field for proxy routing test

2.10 Small configs (2 files)

FileScenarioNotes
blkacts_small_output_file.json3 commands with output-fileMinimal config with output path
blkacts_small_nooutput_saf.json3 commands, no output-fileWrites 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

FieldTypeRequiredDescription
output-filestringNoFile 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-csvstring ("true" / "false")NoIf "true", output is CSV format instead of plain text report.
timeoutinteger (seconds)NoDefault per-command timeout. Overridden by inline -t N. Zero or negative → defaults to 30 s.
url-proxypacstringNoPAC URL for proxy routing. Applied to checkcert and google-timesync commands. Mutually exclusive with file-proxypac.
file-proxypacstringNoPAC file path (on device) for proxy routing. Mutually exclusive with url-proxypac. Validated at parse time (file must exist and be readable).
log-proxybooleanNoWhen true, overrides global proxy logging setting. When absent, global setting applies.
runobjectYesMap of command-name → command-string. Empty object is valid (zero commands).

Supported command strings

PrefixExampleDescription
pingping -c 4 -t 10 google.comICMP ping
digdig @8.8.8.8 google.com or dig google.com @8.8.8.8DNS lookup (supports both parameter orders)
ntpntp pool.ntp.orgNTP time query
port-scanport-scan -p 80,443 google.com or port-scan 80,443 google.comTCP port scan (supports -p flag and positional)
checkcertcheckcert -p 443 google.comHTTPS certificate check
device-infodevice-infoDevice identity/network/battery/storage
tracerttracert -t 20 google.comTTL-probing traceroute
google-timesyncgoogle-timesyncGoogle Time Sync
lan-scanlan-scanLAN device discovery
sleepsleep 5Coroutine 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 test

5. Test Coverage Summary

CategoryFilesWhat it validates
Single-command smoke15Each of the 9 commands, plus success/error/closed/warning states
Multi-command combos12Sequential execution, mixed outcomes, parameter order variants
Timeout scenarios6Config-level vs. command-level timeout, mixed success/timeout
CSV output5CSV format generation for single, multi, mixed, full, and HTTPS cert suites
Edge cases11Empty run, no output file, tilde/absolute/SAF paths, zero/negative timeout, blank commands, whitespace trimming, single command, large maps
No output file1Config without output-file — results stay in-memory
Invalid/malformed6Missing run key, non-JSON, broken JSON, empty file, null run, array-based run
Full suite3All 9 commands, success and mixed outcomes, sleep interleaving
HTTPS cert2HTTPS cert batch testing, proxy routing with PAC URL
Small configs2Minimal valid configs with and without output file
Total74

MIT 2026 © Nextra.