cros/cmd/provision: dynamically detect ADB connection for foil provision images [infra/infra : main]

0 views
Skip to first unread message

Jae Hoon Kim (Gerrit)

unread,
2:36 PM (5 hours ago) 2:36 PM
to Garry Wang, Otabek Kasimov, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Garry Wang and Otabek Kasimov

Jae Hoon Kim voted

Auto-Submit+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Garry Wang
  • Otabek Kasimov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: infra/infra
Gerrit-Branch: main
Gerrit-Change-Id: Ia25e3049c009df8ec0dad3b8985e2baebe98f3f3
Gerrit-Change-Number: 8071159
Gerrit-PatchSet: 7
Gerrit-Owner: Jae Hoon Kim <kim...@chromium.org>
Gerrit-Reviewer: Garry Wang <xianu...@chromium.org>
Gerrit-Reviewer: Jae Hoon Kim <kim...@chromium.org>
Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
Gerrit-Attention: Garry Wang <xianu...@chromium.org>
Gerrit-Attention: Otabek Kasimov <ota...@google.com>
Gerrit-Comment-Date: Thu, 09 Jul 2026 18:36:55 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Otabek Kasimov (Gerrit)

unread,
2:50 PM (5 hours ago) 2:50 PM
to Jae Hoon Kim, LUCI CQ, Garry Wang, chromium...@chromium.org, infra-rev...@chromium.org
Attention needed from Garry Wang and Jae Hoon Kim

Otabek Kasimov added 3 comments

File go/src/infra/cros/cmd/provision/common-utils/cross-over/cross_over_init_state.go
Line 43, Patchset 9 (Latest): ForceAdb bool
Otabek Kasimov . unresolved

let specify what for to use adb? lets call it ForceDUTAccessByADB or UseADBForDUTAccess. or call it as compressed provision image (comment below)

File go/src/infra/cros/cmd/provision/common-utils/cross-over/setup_usb_state.go
Line 59, Patchset 9 (Latest): isCompressed := strings.HasSuffix(provisionOSImagePath, ".zst") || strings.HasSuffix(provisionOSImagePath, ".zstd")
Otabek Kasimov . unresolved

please add comment to tell that compressed image required ADB access.

Line 74, Patchset 9 (Latest): s.params.ForceAdb = isCompressed
Otabek Kasimov . unresolved

please log it as setting that ewe set need use ADB access due to compressed image. if possible do not use ForceAdb and just make a field `ProvisionImageCompressed` as it will remove assumption overall.

Open in Gerrit

Related details

Attention is currently required from:
  • Garry Wang
  • Jae Hoon Kim
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: infra/infra
    Gerrit-Branch: main
    Gerrit-Change-Id: Ia25e3049c009df8ec0dad3b8985e2baebe98f3f3
    Gerrit-Change-Number: 8071159
    Gerrit-PatchSet: 9
    Gerrit-Owner: Jae Hoon Kim <kim...@chromium.org>
    Gerrit-Reviewer: Garry Wang <xianu...@chromium.org>
    Gerrit-Reviewer: Jae Hoon Kim <kim...@chromium.org>
    Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
    Gerrit-Attention: Garry Wang <xianu...@chromium.org>
    Gerrit-Attention: Jae Hoon Kim <kim...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 18:50:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Jae Hoon Kim (Gerrit)

    unread,
    3:41 PM (4 hours ago) 3:41 PM
    to LUCI CQ, Garry Wang, Otabek Kasimov, chromium...@chromium.org, infra-rev...@chromium.org
    Attention needed from Garry Wang and Otabek Kasimov

    Jae Hoon Kim voted and added 3 comments

    Votes added by Jae Hoon Kim

    Auto-Submit+1
    Commit-Queue+1

    3 comments

    File go/src/infra/cros/cmd/provision/common-utils/cross-over/cross_over_init_state.go
    Line 43, Patchset 9: ForceAdb bool
    Otabek Kasimov . resolved

    let specify what for to use adb? lets call it ForceDUTAccessByADB or UseADBForDUTAccess. or call it as compressed provision image (comment below)

    Jae Hoon Kim

    Done

    File go/src/infra/cros/cmd/provision/common-utils/cross-over/setup_usb_state.go
    Line 59, Patchset 9: isCompressed := strings.HasSuffix(provisionOSImagePath, ".zst") || strings.HasSuffix(provisionOSImagePath, ".zstd")
    Otabek Kasimov . resolved

    please add comment to tell that compressed image required ADB access.

    Jae Hoon Kim

    Done

    Line 74, Patchset 9: s.params.ForceAdb = isCompressed
    Otabek Kasimov . resolved

    please log it as setting that ewe set need use ADB access due to compressed image. if possible do not use ForceAdb and just make a field `ProvisionImageCompressed` as it will remove assumption overall.

    Jae Hoon Kim

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Garry Wang
    • Otabek Kasimov
    Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: infra/infra
      Gerrit-Branch: main
      Gerrit-Change-Id: Ia25e3049c009df8ec0dad3b8985e2baebe98f3f3
      Gerrit-Change-Number: 8071159
      Gerrit-PatchSet: 11
      Gerrit-Owner: Jae Hoon Kim <kim...@chromium.org>
      Gerrit-Reviewer: Garry Wang <xianu...@chromium.org>
      Gerrit-Reviewer: Jae Hoon Kim <kim...@chromium.org>
      Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
      Gerrit-Attention: Garry Wang <xianu...@chromium.org>
      Gerrit-Attention: Otabek Kasimov <ota...@google.com>
      Gerrit-Comment-Date: Thu, 09 Jul 2026 19:41:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Otabek Kasimov <ota...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Otabek Kasimov (Gerrit)

      unread,
      3:53 PM (4 hours ago) 3:53 PM
      to Jae Hoon Kim, LUCI CQ, Garry Wang, chromium...@chromium.org, infra-rev...@chromium.org
      Attention needed from Garry Wang and Jae Hoon Kim

      Otabek Kasimov voted and added 2 comments

      Votes added by Otabek Kasimov

      Code-Review+1

      2 comments

      Patchset-level comments
      File-level comment, Patchset 11 (Latest):
      Otabek Kasimov . resolved

      LGTM % comment

      File go/src/infra/cros/cmd/provision/common-utils/cross-over/setup_usb_state.go
      Line 74, Patchset 9: s.params.ForceAdb = isCompressed
      Otabek Kasimov . unresolved

      please log it as setting that ewe set need use ADB access due to compressed image. if possible do not use ForceAdb and just make a field `ProvisionImageCompressed` as it will remove assumption overall.

      Jae Hoon Kim

      Acknowledged

      Otabek Kasimov

      not sure where is the log.

      please move comment to the place where initialized `isCompressed`

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Garry Wang
      • Jae Hoon Kim
      Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: infra/infra
      Gerrit-Branch: main
      Gerrit-Change-Id: Ia25e3049c009df8ec0dad3b8985e2baebe98f3f3
      Gerrit-Change-Number: 8071159
      Gerrit-PatchSet: 11
      Gerrit-Owner: Jae Hoon Kim <kim...@chromium.org>
      Gerrit-Reviewer: Garry Wang <xianu...@chromium.org>
      Gerrit-Reviewer: Jae Hoon Kim <kim...@chromium.org>
      Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
      Gerrit-Attention: Garry Wang <xianu...@chromium.org>
      Gerrit-Attention: Jae Hoon Kim <kim...@chromium.org>
      Gerrit-Comment-Date: Thu, 09 Jul 2026 19:53:02 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Jae Hoon Kim <kim...@chromium.org>
      Comment-In-Reply-To: Otabek Kasimov <ota...@google.com>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Jae Hoon Kim (Gerrit)

      unread,
      3:53 PM (4 hours ago) 3:53 PM
      to Otabek Kasimov, LUCI CQ, Garry Wang, chromium...@chromium.org, infra-rev...@chromium.org
      Attention needed from Garry Wang

      Jae Hoon Kim voted and added 1 comment

      Votes added by Jae Hoon Kim

      Commit-Queue+2

      1 comment

      File go/src/infra/cros/cmd/provision/common-utils/cross-over/setup_usb_state.go
      Line 74, Patchset 9: s.params.ForceAdb = isCompressed
      Otabek Kasimov . resolved

      please log it as setting that ewe set need use ADB access due to compressed image. if possible do not use ForceAdb and just make a field `ProvisionImageCompressed` as it will remove assumption overall.

      Jae Hoon Kim

      Acknowledged

      Otabek Kasimov

      not sure where is the log.

      please move comment to the place where initialized `isCompressed`

      Jae Hoon Kim

      Not adding the logs for this since the commands run will clearly show it taking the new paths.

      So we don't need them

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Garry Wang
      Submit Requirements:
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: infra/infra
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia25e3049c009df8ec0dad3b8985e2baebe98f3f3
        Gerrit-Change-Number: 8071159
        Gerrit-PatchSet: 11
        Gerrit-Owner: Jae Hoon Kim <kim...@chromium.org>
        Gerrit-Reviewer: Garry Wang <xianu...@chromium.org>
        Gerrit-Reviewer: Jae Hoon Kim <kim...@chromium.org>
        Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
        Gerrit-Attention: Garry Wang <xianu...@chromium.org>
        Gerrit-Comment-Date: Thu, 09 Jul 2026 19:53:46 +0000
        satisfied_requirement
        open
        diffy

        LUCI CQ (Gerrit)

        unread,
        4:01 PM (4 hours ago) 4:01 PM
        to Jae Hoon Kim, Otabek Kasimov, Garry Wang, chromium...@chromium.org, infra-rev...@chromium.org

        LUCI CQ submitted the change

        Change information

        Commit message:
        cros/cmd/provision: dynamically detect ADB connection for foil provision images

        Instead of hardcoding models in GetAdbOnlyModelList, dynamically
        detect if we need ADB connection by checking if we booted from a
        compressed foil provision image (provision.bin.zst).

        We set UseADBForDUTAccess in CrossOverParameters during SetupUSBState
        if the successfully flashed image was compressed, and verify it in
        FullOSImageState.

        This ensures that we use ADB for all foil runs (including ruby,
        lapis, moonstone) while correctly falling back to SSH if we
        had to fall back to a ChromeOS provision image.

        Bug: 503426131
        Test: go test ./...

        TAG=agy
        CONV=83cb11e8-5a86-4475-99a3-47a05e59f77d
        Change-Id: Ia25e3049c009df8ec0dad3b8985e2baebe98f3f3
        Auto-Submit: Jae Hoon Kim <kim...@chromium.org>
        Reviewed-by: Otabek Kasimov <ota...@google.com>
        Commit-Queue: Jae Hoon Kim <kim...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#81752}
        Files:
        • M go/src/infra/cros/cmd/provision/common-utils/cross-over/cross_over_init_state.go
        • M go/src/infra/cros/cmd/provision/common-utils/cross-over/full_os_image_state.go
        • M go/src/infra/cros/cmd/provision/common-utils/cross-over/full_os_image_state_test.go
        • M go/src/infra/cros/cmd/provision/common-utils/cross-over/setup_usb_state.go
        • M go/src/infra/cros/cmd/provision/common-utils/cross-over/setup_usb_state_test.go
        Change size: M
        Delta: 5 files changed, 74 insertions(+), 11 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Otabek Kasimov
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: infra/infra
        Gerrit-Branch: main
        Gerrit-Change-Id: Ia25e3049c009df8ec0dad3b8985e2baebe98f3f3
        Gerrit-Change-Number: 8071159
        Gerrit-PatchSet: 12
        Gerrit-Owner: Jae Hoon Kim <kim...@chromium.org>
        Gerrit-Reviewer: Garry Wang <xianu...@chromium.org>
        Gerrit-Reviewer: Jae Hoon Kim <kim...@chromium.org>
        Gerrit-Reviewer: Otabek Kasimov <ota...@google.com>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages