Skip to content

Commit

Permalink
Add ro.build.version.incremental to device info
Browse files Browse the repository at this point in the history
  • Loading branch information
zjn0505 committed Mar 5, 2022
1 parent 46381ec commit f46fba6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/list_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
regexConnect = "^connect .*"

def get_property(name=None):
infos = run_script(adb_path + " -s " + name + " shell getprop | grep 'ro.build.version.release]\|ro.build.version.sdk]\|ro.product.manufacturer]\|ro.product.model\|ro.build.display.id]' | awk -F'[][]' -v n=2 '{ print $(2*n) }'")
infos = run_script(adb_path + " -s " + name + " shell getprop | grep 'ro.build.version.release]\|ro.build.version.sdk]\|ro.product.manufacturer]\|ro.product.model\|ro.build.display.id]\|ro.build.version.incremental]' | awk -F'[][]' -v n=2 '{ print $(2*n) }'")
infos = infos.rstrip().split('\n')
return infos

Expand All @@ -49,13 +49,13 @@ def get_device_items(arg, devices):
else:
title = name
infos = get_property(name)
if not infos or len(infos) < 4:
if not infos or len(infos) < 6:
continue
manufacturer = infos[3].title()
model = infos[4].title()
manufacturer = infos[4].title()
model = infos[5].title()
valid = True
subtitle = "%s - %s - Android %s, API %s" % (manufacturer, model, infos[1], infos[2])
mod_alt = infos[0]
subtitle = "%s - %s - Android %s, API %s" % (manufacturer, model, infos[2], infos[3])
mod_alt = "%s - %s" % (infos[0], infos[1])

it = Item(title=title, autocomplete=name, valid=valid, arg=name, subtitle=subtitle)
it.setvar('status', values[1])
Expand Down

0 comments on commit f46fba6

Please sign in to comment.