Skip to content

Recover offline TCP adb transports during root_adb and handle_reboot - #1081

Open
xpconanfan wants to merge 1 commit into
masterfrom
recover-tcp-adb-on-root
Open

xpconanfan wants to merge 1 commit into
masterfrom
recover-tcp-adb-on-root

Conversation

@xpconanfan

Copy link
Copy Markdown
Collaborator

Summary

  • Re-establish TCP adb transports (disconnect + connect + wait-for-device) on host:port serials when AdbProxy.root() retries after an error/timeout or when wait_for_device times out right after adb root.
  • Ensure AndroidDevice.handle_reboot() restarts live services inside finally even if root_adb() fails, without masking the original root_adb() error.

On TCP-connected Android devices (host:port), restarting adbd via adb root severs the TCP socket and can leave the host adb server transport stuck offline indefinitely. Retrying adb root alone cannot recover a dead TCP transport.

Disconnect and reconnect TCP transports before retrying failed adb root calls and when wait-for-device times out after adb root. Also ensure AndroidDevice.handle_reboot restarts stopped services in its finally block even if root_adb raises.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant