From 258be2d23c2485017daec8ff5df23e949e57391f Mon Sep 17 00:00:00 2001 From: chenhq Date: Mon, 23 Oct 2023 10:09:40 +0800 Subject: [PATCH] fix #229 --- FAQ.md | 6 ++++++ solox/__init__.py | 2 +- solox/public/common.py | 7 +++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/FAQ.md b/FAQ.md index 5869ad9..1f4cd8b 100644 --- a/FAQ.md +++ b/FAQ.md @@ -106,3 +106,9 @@ * Cpu、Memory、Network、FPS * 界面如果不选择进程就点击Start收集,那么默认使用的是这个包名的主进程。 * 界面选择了app的某个进程收集,如果收集过程中将app杀掉,然后再恢复后自动使用的是主进程,有可能和你界面选择的进程不一致。 + + +## 2️⃣0️⃣ Android/iOS最高支持的系统版本? + +- Android: 13.0 +- iOS: 16.5 diff --git a/solox/__init__.py b/solox/__init__.py index 10bb4d6..2eb1477 100644 --- a/solox/__init__.py +++ b/solox/__init__.py @@ -2,4 +2,4 @@ from __future__ import absolute_import -__version__ = '2.7.9' +__version__ = '2.8.0' diff --git a/solox/public/common.py b/solox/public/common.py index d1de41e..9cf0b67 100644 --- a/solox/public/common.py +++ b/solox/public/common.py @@ -61,8 +61,11 @@ def getDeviceIds(self): def getDevicesName(self, deviceId): """Get the device name of the Android corresponding device ID""" - devices_name = os.popen(f'{self.adb} -s {deviceId} shell getprop ro.product.model').readlines() - return devices_name[0].strip() + try: + devices_name = os.popen(f'{self.adb} -s {deviceId} shell getprop ro.product.model').readlines()[0].strip() + except Exception: + devices_name = os.popen(f'{self.adb} -s {deviceId} shell getprop ro.product.model').buffer.readlines()[0].decode("utf-8").strip() + return devices_name def getDevices(self): """Get all Android devices"""