Skip to content

Commit

Permalink
Add new items for extraction, shift things around - #4
Browse files Browse the repository at this point in the history
Added:
- kernel version (info->os->kernel version)
- GPU vendor (info->gpu->vendor)

corrected the source command for dumpsysy_services (was a string
instead of 1-tuple)
  • Loading branch information
rmmbear committed Sep 24, 2017
1 parent f460968 commit 0a34a29
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions helper/extract_device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,11 @@ def _format_value(self, extracted_value):
(("dumpsys", "SurfaceFlinger"), (("as_list", False), ("return_output", True)), "surfaceflinger_dump"): (
InfoSpec(
extraction_commands=(
(re.search, ('(?<=GLES: ).*(?=\\,)', '$source')),),
(re.search, ('(?:GLES\\:\\ )(.*?)(?:\\,)', '$source'), (('$group', 1),)),),
var_name='Vendor', var_dict_1='GPU', var_dict_2='_info'),
InfoSpec(
extraction_commands=(
(re.search, ('(?:GLES\\:\\ .*?\\,)(.*?)(?:\\,)', '$source'), (('$group', 1),)),),
var_name='Model', var_dict_1='GPU', var_dict_2='_info'),
InfoSpec(
extraction_commands=(
Expand Down Expand Up @@ -356,7 +360,6 @@ def _format_value(self, extracted_value):
var_name='CPU Features', var_dict_1='CPU', var_dict_2='_info', resolve_multiple_values='drop',
post_extraction_commands=(
('method', 'strip', (' :\t',)),)),

),
(("cat", "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"), (("as_list", False), ("return_output", True)), "cpu_freq"): (
InfoSpec(
Expand All @@ -377,6 +380,10 @@ def _format_value(self, extracted_value):
('function', lambda x: int(x) + 1, ('$extracted',)),
('function', str, ('$extracted',)))),
),
(("cat", "/proc/version"), (("as_list", False), ("return_output", True)), "kernel_version"): (
InfoSpec(
var_name='Kernel Version', var_dict_1='OS', var_dict_2='_info',),
),
(("cat", "/proc/meminfo"), (("as_list", False), ("return_output", True)), "meminfo") : (
InfoSpec(
extraction_commands=(
Expand Down Expand Up @@ -507,7 +514,7 @@ def _format_value(self, extracted_value):
(("cat", "/system/build.prop"), (('as_list', False), ("return_output", True)), "build.prop") :(
# this is here only to be picked up during debug helper device dumps
),
(("dumpsys"), (('as_list', False), ("return_output", True)), "dumpsys_services") :(
(("dumpsys",), (('as_list', False), ("return_output", True)), "dumpsys_services") :(
# this is here only to be picked up during debug helper device dumps
),
}

0 comments on commit 0a34a29

Please sign in to comment.