Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfaaa2b0 authored by Jizheng Chu's avatar Jizheng Chu
Browse files

Catch AdbError during adb port forwarding to trigger retry mechanism in gd_device setup

Bug: 228340445
Change-Id: I01c9423529dbfbb6e7e4327ed6c1ec9041a5ee37
Test: cert/run
parent 80522e9f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -127,7 +127,10 @@ class BlueberryAdbProxy(AdbProxy):
            #     device port
            remote_port = self._ssh_connection.find_free_port()
            host_port = self._ssh_connection.create_ssh_tunnel(remote_port, local_port=host_port)
        try:
            output = self.forward(["tcp:%d" % host_port, "tcp:%d" % device_port])
        except AdbError as error:
            return error
        # If hinted_port is 0, the output will be the selected port.
        # Otherwise, there will be no output upon successfully
        # forwarding the hinted port.