diff --git a/libs/utils/android/system.py b/libs/utils/android/system.py old mode 100644 new mode 100755 index 42e8c4dec7516ea88b6011d7bedb357baa55a72f..de09b5acb9d93c34f9bc2d41e8a09bb5763755a3 --- a/libs/utils/android/system.py +++ b/libs/utils/android/system.py @@ -17,13 +17,10 @@ import logging -from devlib.utils.android import adb_command from devlib import TargetError import os import pexpect as pe -GET_FRAMESTATS_CMD = 'shell dumpsys gfxinfo {} > {}' - class System(object): """ Collection of Android related services @@ -281,8 +278,9 @@ class System(object): :param out_file: output file name :type out_file: str """ - adb_command(target.adb_name, - GET_FRAMESTATS_CMD.format(apk_name, out_file)) + output = target.execute('dumpsys gfxinfo {}'.format(apk_name)) + with open(out_file, 'w') as ofile: + ofile.write(output) @staticmethod def monkey(target, apk_name, event_count=1):