Fix cl_flashstation connection issue

The ADB connection uses a local TCP port like 'localhost:40141'. If we pass this TCP port to cl_flashstation, it fails to find the device after rebooting it into fastboot mode.

This commit fixes the issue by passing the physical hardware serial number (DEVICE_SERIAL_NUMBER) to cl_flashstation first, instead of the ADB TCP port (ADB_SERIAL_NUMBER). This allows cl_flashstation to track the device correctly across both ADB and fastboot states.

Test: kernel/tests/tools/flash_device.sh -s 3B041FDAQ0002P -pb ab://git_main-throttled-monitored/tokay_16k-trunk_staging-userdebug/15739716 -vkb ab://kernel-android14-gs-pixel-6.1/caimito_ack_16k/15982031
Bug: 550124236
Change-Id: Idd0312dd8ab82ef8b358cf00f519cd1e1a15ab2a
Signed-off-by: Darren Chang <chihsheng@google.com>
1 file changed
tree: ddf4ea1e2a2f7c2807a679217effe4e593c5386b
  1. net/
  2. tools/
  3. METADATA