You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import adbutils
import os
port = int(os.getenv('ANDROID_ADB_SERVER_PORT', 5037))
client = adbutils.AdbClient(host="127.0.0.1", port=port)
serial = '7aa358b3'
#device = client.device(serial)
device = client.device_list()[0]
package_list = device.list_packages()
print(package_list)
will get error:
Traceback (most recent call last):
File "/home/opt//demo.py", line 8, in <module>
package_list = device.list_packages()
^^^^^^^^^^^^^^^^^^^^^^
File "/home/opt//venv/lib/python3.11/site-packages/adbutils/shell.py", line 250, in list_packages
output = self.shell(["pm", "list", "packages"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/opt//venv/lib/python3.11/site-packages/adbutils/_device.py", line 192, in shell
c = self.open_transport(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/opt//venv/lib/python3.11/site-packages/adbutils/_device.py", line 90, in open_transport
c.check_okay()
File "/home/opt//venv/lib/python3.11/site-packages/adbutils/_adb.py", line 147, in check_okay
raise AdbError(self.read_string_block())
adbutils.errors.AdbError: unknown host service
downgrade to 2.5.0 is good. and same code and same adbutils on windows is good.
windows adb server version is Android Debug Bridge version 1.0.41
ubuntu adb server version is Android Debug Bridge version 1.0.39
this code cause new bug
The text was updated successfully, but these errors were encountered:
I'm experiencing the same issue using adbutils==2.8.0
Traceback (most recent call last):
File "/home/automation/rabbit/tests/robot/os/linux/serial_secure_boot/test_serial_secure_boot.py", line 266, in test_adb_shell_tryout
d.shell('echo "Device is alive"')
File "/home/automation/rabbit/venv/lib/python3.8/site-packages/adbutils/_device.py", line 191, in shell
c = self.open_transport(timeout=timeout)
File "/home/automation/rabbit/venv/lib/python3.8/site-packages/adbutils/_device.py", line 89, in open_transport
c.check_okay()
File "/home/automation/rabbit/venv/lib/python3.8/site-packages/adbutils/_adb.py", line 151, in check_okay
raise AdbError(self.read_string_block())
adbutils.errors.AdbError: unknown host service
will get error:
downgrade to 2.5.0 is good. and same code and same adbutils on windows is good.
windows adb server version is Android Debug Bridge version 1.0.41
ubuntu adb server version is Android Debug Bridge version 1.0.39
this code cause new bug
The text was updated successfully, but these errors were encountered: