openstf / minitouch

Minimal multitouch event producer for Android.
Other
633 stars 233 forks source link

(Multi-Touch doesn't support HTC M8x) Input 'u 0', then both slot 0 and slot 1 are released #25

Closed yihchu closed 6 years ago

yihchu commented 6 years ago

i test a example, is use multi-touch, but when i input 'u 0', then the code below it will not take effect, What did I do wrong ???

the example is 0: d 0 100 0 50 1: c 2: w 100 3: d 1 0 100 50 4: c 5: w 100 6: m 0 90 10 50 7: m 1 10 90 50 8: c 9: w 100 10: m 1 20 80 50 11: c 12: w 100 13: m 0 80 20 50 14: c 15: w 100 16: m 1 20 80 50 17: u 0 (here i input 'u 0', and the code left will not take effect) 18: c 19: w 100 20: m 1 30 70 50 21: c 22: w 100 23: m 1 40 60 50 24: c 25: w 100 26: m 1 50 50 50 27: c 28: w 100 29: u 1 (if i put 'u 0 ' here, then all is ok) 30: c

Working Version: d 0 100 0 50 c w 100 d 1 0 100 50 c w 100 m 0 90 10 50 m 1 10 90 50 c w 100 m 1 20 80 50 c w 100 m 0 80 20 50 c w 100 m 1 20 80 50 u 0 c w 100 m 1 30 70 50 c w 100 m 1 40 60 50 c w 100 m 1 50 50 50 c w 100 u 1 c

sorccu commented 6 years ago

You can't start new touches out of order. You can't dod 1 ... (second finger) followed by d 0 ... (first finger), you have to start with d 0 ... (first finger) and then use d 1 ....(second finger) for the next contact.

yihchu commented 6 years ago

@sorccu i changed '01' order, but nothing changed. when i input u 0, both of the two fingers released.

sorccu commented 6 years ago

Post your new set of commands.

yihchu commented 6 years ago

i have updated the issue's content

sorccu commented 6 years ago

Your commands and comments don't make sense anymore. You say, here i input 'u 1', and the code left will not take effect, but you try to do m 1 after that. Please post the exact set of commands that does not work. If you want to provide the working version too, then post two sets of commands. No conditional comments please.

yihchu commented 6 years ago

sorry, i wrote comments wrong, and i modified it.

sorccu commented 6 years ago

You still have u 1 (if i put 'u 1 ' here, then all is ok) in there. Both versions are the same.

Also, what do you mean when you say "will not take effect?" What exactly should happen, but doesn't?

yihchu commented 6 years ago

i want to release 0 first, and go on moving 1。 but now,the effect is, if i release 0, then i can not move 1. that means, i release 0 at line 17, then line 19 - line 30 will not run. and if i move line 17 to the end. then all is ok.

That it is to say, if i release one finger, then the other finder is released. What i want is, if i release one finger, the other is not affected. So i want to ask, What did I do wrong and how to do this.

yihchu commented 6 years ago

hey, i found that only 'htc m8x' have this problem

sorccu commented 6 years ago

Run ’adb shell getevent -ilp’ (maybe remove -i or -l if not supported) and post the results here.

yihchu commented 6 years ago

Can't enable monotonic clock reporting: Invalid argument add device 1: /dev/input/event5 bus: 0000 vendor 0000 product 0000 version 0000 name: "h2w headset" location: "" id: "" version: 1.0.1 events: KEY (0001): KEY_END KEY_MUTE KEY_VOLUMEDOWN KEY_VOLUMEUP KEY_NEXTSONG KEY_PLAYPAUSE KEY_PREVIOUSSONG KEY_REWIND KEY_FASTFORWARD KEY_MEDIA KEY_SEND input props:

Can't enable monotonic clock reporting: Invalid argument add device 2: /dev/input/event4 bus: 0000 vendor 0000 product 0000 version 0000 name: "qpnp_pon" location: "qpnp_pon/input0" id: "" version: 1.0.1 events: KEY (0001): KEY_POWER input props: INPUT_PROP_TOPBUTTONPAD Can't enable monotonic clock reporting: Invalid argument add device 3: /dev/input/event1 bus: 0000 vendor 0000 product 0000 version 0000 name: "AK8789_HALL_SENSOR" location: "" id: "" version: 1.0.1 events: KEY (0001): 00fb 00fc input props: Can't enable monotonic clock reporting: Invalid argument add device 4: /dev/input/event0 bus: 0000 vendor 0000 product 0000 version 0000 name: "device-keypad" location: "" id: "" version: 1.0.1 events: KEY (0001): KEY_VOLUMEDOWN KEY_VOLUMEUP KEY_POWER input props: could not get driver version for /dev/input/mice, Not a typewriter Can't enable monotonic clock reporting: Invalid argument add device 5: /dev/input/event2 bus: 0018 vendor 0000 product 0000 version 0000 name: "CwMcuSensor" location: "" id: "" version: 1.0.1 events: REL (0002): REL_DIAL REL_WHEEL REL_MISC 000a 000b 000c ABS (0003): ABS_Y : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_Z : value 63, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_RX : value 989, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_RY : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_RZ : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_THROTTLE : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_RUDDER : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_WHEEL : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_GAS : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_BRAKE : value 0, min -3, max 3, fuzz 0, flat 0, resolution 0 000b : value 0, min -3, max 3, fuzz 0, flat 0, resolution 0 000c : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 000d : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 000e : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 000f : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_HAT0X : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_HAT0Y : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_HAT1X : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_HAT1Y : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_HAT2X : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_HAT2Y : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_HAT3X : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_HAT3Y : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_PRESSURE : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_DISTANCE : value 0, min 0, max 1, fuzz 0, flat 0, resolution 0 ABS_TILT_X : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_TILT_Y : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_TOOL_WIDTH : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 001d : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 001e : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 001f : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_VOLUME : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 0021 : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 0022 : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 0023 : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 0024 : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 0025 : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 0027 : value 15, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MISC : value 0, min 0, max 9, fuzz 0, flat 0, resolution 0 0029 : value 3855, min -32768, max 32768, fuzz 0, flat 0, resolution 0 002a : value 3855, min -32768, max 32768, fuzz 0, flat 0, resolution 0 002b : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 002c : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 002d : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 002e : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_TOUCH_MAJOR : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_TOUCH_MINOR : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_WIDTH_MAJOR : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_ORIENTATION : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_POSITION_X : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_POSITION_Y : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_TOOL_TYPE : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_BLOB_ID : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_TRACKING_ID : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_PRESSURE : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_DISTANCE : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_TOOL_X : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MT_TOOL_Y : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 003e : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 ABS_MAX : value 0, min -32768, max 32768, fuzz 0, flat 0, resolution 0 input props: Can't enable monotonic clock reporting: Invalid argument add device 6: /dev/input/event3 bus: 0018 vendor 0000 product 0000 version 0000 name: "synaptics-rmi-touchscreen" location: "" id: "" version: 1.0.1 events: KEY (0001): KEY_HOME KEY_MENU KEY_BACK KEY_SEARCH 00f9 BTN_TOUCH ABS (0003): 002a : value 0, min 0, max -2041312448, fuzz 0, flat 0, resolution 0 002b : value 0, min 0, max 16711695, fuzz 0, flat 0, resolution 0 ABS_MT_SLOT : value 0, min 0, max 9, fuzz 0, flat 0, resolution 0 ABS_MT_TOUCH_MAJOR : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0 ABS_MT_WIDTH_MAJOR : value 0, min 0, max 30, fuzz 0, flat 0, resolution 0 ABS_MT_POSITION_X : value 0, min 0, max 1620, fuzz 0, flat 0, resolution 0 ABS_MT_POSITION_Y : value 0, min 0, max 2880, fuzz 0, flat 0, resolution 0 ABS_MT_TRACKING_ID : value 0, min 0, max 65535, fuzz 0, flat 0, resolution 0 ABS_MT_PRESSURE : value 0, min 0, max 30, fuzz 0, flat 0, resolution 0 ABS_MT_DISTANCE : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0 input props:
sorccu commented 6 years ago

I think minitouch may perhaps be choosing an incorrect device. Can you also post the log output from minitouch?

yihchu commented 6 years ago

And i found another device that goes bad. and i run the command you gave me, i found their common point is they have 'BTN_TOUCH'.

and how can i get minitouch's log?

sorccu commented 6 years ago

Start minitouch and post the output. I don’t know how you’re running it. If you use STF, try running minitouch on its own. You can use the run.sh script at the root of this repo.

Or just ‘adb shell /data/local/tmp/minitouch’ if you use STF and can’t compile minitouch. Stop STF first though.

sorccu commented 6 years ago

Do the same for that other device as well, run the getevent command too, and get the minitouch output. And let me know what device it is.

Run ‘adb devices -l’ and post the lines for both devices. I want to know the exact model number for both.

yihchu commented 6 years ago

i connect minitouch use node's net, and i only got one data :

v 1 ^ 10 720 1280 255 $ 5816

stf's installation is to slow, and i'll try it later

devices' detail info are:

HT442WM01077 device usb:337838080X product:htc_asia_tw model:HTC_M8x device:htc_m8

and

BY2QLS149C054578 device usb:337838080X product:H30-L02 model:HONOR_H30_L02 device:hwH30

the other device's info is here : add device 1: /dev/input/event5 bus: 0000 vendor 0000 product 0000 version 0000 name: "compass_input" location: "" id: "" version: 1.0.1 events: ABS (0003): ABS_X : value 0, min -11520, max 11520, fuzz 0, flat 0, resolution 0 ABS_Y : value 0, min -11520, max 11520, fuzz 0, flat 0, resolution 0 ABS_Z : value 0, min -11520, max 11520, fuzz 0, flat 0, resolution 0 ABS_RX : value 0, min 0, max 3, fuzz 0, flat 0, resolution 0 ABS_RY : value 0, min -32768, max 32767, fuzz 0, flat 0, resolution 0 ABS_RZ : value 0, min -32768, max 32767, fuzz 0, flat 0, resolution 0 ABS_THROTTLE : value 0, min -32768, max 32767, fuzz 0, flat 0, resolution 0 ABS_RUDDER : value 0, min 0, max 3, fuzz 0, flat 0, resolution 0 ABS_WHEEL : value 0, min -2287638, max 2287638, fuzz 0, flat 0, resolution 0 ABS_GAS : value 0, min -2287638, max 2287638, fuzz 0, flat 0, resolution 0 ABS_BRAKE : value 0, min -2287638, max 2287638, fuzz 0, flat 0, resolution 0 ABS_HAT0X : value 0, min 0, max 3, fuzz 0, flat 0, resolution 0 ABS_HAT0Y : value 0, min 0, max 23040, fuzz 0, flat 0, resolution 0 ABS_HAT1X : value 0, min -11520, max 11520, fuzz 0, flat 0, resolution 0 ABS_HAT1Y : value 0, min -5760, max 5760, fuzz 0, flat 0, resolution 0 ABS_HAT2X : value 0, min -1285377, max 1285377, fuzz 0, flat 0, resolution 0 ABS_HAT2Y : value 0, min -1285377, max 1285377, fuzz 0, flat 0, resolution 0 ABS_HAT3X : value 0, min -1285377, max 1285377, fuzz 0, flat 0, resolution 0 ABS_HAT3Y : value 0, min -10283017, max 10283017, fuzz 0, flat 0, resolution 0 ABS_PRESSURE : value 0, min -10283017, max 10283017, fuzz 0, flat 0, resolution 0 ABS_DISTANCE : value 0, min -10283017, max 10283017, fuzz 0, flat 0, resolution 0 ABS_TILT_X : value 0, min -65536, max 65536, fuzz 0, flat 0, resolution 0 ABS_TILT_Y : value 0, min -65536, max 65536, fuzz 0, flat 0, resolution 0 ABS_TOOL_WIDTH : value 0, min -65536, max 65536, fuzz 0, flat 0, resolution 0 ABS_VOLUME : value 0, min -65536, max 65536, fuzz 0, flat 0, resolution 0 input props:

could not get driver version for /dev/input/mice, Not a typewriter add device 2: /dev/input/event7 bus: 0018 vendor 0000 product 0000 version 0000 name: "touchscreen" location: "" id: "" version: 1.0.1 events: KEY (0001): KEY_W KEY_E KEY_C KEY_M KEY_F1 KEY_F2 KEY_F3 KEY_F4 KEY_F5 KEY_F6 KEY_F7 BTN_TOOL_FINGER BTN_TOUCH ABS (0003): ABS_X : value 0, min 0, max 1100, fuzz 0, flat 0, resolution 0 ABS_Y : value 0, min 0, max 1900, fuzz 0, flat 0, resolution 0 ABS_PRESSURE : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0 ABS_MT_TOUCH_MAJOR : value 0, min 0, max 15, fuzz 0, flat 0, resolution 0 ABS_MT_POSITION_X : value 0, min 0, max 720, fuzz 0, flat 0, resolution 0 ABS_MT_POSITION_Y : value 0, min 0, max 1280, fuzz 0, flat 0, resolution 0 ABS_MT_TRACKING_ID : value 0, min 0, max 15, fuzz 0, flat 0, resolution 0 ABS_MT_PRESSURE : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0 input props: INPUT_PROP_DIRECT could not get driver version for /dev/input/mouse0, Not a typewriter add device 3: /dev/input/event6 bus: 0000 vendor 0000 product 0000 version 0000 name: "HI6620_hi6401_CARD Headset Jack" location: "ALSA" id: "" version: 1.0.1 events: KEY (0001): KEY_VOLUMEDOWN KEY_VOLUMEUP KEY_MEDIA SW (0005): SW_HEADPHONE_INSERT SW_MICROPHONE_INSERT input props: add device 4: /dev/input/event0 bus: 0019 vendor 0001 product 0001 version 0100 name: "gpio-keys" location: "gpio-keys/input0" id: "" version: 1.0.1 events: KEY (0001): KEY_VOLUMEDOWN KEY_VOLUMEUP input props: add device 5: /dev/input/event1 bus: 0019 vendor 0000 product 0000 version 0000 name: "k3v2_power_key" location: "" id: "" version: 1.0.1 events: KEY (0001): KEY_POWER input props: add device 6: /dev/input/event4 bus: 0018 vendor 0008 product 0000 version 0000 name: "acc_input" location: "" id: "" version: 1.0.1 events: ABS (0003): ABS_X : value 82, min -11520, max 11520, fuzz 0, flat 0, resolution 0 ABS_Y : value 62, min -11520, max 11520, fuzz 0, flat 0, resolution 0 ABS_Z : value 1017, min -11520, max 11520, fuzz 0, flat 0, resolution 0 input props: add device 7: /dev/input/event3 bus: 0018 vendor 0000 product 0000 version 0000 name: "ps_input" location: "" id: "" version: 1.0.1 events: ABS (0003): ABS_DISTANCE : value 0, min 0, max 1, fuzz 0, flat 0, resolution 0 input props: add device 8: /dev/input/event2 bus: 0018 vendor 0000 product 0000 version 0000 name: "als_input" location: "" id: "" version: 1.0.1 events: ABS (0003): ABS_MISC : value 379, min 0, max 10000, fuzz 0, flat 0, resolution 0 input props:
sorccu commented 6 years ago

No I want the log output. The output you get when you start the minitouch binary. You don’t have to connect to the socket.

sorccu commented 6 years ago

Also I need to know which devices they are. Run the adb devices -l command I posted earlier.

yihchu commented 6 years ago

here's the log you want:

  1. htc Note: device /dev/input/mice is not supported by libevdev open: Out of memory Unable to open device /dev/input/event2 for inspectionType B touch device synaptics-rmi-touchscreen (1620x2880 with 10 contacts) detected on /dev/input/event3 (score 1100)

2.huawei honor Note: device /dev/input/mice is not supported by libevdev Note: device /dev/input/mouse0 is not supported by libevdev Type A touch device touchscreen (720x1280 with 16 contacts) detected on /dev/input/event7 (score 2000) Note: hard-limiting maximum number of contacts to 10

yihchu commented 6 years ago

devices' detail info are:

HT442WM01077 device usb:337838080X product:htc_asia_tw model:HTC_M8x device:htc_m8

and

BY2QLS149C054578 device usb:337838080X product:H30-L02 model:HONOR_H30_L02 device:hwH30

sorccu commented 6 years ago

Can you please check out #26 and see whether the changes work on all of those devices.

yihchu commented 6 years ago

Perfect, work well .