Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error replaying on Android8 for Oneplus and Samsung S8 #22

Open
syberkitten opened this issue Oct 31, 2018 · 10 comments
Open

Error replaying on Android8 for Oneplus and Samsung S8 #22

syberkitten opened this issue Oct 31, 2018 · 10 comments

Comments

@syberkitten
Copy link

syberkitten commented Oct 31, 2018

Hi
Great project, but I have some bugs with certain devices,
not all events are recorded, and I'm getting this error in stderr:

[stderr_data]:  /var/folders/t7/wykzbl_x2gqb4yx6l_fz04zh0000gn/T/_MEIBUqnr0/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(989318.934083, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 10)
/var/folders/t7/wykzbl_x2gqb4yx6l_fz04zh0000gn/T/_MEIBUqnr0/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(989318.942262, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 8)

[stderr_data]:  /var/folders/t7/wykzbl_x2gqb4yx6l_fz04zh0000gn/T/_MEIBUqnr0/droidrep/GeteventTools.py:179: UserWarning: TypeB MT meets unknown evCmd(989318.949994, 'EV_KEY', 'BTN_TOOL_FINGER', 0)

[stderr_data]:  /var/folders/t7/wykzbl_x2gqb4yx6l_fz04zh0000gn/T/_MEIBUqnr0/droidrep/GeteventTools.py:179: UserWarning: TypeB MT meets unknown evCmd(989319.074845, 'EV_KEY', 'BTN_TOOL_FINGER', 1)

[stderr_data]:  /var/folders/t7/wykzbl_x2gqb4yx6l_fz04zh0000gn/T/_MEIBUqnr0/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(989319.074845, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 11)

[stderr_data]:  /var/folders/t7/wykzbl_x2gqb4yx6l_fz04zh0000gn/T/_MEIBUqnr0/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(989319.099495, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 10)

the side effect is that when pressing the same button lets say: 10 times
only the first 1-2-3 are recorded.

Once the above error comes, not all events are recorded.

Happens mainly on devices having android >= 8
such as OnePlus 6 / Xiaomi Mi 5 / etc....

On the Xiaomi when trying to record I get:

[stderr_data]:  The Linux device file for touchscreen cannot be auto-detected. The device might not have proper permissions for getevent

When trying to play getting:

[stdout_line]:  Crash in main_thread
@mingyuan-xia
Copy link
Contributor

These ignored TypeB unknown commands should be benign, but worth a careful look.
As for the crash, I will find a Oneplus device to test with.
[stderr_data]: The Linux device file for touchscreen cannot be auto-detected. The device might not have proper permissions for getevent This is more likely the root cause for this case. On Mi5, please turn on USB debugging (Security option) in the developer options and try record again.
If the problem still happens, please let me know.

@syberkitten
Copy link
Author

syberkitten commented Nov 4, 2018

Haven't been able to find this file mentioned:
droidrep/GeteventTools.py:172

Looks like only part of the directory structure exists,
but the file is missing.

@mingyuan-xia
Copy link
Contributor

That is just a pointer to the source file line number in the compiled python executable.
Please have a try on Mi5 with USB debugging (Security option) on while I am taking a look at the Oneplus.

@syberkitten
Copy link
Author

I've been trying with Galaxy S8,
what happens is that when trying to play events,
a small cursor appears on the screen and starts to move.

This is happening instead of the actual events being played,
a small cursor us being played.

Did you notice this issue? (Android version 8.0.0)
Samsung experience version: 9.0

here's a link to see video of playback:
https://drive.google.com/open?id=1khyK87ZA5vpkcm1nyuuP7dssetJFKBpg

@mingyuan-xia
Copy link
Contributor

This is weird. But the mouse cursor seems to replay the finger gestures properly. I guess it is because S8 supports a Stylus Pen and the touchscreen events being replayed were mistaken as from the pen. Anyway, thanks for the video it is very helpful.

@syberkitten
Copy link
Author

syberkitten commented Nov 5, 2018

@mingyuan-xia Thanks for having a look,
I've just recorded and played events on the Xiaomi Mi 5
after unlocking it for this feature.

Events are playing, I'm still getting these errors,
but at least most of the playback looks ok.

I'll do some more testing and update.

[stderr_data]:  /var/folders/t7/wykzbl_x2gqb4yx6l_fz04zh0000gn/T/_MEIk2J53g/droidrep/GeteventTools.py:179: UserWarning: TypeB MT meets unknown evCmd(53257.220341, 'EV_KEY', 'BTN_TOOL_FINGER', 1)

[stderr_data]:  /var/folders/t7/wykzbl_x2gqb4yx6l_fz04zh0000gn/T/_MEIk2J53g/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(53257.220341, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 4)

@mingyuan-xia mingyuan-xia changed the title Error in droidrep/GeteventTools.py Error replaying for Android8 on Oneplus and Samsung S8 Nov 5, 2018
@mingyuan-xia mingyuan-xia changed the title Error replaying for Android8 on Oneplus and Samsung S8 Error replaying on Android8 for Oneplus and Samsung S8 Nov 5, 2018
@syberkitten
Copy link
Author

Some observations, most of the time when recording events
and playing, the last events are skipped. (last 0.5 seconds approximately)

it's as if not all events are played, or you need to add some delay
before last events are loaded and the exit to appetizer shell.

did you notice this issue? It's happening with all devices.

@mingyuan-xia
Copy link
Contributor

yes, this bug has bothered me for a while. #5 also reported.
I know about why it happens, but workarounds are not easy. I think I will fix this one first before the device compatibility issues.

@syberkitten
Copy link
Author

Good to hear it's a known issue.
My workaround is to simply record a few more "dummy" events
at the end.

and looking forward to your next (upcoming) release 👍

@connglli
Copy link

When record, replaykit still complains about UserWarning: TypeB MT meets unknown evCmd(...) on OnePlus 6T (with Android 9).

> ./replaykit trace record mytrace.trace
appetizer> /tmp/_MEIFNxiKl/droidrep/GeteventTools.py:179: UserWarning: TypeB MT meets unknown evCmd(66131.628426, 'EV_KEY', 'BTN_TOOL_FINGER', 1)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(66131.628426, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 7)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(66131.638401, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 8)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(66131.663978, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 7)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(66131.680905, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 6)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:179: UserWarning: TypeB MT meets unknown evCmd(66131.697122, 'EV_KEY', 'BTN_TOOL_FINGER', 0)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:179: UserWarning: TypeB MT meets unknown evCmd(66132.809589, 'EV_KEY', 'BTN_TOOL_FINGER', 1)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(66132.848911, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 5)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:179: UserWarning: TypeB MT meets unknown evCmd(66132.865154, 'EV_KEY', 'BTN_TOOL_FINGER', 0)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:179: UserWarning: TypeB MT meets unknown evCmd(66134.301622, 'EV_KEY', 'BTN_TOOL_FINGER', 1)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(66134.301622, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 10)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(66134.321209, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 11)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:172: UserWarning: Type B MT meets unknown evCmd(66134.329474, 'EV_ABS', 'ABS_MT_TOUCH_MINOR', 10)
/tmp/_MEIFNxiKl/droidrep/GeteventTools.py:179: UserWarning: TypeB MT meets unknown evCmd(66134.337349, 'EV_KEY', 'BTN_TOOL_FINGER', 0)

When replay, replaykit complains about Error while communicating with adb server(127.0.0.1:5037): Fail to get enough bytes, even though adb server is already started (see below)

> adb devices
List of devices attached
df3ba3cf        device

> ./replaykit trace replay mytrace.trace df3ba3cf
Error while communicating with adb server(127.0.0.1:5037): Fail to get enough bytes

> adb kill-server
> adb start-server
* daemon not running; starting now at tcp:5037
* daemon started successfully

> ./replaykit trace replay mytrace.trace df3ba3cf
Error while communicating with adb server(127.0.0.1:5037): Fail to get enough bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants