appetizerio / replaykit

[DEPRECATED] Command line tools for recording, replaying and mirroring touchscreen events for Android
Apache License 2.0
245 stars 61 forks source link

Device hangs when running appetizer trace replay #14

Closed djcm75 closed 6 years ago

djcm75 commented 6 years ago

Hi, I record the trace on system A and when I run replay on system B, the device hangs, I have to reboot the device manaully, because the device appears offline when I run adb devices

Can you suggest what is wrong?

mingyuan-xia commented 6 years ago
  1. make sure you dont have STF or alike running or managing the device in question.
  2. adb shell ps | grep minitouch to check if there is any process running minitouch. If so, there should be some testing frameworks/tools using minitouch that conflicts with replaykit.
  3. If not, please report further details about the device, like model, root?, Android version, and adb shell getevent -lp results.
djcm75 commented 6 years ago

Thanks for your feedback. I do have stf running Is there a way to run both stf and replaykit ?

djcm75 commented 6 years ago

I have another problem I am using the code in test-appetizer-toolkit-replays.sh as is I invoke the shell script for another python script, the app launches waits a few seconds and then exits without any errors. When I run only the shell script, it works flawlessly, it replays all of the events in the trace file

mingyuan-xia commented 6 years ago

You need to remove the device from STF's control. As for the script, I suspect your shell sets some environment variables (e.g., PATH) that makes replaykit work. But in the python case, processes launched from subprocess does not have the same environment variables as the shell. To workaround, 1. set shell=True when opening replaykit from Python 2. make a symbolic link in /usr/bin/ or similar locations for adb.