Last active
October 11, 2022 07:20
-
-
Save CBike/ccf736da9914fb396018c8400656db1d to your computer and use it in GitHub Desktop.
android devices`s serial number string handling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
android_list = [] | |
rsi_id = '' | |
fpi_id = '' | |
ret = subprocess.check_output('adb devices', shell=True, universal_newlines=True) | |
ret = ret.replace('\r', '') | |
devices = ret.split('\n') | |
for i in devices: | |
if i.find('\tdevice') != -1: | |
i = i.replace('\tdevice','') | |
android_list.append(i) | |
print(i) | |
print (devices) | |
print (android_list) | |
print("HELLO C-Bike") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment