Cartucho / android-touch-record-replay

How to record and replay touchscreen events on an Android device.
Apache License 2.0
229 stars 49 forks source link

Can compile, but it won't do anything #13

Closed peterdk closed 5 years ago

peterdk commented 5 years ago

I am trying to compile the mysendevent program. However, when using the command listed in the readme, it compiles fine, but it wont replay the touch events.

I tried with Clang, since GCC is not used anymore, but although it compiles, it won't process. It does run without commands and outputs the info message. But when giving the input device and touches.txt nothing happens on screen.

I made a GCC toolchain for Android 16, and compiled it with: ./arm-linux-androideabi-gcc -static -march=armv7-a ~/git/tmp/android-touch-record-replay/mysendevent.c -o ~/git/tmp/mysendevent . It compiles, but doesn't work.

Replacing the binary with your precompiled one gives instant working result.

Could you lay out what flags and what toolchain you used?

peterdk commented 5 years ago

I also booted up Ubuntu 18.04 and installed gcc-arm-linux-gnueabi, but while it compiles, it wont run as well.

peterdk commented 5 years ago

Turns out the first sleep_time is huge, because it doesn't take into account that the previous timestamp is 0.0. I handled that (and saw a pull request from someone else that did this). So now it works. Please update the code.

Cartucho commented 5 years ago

I think I just fixed that https://github.com/Cartucho/android-touch-record-replay/pull/10

peterdk commented 5 years ago

Yes, this is fixed.