标签:read build tomato tom adb info nes auto phone
1 import os 2 3 # 获取手机系统信息 4 phone_sys = os.popen(‘adb shell "cat /system/build.prop | grep "product""‘).read() 5 print(phone_sys) 6 7 # 获取手机设备型号 8 device_name = os.popen(‘adb shell getprop ro.product.model‘).read() 9 print(device_name) 10 11 # 获取手机系统版本 12 platform_version = os.popen(‘adb shell getprop ro.build.version.release‘).read() 13 print(platform_version) 14 15 # 16 device = os.popen(‘adb shell getprop ro.product.name‘).read() 17 print(device) 18 19 # 获取手机的序列号 20 phone_seria = os.popen(‘adb get-serialno‘).read() 21 phone_seria1 = os.popen(‘adb shell getprop ro.serialno‘).read() 22 print(phone_seria) 23 24 # 获取手机macIMEI号 25 phone_imei = os.popen(‘adb shell getprop gsm.baseband.imei‘).read() 26 phone_imei1 = os.popen(‘adb shell dumpsys iphonesubinfo‘).read() 27 print(phone_imei) 28 29 # 获取手机mac地址 30 phone_mac = os.popen(‘adb shell cat /sys/class/net/wlan0/address‘).read() 31 print(phone_mac)
标签:read build tomato tom adb info nes auto phone
原文地址:https://www.cnblogs.com/lhjb/p/14592335.html