Cannot Start Trepn Profiler with replaykit
danielWatson3141 opened this issue · comments
Hi,
I am trying to use replaykit to trigger Trepn Profiler to start profiling. Generally, ADB shell commands work fine. Like this one (my replaykit executable is called starfish):
starfish devices control $target shell input keyevent KEYCODE_WAKEUP
However, this command does not work:
starfish devices control $target shell am broadcast -a com.quicinc.trepn.start_profiling -e com.quicinc.trepn.database_file
And gives me this error:
usage: starfish.exe [-h] [-v VERBOSE] {version,update,trace,adb,devices,plan,insight} ... starfish.exe: error: unrecognized arguments: -a com.quicinc.trepn.start_profiling -e com.quicinc.trepn.database_file trepnTemp
But this command works just fine over adb:
adb shell am broadcast -a com.quicinc.trepn.start_profiling -e com.quicinc.trepn.database_file "trepnTemp"
This has been tested and confirmed a problem on Windows and Mac. We can work around this problem by looping through our target list and calling adb commands in stead but this is ugly and time consuming.
Thank you for spending your time on this helpful tool. It has been of use in our research.
I think the host shell (Linux/Windows) might misinterpret -a ...
as the parameters for starfish.
Please try starfish devices control $target shell "am broadcast -a com.quicinc.trepn.start_profiling -e com.quicinc.trepn.database_file"
.
This will help to send am broadcast ...
as a whole to the device.
I will add this usage to README later.
Indeed that works perfectly on Windows.Will test Linux later. Thanks!