15log = subprocess.check_output([ADB,
'root']).
decode(
'utf-8')
19 raise Exception(
'adb root failed')
21subprocess.check_output([ADB,
'shell',
'stop',
'thermald']).
decode(
'utf-8')
23subprocess.check_output([ADB,
'shell',
'echo "%s" > '
24 '/sys/class/kgsl/kgsl-3d0/gpuclk' % freq]).
decode(
'utf-8')
26actual_freq = subprocess.check_output([ADB,
'shell',
'cat '
27 '/sys/class/kgsl/kgsl-3d0/gpuclk']).
decode(
'utf-8').strip()
28if actual_freq != freq:
29 raise Exception(
'Frequency (actual, expected) (%s, %s)'
30 % (actual_freq, freq))
32subprocess.check_call([ADB,
'shell',
'echo "%s" > '
33 '/sys/class/kgsl/kgsl-3d0/idle_timer' % idle_timer])
35actual_timer = subprocess.check_output([ADB,
'shell',
'cat '
36 '/sys/class/kgsl/kgsl-3d0/idle_timer']).
decode(
'utf-8').strip()
37if actual_timer != idle_timer:
38 raise Exception(
'idle_timer (actual, expected) (%s, %s)'
39 % (actual_timer, idle_timer))
41for s
in [
'force_bus_on',
'force_rail_on',
'force_clk_on']:
42 subprocess.check_call([ADB,
'shell',
'echo "1" > '
43 '/sys/class/kgsl/kgsl-3d0/%s' % s])
44 actual_set = subprocess.check_output([ADB,
'shell',
'cat '
45 '/sys/class/kgsl/kgsl-3d0/%s' % s]).
decode(
'utf-8').strip()
47 raise Exception(
'%s (actual, expected) (%s, 1)'
def print(*args, **kwargs)
static DecodeResult decode(std::string path)