I'm attempting to get a plotted graph for fps from dtmilano using his script https://medium.com/@dtmilano/analyzing-android-ui-performance-52beb577c421
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import re
import sys
import os
try:
sys.path.insert(0, os.path.join(os.environ['ANDROID_VIEW_CLIENT_HOME'], 'src'))
except:
pass
from com.dtmilano.android.viewclient import ViewClient
from com.dtmilano.android.adb.dumpsys import Dumpsys
from com.dtmilano.android.plot import Plot
try:
pkg = sys.argv.pop(1)
except:
sys.exit('usage: %s <package> [serialno]' % sys.argv[0])
device, serialno = ViewClient.connectToDeviceOrExit()
Plot().append(Dumpsys(device, Dumpsys.GFXINFO, pkg, Dumpsys.FRAMESTATS)).plot(_type=Dumpsys.FRAMESTATS)
But I'm getting this in cmd
C:\Users\PSeebee>python C:\Users\PSeebee\Desktop\gfxinfo-plot.py com.intel.nflmlpdemo
Traceback (most recent call last):
File "C:\Users\PSeebee\Desktop\gfxinfo-plot.py", line 23, in <module>
Plot().append(Dumpsys(device, Dumpsys.GFXINFO, pkg, Dumpsys.FRAMESTATS)).plot(_type=Dumpsys.FRAMESTATS)
File "C:\Python27\lib\site-packages\com\dtmilano\android\adb\dumpsys.py", line 62, in __init__
self.parse(adbclient.shell(cmd), subcommand, *args)
AttributeError: 'tuple' object has no attribute 'shell'
I've got python 2.7.18 installed with androidviewclient 15.8.1 (latest), my paths set (i think), adb installed with the sdk. The only other thing i've had a issue with is that the "tools" folder from the sdk isn't in it's directory.
What can I do to get this working? do I need to edit dumpsys.py?