From 3624ba1a5acda2249bff41f8329b36bcdc51232d Mon Sep 17 00:00:00 2001 From: imorda Date: Fri, 14 Mar 2025 18:52:03 +0300 Subject: [PATCH] Fixed "list-forward" exceptions on incorrect server output Sometimes (mostly, after a devices goes offline and returns back) adb server goes crazy and starts responding " \f proto:port proto:port" to "host:list-forward" instead of specified " proto:port proto:port" --- ppadb/command/host/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppadb/command/host/__init__.py b/ppadb/command/host/__init__.py index 6711a53..9ed2980 100644 --- a/ppadb/command/host/__init__.py +++ b/ppadb/command/host/__init__.py @@ -70,7 +70,7 @@ def list_forward(self): device_forward_map = {} for line in result.split('\n'): if line: - serial, local, remote = line.split() + serial, local, remote = line.rsplit(' ', 2) if serial not in device_forward_map: device_forward_map[serial] = {}