Closed shijie93 closed 3 years ago
ios 型号版本详细一点
pyidevice deviceinfo --udid 00008020-001C05260ED8002E
{'BasebandCertId': 165673526, 'BasebandKeyHashInformation': {'AKeyStatus': 64, 'SKeyStatus': 2}, 'BasebandSerialNumber': b'\xba\xac\xbe\xad"\xf0\xb9\x9d\x00\x00\x00\x00', 'BasebandVersion': '3.04.01', 'BoardId': 14, 'BuildVersion': '18F72', 'CPUArchitecture': 'arm64e', 'ChipID': 32800, 'DeviceClass': 'iPhone', 'DeviceColor': '1', 'DeviceName': 'iPhone', 'DieID': 7886960363831342, 'HardwareModel': 'D321AP', 'HasSiDP': True, 'PartitionType': 'GUID_partition_scheme', 'ProductName': 'iPhone OS', 'ProductType': 'iPhone11,2', 'ProductVersion': '14.6', 'ProductionSOC': True, 'ProtocolVersion': '2', 'SupportedDeviceFamilies': [1], 'TelephonyCapability': True, 'UniqueChipID': 7886960363831342, 'UniqueDeviceID': '00008020-001C05260ED8002E', 'WiFiAddress': '38:53:9c:f0:71:01'}
嗯这里实际上有 RAW_VERSION0 , RAW_VERSION1, RAW_VERSION2, RAW_VERSION3 三种我这里应该是 RAW_VERSION2 解析,也是最常见的,因为我没遇到其他格式的,所以还没什么好办法。
我也出现同样的问题,三四个月前同样的手机还可以获取帧率,现在不行了
同样遇到该问题,请问这种原因是什么,有可能解决吗? @YueChen-C
如果只是获取 fps 用 from ios_device.util.utils import kperf_data 这个方法来解就行,性能也好 from ios_device.util.kperf_data import KperfData 这个目的是为了解析堆栈数据的
2021-09-06 19:33:10 [INFO] [LockDown] lockdown.py[line:71] Connecting Device 00008020-001C05260ED8002E 2021-09-06 19:33:10 [INFO] [Instrument] Instrument.py[line:22] InstrumentServer init ... 2021-09-06 19:33:10 [INFO] [LockDown] lockdown.py[line:384] save path :/Users/huya/.cache/pymobiledevice/00008020-001C05260ED8002E.pem 2021-09-06 19:33:10 [INFO] [Instrument] dvt.py[line:162] set com.apple.instruments.server.services.coreprofilesessiontap callback ... 2021-09-06 19:33:10 [ERROR] [Instrument] dvt.py[line:247] Error in path (parsing) -> threadmap -> process stream read less than specified amount, expected 1, found 0 Traceback (most recent call last): File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/ios_device/servers/dvt.py", line 234, in _receiver self._channel_callbacks(2 ** 32 - dtx.channel_code) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/ios_device/py_ios_device.py", line 499, in _callback for args in Kperf.to_dict(res.selector.data): File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/ios_device/util/kperf_data.py", line 969, in to_dict buf_io = self.check_header(kd_buf) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/ios_device/util/kperf_data.py", line 964, in check_header parsed_header = kd_header_v2.parse_stream(buf_io) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 300, in parse_stream return self._parsereport(stream, context, "(parsing)") File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 312, in _parsereport obj = self._parse(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 1981, in _parse subobj = sc._parsereport(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 312, in _parsereport obj = self._parse(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 2439, in _parse return self.subcon._parsereport(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 312, in _parsereport obj = self._parse(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 2221, in _parse e = self.subcon._parsereport(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 312, in _parsereport obj = self._parse(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 1981, in _parse subobj = sc._parsereport(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 312, in _parsereport obj = self._parse(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 2439, in _parse return self.subcon._parsereport(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 312, in _parsereport obj = self._parse(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 4496, in _parse return self.subcon._parsereport(io.BytesIO(data), context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 312, in _parsereport obj = self._parse(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 697, in _parse obj = self.subcon._parsereport(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 312, in _parsereport obj = self._parse(stream, context, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 4567, in _parse b = stream_read(stream, unit, path) File "/Users/huya/code/perfcat/venv/lib/python3.7/site-packages/construct/core.py", line 92, in stream_read raise StreamError("stream read less than specified amount, expected %d, found %d" % (length, len(data)), path=path) construct.core.StreamError: Error in path (parsing) -> threadmap -> process stream read less than specified amount, expected 1, found 0