Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

struct.unpack raise ValueError on Windows 10 64Bit,env Python2.7 #120

Open
@jcanchen

Description

@jcanchen

Details:
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in run_module_as_main
"main", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in run_code
exec code in run_globals
File ".\adb.zip_main
.py", line 211, in
File ".\adb.zip_main
.py", line 207, in main
File ".\adb.zip\adb\common_cli.py", line 151, in StartCli
File ".\adb.zip\adb\adb_commands.py", line 137, in ConnectDevice
File ".\adb.zip\adb\adb_commands.py", line 168, in _Connect
File ".\adb.zip\adb\adb_protocol.py", line 310, in Connect
File ".\adb.zip\adb\adb_protocol.py", line 244, in Read
File ".\adb.zip\adb\adb_protocol.py", line 228, in Unpack
ValueError: ('Unable to unpack ADB command.', '<6I', bytearray(b'CNXN\x00\x00\x00\x01\x00\x10\x00\x00W\x00\x00\x00L\x1d\x00\x00\xbc\xb1\xa7\xb1'), error('unpack requires a string argument of length 24',))

Command "python adb.zip shell" works fine on Ubuntu14.04 + Python2.7.
But ,I am trying to build an application on Windows with python 2.7,and it raise ValueError
Got very confused with this error, and I am new to python.
One line Added on line 243 in file adb_protocol.py "smg = str(msg)", then it seems work fine on Windows???

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions