Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Virtual0ps/android-binary-transparency
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8658fd5
Choose a base ref
...
head repository: android/android-binary-transparency
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dcc23a7
Choose a head ref
  • 10 commits
  • 12 files changed
  • 2 contributors

Commits on Sep 29, 2026

  1. automate_observation: add --events for machine-readable progress

    Add an opt-in --events PATH flag ("-" for stdout) that writes progress
    as JSON Lines, so CI jobs and other wrappers need not scrape logs.
    
    Events: run_started, devices, device_started, step, device_finished,
    run_finished. run_finished comes last even on early exits, exceptions,
    Ctrl-C and SIGTERM (caught, then re-raised; a stream without it means
    failure, e.g. SIGKILL). It has `ok` and a per-device summary. Device
    status is success, partial_check_incomplete, partial_error or failed;
    success means the inclusion proof check completed, not that every
    split verified. Errors are {reason, message} with stable reason codes.
    
    With "-", other stdout output goes to stderr. Without --events,
    behaviour is unchanged, except log lines from the old main() now show
    run() as their function name. Schema in docs/automate_observation.md;
    additive changes keep v=1.
    
    Test:
    - pytest uraniborg/scripts/python/tests/: 116 passed (47 new, 69
      existing unmodified).
    - Live on an Android 15 emulator: --events -, inclusion proof check,
      unknown --serial, SIGTERM mid-run, and no --events (output unchanged).
    
    Change-Id: I04e40b0de40d864aac92ac7bcf466a6ccf606b61
    Billy Lau
    Billy Lau committed Sep 29, 2026
    Configuration menu
    Copy the full SHA
    1337133 View commit details
    Browse the repository at this point in the history
  2. Merge pull request android#34 from billy-lau/uraniborg/machine-readab…

    …le-progress
    
    automate_observation: add --events for machine-readable progress
    billy-lau authored Sep 29, 2026
    Configuration menu
    Copy the full SHA
    6f1de4a View commit details
    Browse the repository at this point in the history
  3. automate_observation: report manual-intervention prompts in --events

    Two steps wait for a person: the manual Hubble install on Xiaomi
    phones (Enter on stdin) and the `adb backup` confirmation (on the
    device). A parent process could see neither. Report each as a new
    `prompt` event {device, kind, message, expects_input}, always followed
    by `prompt_resolved` with an `outcome` (done, failed, stdin_closed,
    interrupted, ...). Kinds: xiaomi_manual_install (write a newline to
    stdin to continue) and adb_backup_confirm (nothing to send).
    
    If stdin closes during the Xiaomi wait, the device now fails with
    reason stdin_closed and the run continues, logging a plain error
    instead of an "Unexpected error" traceback (exit code still 1).
    New event types only, so v stays 1. Without --events, log text and
    exit codes are unchanged except for the stdin-closed case, and the
    Xiaomi wait's log lines now show wait_for_xiaomi_manual_install() as
    their function name.
    
    Test:
    - pytest uraniborg/scripts/python/tests/: 129 passed (13 new; one
      existing test gained events=None in its expected calls).
    - Live on an Android 14 emulator with the Xiaomi path forced: stdin
      closed (outcome stdin_closed, device fails), and a driver that
      answers the prompt by installing Hubble and writing a newline
      (outcome done, success).
    
    Change-Id: I57712611e0c27fec5ed284da7d9a78838abe3b41
    Billy Lau
    Billy Lau committed Sep 29, 2026
    Configuration menu
    Copy the full SHA
    1337133 View commit details
    Browse the repository at this point in the history
  4. Merge pull request android#35 from billy-lau/uraniborg/improvements

    automate_observation: report manual-intervention prompts in --events
    billy-lau authored Sep 29, 2026
    Configuration menu
    Copy the full SHA
    c67a5e8 View commit details
    Browse the repository at this point in the history
  5. automate_observation: warn about ignored flag combinations

    Some flags are silently ignored depending on what they are combined
    with. Log a warning at startup for each:
    
    - --check_preinstalled_only, --verifier_path, --no_prefetch,
      --cache_dir, --cache_prefetch_concurrency and
      --cache_prefetch_timeout without --perform_inclusion_proof_check.
    - --cache_prefetch_concurrency and --cache_prefetch_timeout with
      --no_prefetch, since only pre-fetching reads them.
    - --pull-all-apks with --pull-preinstalled-apks-only, where only
      pre-installed APKs are pulled.
    
    Integer flags count only when set to a non-default value. These are
    warnings, not errors, so existing invocations keep working and exit
    codes are unchanged; the only difference is the new log lines for
    these combinations. The checks live in a pure function,
    validate_argument_combinations(), so other tools can reuse the rules.
    
    Test:
    - pytest uraniborg/scripts/python/tests/: 150 passed (21 new).
    - Live on an Android 14 emulator with four ignored inclusion-proof
      flags: four warnings at startup, run otherwise unchanged (exit 0).
    - Real process with --perform_inclusion_proof_check --no_prefetch and
      both tuning flags: both warnings logged, --cache_dir not flagged.
    
    Change-Id: I49800dc522b5d1c4939749fe0d3812482adb6b6c
    Billy Lau
    Billy Lau committed Sep 29, 2026
    Configuration menu
    Copy the full SHA
    1337133 View commit details
    Browse the repository at this point in the history
  6. Merge pull request android#36 from billy-lau/uraniborg/sanitize-flags

    automate_observation: warn about ignored flag combinations
    billy-lau authored Sep 29, 2026
    Configuration menu
    Copy the full SHA
    3ef0733 View commit details
    Browse the repository at this point in the history
  7. automate_observation: split run() into process_device() and print_sum…

    …mary()
    
    The per-device workflow lived inline in run(), with its outcome spread
    across three shared sets and a `continue` on every failure. Each
    recent feature (--serial, --events, prompts) added branches to that
    one loop, it could only be tested end to end through main(), and the
    scattered bookkeeping made status bugs easy.
    
    Split it, with no behaviour change:
    
    - process_device() observes one device and returns a DeviceResult
      (status, results_dir, error); print_summary() logs the final lines
      and returns the run_finished summary.
    - RunState carries pre-fetch state across devices; classify_device()
      holds the status rules and replaces device_status().
    
    Log text, events and exit codes are unchanged. Moved lines now show
    _observe_device or print_summary instead of run as the function name
    in the log prefix. One edge case: if two connected devices share a
    serial, the summary line shows the last one's outcome (the exit code
    still reflects both).
    
    Test:
    - pytest uraniborg/scripts/python/tests/: 156 passed (11 new, calling
      the new functions directly; test_device_status replaced by
      test_classify_device; other existing tests unmodified).
    - Live on an Android 14 emulator, before vs after: identical logs
      (apart from function names) and events (apart from timestamps).
    
    Change-Id: Ib1d454ea5586cf110ae6cbbcd8ca1cda02907d9b
    Billy Lau
    Billy Lau committed Sep 29, 2026
    Configuration menu
    Copy the full SHA
    1337133 View commit details
    Browse the repository at this point in the history
  8. Merge pull request android#37 from billy-lau/uraniborg/refactor-main

    automate_observation: split run() into process_device() and print_sum…
    billy-lau authored Sep 29, 2026
    Configuration menu
    Copy the full SHA
    3b3d386 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2026

  1. verifier, uraniborg: batch verification; faster, cancellable proof check

    Checking each APK split with its own verifier run fetched the checkpoint
    and searched the log once per split, so the proof step took minutes.
    
    - verifier: add --payloads_path batch mode. It searches each log once for
      all payloads and shares hash tiles between proofs. Results stream as
      JSON Lines and match single-payload runs, even if a tile download fails.
    - inclusion_proof_check.py: use batch mode. Splits it gives no result for
      (old or crashed verifier) are checked one at a time; an old verifier
      also triggers a warning to rebuild it. A missing verifier is reported
      once, not once per split.
    - Report step_progress events, add package and split labels to log lines,
      and kill the running verifier on Ctrl-C or SIGTERM.
    
    314 splits on an Android 14 emulator: proof step ~9 s instead of minutes.
    Results match per-split runs exactly.
    
    Test: go test ./... (new batch, tile-error and cancellation tests);
          pytest tests (185 pass); emulator run; old-verifier fallback run.
    
    Change-Id: I1b1b9b69fdd6f3d51ac75ebc803725187343ff6c
    Billy Lau
    Billy Lau committed Sep 30, 2026
    Configuration menu
    Copy the full SHA
    1337133 View commit details
    Browse the repository at this point in the history
  2. Merge pull request android#38 from billy-lau/uraniborg/parallelize-in…

    …clusion-proof-check
    
    verifier, uraniborg: batch verification; faster, cancellable proof check
    billy-lau authored Sep 30, 2026
    Configuration menu
    Copy the full SHA
    dcc23a7 View commit details
    Browse the repository at this point in the history
Loading