Coder Social home page Coder Social logo

minitouch's People

Contributors

koral-- avatar mumblepins avatar pcrepieux avatar sorccu avatar stoefln avatar tbmc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minitouch's Issues

SO-03L has two same resolution event device

Hi there, first thank you so much make this great tool.

when use SO-03L, this device has a side detect function, if we run adb shell getevent , we will see the event4(sec_touchscreen_side) and event3(sec_touchscreen)

add device 1: /dev/input/event8
  name:     "sm8150-tavil-snd-card Button Jack"
add device 2: /dev/input/event7
  name:     "sm8150-tavil-snd-card Headset Jack"
add device 3: /dev/input/event6
  name:     "AMS TCS3490 Sensor"
add device 4: /dev/input/event5
  name:     "bu520x1nvx"
add device 5: /dev/input/event4
  name:     "sec_touchscreen_side"
add device 6: /dev/input/event3
  name:     "sec_touchscreen"
add device 7: /dev/input/event2
  name:     "gpio-keys"
add device 8: /dev/input/event1
  name:     "SOMC Charger Removal"
add device 9: /dev/input/event0
  name:     "qpnp_pon"

and those two event has the same resolution, the autodetection method will get same score for those two screen, it will chose the event4 which is the wrong one.

Currently I add config for openstf when starting minitouch on SO-03L add extra cmd '-d /dev/input/event3', and it works.

any suggestion that we can do to about the autodetection method ?
have anyone ever meet a device that has more than one event device that has same score?

Android use LocalSocket?

When minicap is used, data can be received without port forwarding.It works.
a
Executed adb shell /data/local/tmp/minitouch,LocalSocket can connect minitouch,but it's OutputStream doesn't work.
d
With minitouch, it doesn't work.
b
Android can use LocalSocket with minitouch? Thank you!

about touch resolution

As you said in #18
"Screen resolution and touch resolution are often not the same."
Do you know how to get device touch resolution?

The minitouch works as a mouse.

First of all, thank you for creating these features.

Honeycam 2019-08-16 12-38-35

Normal operation / Samsung Galaxy S10

It's like the behavior of a laptop's trackpad.

The first test is to communicate directly with the mini touch with a mouse.
The second test is direct manipulation.

I am a Samsung s10 5g model and use android p API 28.

when i run on win7 or win10 it report many socket 10053 error.

when i run on mac it works very well .but on win7 or win10 it reports many socket error the errorno is 10053 . i dont konw why .here is my code ,could you help me ?
def minitouchReplay(cls,cmdlines):
for cmd in cmdlines:
cmd = cmd.strip()
cmd = cmd.replace('\n','\n')
cls.msocket.sendall(cmd)
print "cmd:"+cmd

cmdlines.append(line)
if(line.find('u 0\n')!=-1):
Minitouch.minitouchReplay(cmdlines)
cmdlines = []

i cannot findout whats wrong

click message is received,but click event is not start

I set a log in io_handler like this:

static void io_handler(FILE* input, FILE* output, internal_state_t* state)
{
setvbuf(input, NULL, _IOLBF, 1024);
setvbuf(output, NULL, _IOLBF, 1024);

// Tell version
fprintf(output, "v %d\n", VERSION);

// Tell limits
fprintf(output, "^ %d %d %d %d\n",
        state->max_contacts, state->max_x, state->max_y, state->max_pressure);

// Tell pid
fprintf(output, "$ %d\n", getpid());

char read_buffer[80];

while (fgets(read_buffer, sizeof(read_buffer), input) != NULL)
{
    LOGE_CORE("readbuffer:%s",read_buffer);
    read_buffer[strcspn(read_buffer, "\r\n")] = 0;
    parse_input(read_buffer, state);
}

}

but when the message is received,like:
06-07 03:25:36.674 2640-2640/? E/minitouch: readbuffer:d 0 90 170 100
06-07 03:25:36.675 2640-2640/? E/minitouch: readbuffer:
06-07 03:25:36.675 2640-2640/? E/minitouch: readbuffer:c
06-07 03:25:36.676 2640-2640/? E/minitouch: readbuffer:
06-07 03:25:36.676 2640-2640/? E/minitouch: readbuffer:u 0
06-07 03:25:36.676 2640-2640/? E/minitouch: readbuffer:
06-07 03:25:36.676 2640-2640/? E/minitouch: readbuffer:c
06-07 03:25:36.676 2640-2640/? E/minitouch: readbuffer:

the click event is not start

How to use in remote phone

Hello
If no use "adb forward",how to use the lib?how to create the socket connection? For java or other Programing language

How home、back、menu key work?

In minitouch can parse command like 'm ', but how home、 back、menu key work? I don't find any code in minitouch.c to handle those event. Those key event only can be handled by libevdev?
Thanks for your help.

Unable to find a suitable touch device

Hi,Simo Kinnunen , thank you very much for your contribution. The minicap has gave me much help. Recently ,when I use minitouch ,I meet a problem.
My devices is not a phone but a development-board(HiKey970) developed by HUAWEI Corporation. When I run $ LD_LIBRARY_PATH=/data/local/tmp /data/local/tmp/minitouch command,it return me # Unable to find a suitable touch device. So, I want to make sure that is minitouch run with support of touch driver on device? If not, how can I deal with this problem.

Samsung s8 work not well

First I thank for your minitouch very much,it really useful to me!Now,I have a
Android phone Samsung s8,I use the same style send the position to the device,
But it not work well,other android devices are ok,I cannot find the problem,so if you can help me,please give me some help or some advice,thank you

Minitouch does not work on LG lm-v350

I have a LG device, whose model is lm-v350, release version is 8.0, sdk version is 26, build is "judyp_lao_com-userdebug 8.0.0 opr1.170623.032 180921528041d.fgn test-keys".

I find that minitouch does not work on it, the error message is:

Note: device /dev/input/mice is not supported by libevdev
Type B touch device touch_dev (1439x3119 with 10 contacts) detected on /dev/input/event1 (score 2109)

I can connect to its socket and can get output:

^ 10 1439 3119 255
$ 5862

However, when I input touch commands through the socket, nothing happens on the device screen.

I have another LG device which has the same issue.

minicap works normally on the device.

Unable to find a suitable touch device

i use android x86_64 8.1 、7.1 、6.0 on vmvare and virtualBox ,but unable to find a suitable touch device and Note: device /dev/input/mouse0 is not supported by libevdev,can you help me,thanks

python demo

import socket

BUF_SIZE = 1024
server_addr = ('127.0.0.1', 1111)
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(server_addr)
data = client.recv(BUF_SIZE)
data = '''
d 0 150 150 50\n
c\n
u 0\n
c\n
'''
client.sendall(data)

Unable to do git submodule update

fatal: unable to connect to anongit.freedesktop.org:
anongit.freedesktop.org[0: 131.252.210.161]: errno=Operation timed out

Thanks in Advance.

Permission denied on android Q

i try on android Q,log:
Unable to open device /dev/input/event7 for inspectionopen: Permission denied
Unable to open device /dev/input/event6 for inspectionopen: Permission denied
Unable to open device /dev/input/event5 for inspectionopen: Permission denied
Unable to open device /dev/input/event1 for inspectionopen: Permission denied
Unable to open device /dev/input/event3 for inspectionopen: Permission denied
Unable to open device /dev/input/mice for inspectionopen: Permission denied
Unable to open device /dev/input/event0 for inspectionopen: Permission denied
Unable to open device /dev/input/event2 for inspectionopen: Permission denied
Unable to open device /dev/input/event4 for inspectionUnable to find a suitable touch device

not like stf#477 android Q has no "USB debugging (Security settings)"

Error while operating the device

Hi, Simo. I got an error:

Phone & OS:

The output of adb shell getevent -lp:

add device 1: /dev/input/event7
  name:     "magnetic_sensor"
  events:
    REL (0002): REL_X                 REL_Y                 REL_Z                 REL_RX
                REL_RY
    ABS (0003): ABS_X                 : value 0, min -32768, max 32767, fuzz 0, flat 0, resolution 0
                ABS_Y                 : value 0, min -32768, max 32767, fuzz 0, flat 0, resolution 0
                ABS_Z                 : value 0, min -32768, max 32767, fuzz 0, flat 0, resolution 0
                ABS_MISC              : value 0, min 0, max 0, fuzz 0, flat 0, resolution 0
  input props:
    <none>
add device 2: /dev/input/event6
  name:     "accelerometer_sensor"
  events:
    REL (0002): REL_X                 REL_Y                 REL_Z                 REL_DIAL
                REL_MISC
  input props:
    <none>
add device 3: /dev/input/event5
  name:     "light_sensor"
  events:
    REL (0002): REL_WHEEL             REL_MISC
  input props:
    <none>
add device 4: /dev/input/event4
  name:     "proximity_sensor"
  events:
    ABS (0003): ABS_DISTANCE          : value 1, min 0, max 1, fuzz 0, flat 0, resolution 0
  input props:
    <none>
add device 5: /dev/input/event3
  name:     "qpnp_pon"
  events:
    KEY (0001): KEY_VOLUMEDOWN        KEY_POWER
  input props:
    INPUT_PROP_TOPBUTTONPAD
could not get driver version for /dev/input/mouse0, Not a typewriter
add device 6: /dev/input/event2
  name:     "hbtp_vm"
  events:
    KEY (0001): BTN_MOUSE             BTN_RIGHT
    REL (0002): REL_X                 REL_Y
  input props:
    INPUT_PROP_DIRECT
add device 7: /dev/input/event0
  name:     "meta_event"
  events:
    REL (0002): REL_HWHEEL            REL_DIAL
  input props:
    <none>
could not get driver version for /dev/input/mice, Not a typewriter
add device 8: /dev/input/event1
  name:     "sec_touchscreen"
  events:
    KEY (0001): BTN_TOOL_FINGER*      BTN_TOUCH*
    ABS (0003): ABS_MT_SLOT           : value 0, min 0, max 14, fuzz 0, flat 0, resolution 0
                ABS_MT_TOUCH_MAJOR    : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
                ABS_MT_TOUCH_MINOR    : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
                ABS_MT_ORIENTATION    : value 0, min 65239, max 127, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_X     : value 0, min 0, max 1079, fuzz 0, flat 0, resolution 0
                ABS_MT_POSITION_Y     : value 0, min 0, max 1919, fuzz 0, flat 0, resolution 0
                ABS_MT_TOOL_TYPE      : value 0, min 0, max 1, 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 255, fuzz 0, flat 0, resolution 0
                ABS_MT_DISTANCE       : value 0, min 0, max 255, fuzz 0, flat 0, resolution 0
                ABS_MT_PALM           : value 0, min 0, max 1, fuzz 0, flat 0, resolution 0
    SW  (0005): SW_GLOVE
  input props:
    INPUT_PROP_DIRECT
add device 9: /dev/input/event9
  name:     "hall"
  events:
    SW  (0005): SW_FLIP*
  input props:
    <none>
add device 10: /dev/input/event8
  name:     "gpio-keys"
  events:
    KEY (0001): KEY_VOLUMEUP          KEY_HOMEPAGE
  input props:
    INPUT_PROP_TOPBUTTONPAD
add device 11: /dev/input/event10
  name:     "sec_touchkey"
  events:
    KEY (0001): KEY_BACK              00fe
    LED (0011): LED_MISC
  input props:
    <none>

Error desc:
When I use minitouch, it found the correct input-device "sec_touchscreen"
image
But when I touch the real device with my hand, minitouch print an error, and connection will be broken:
image

Hope you can offer some help. Thank you so much :-)

how to use minitouchagent instead of minitouch on all version of android phone?

minitouch get problem in RedMi 8 Pro , which i believe same with issues#52
now i want to use minitouchagent instead of monitouch,like android O phone performs, i changed minitouch.c code like

//if (state.evdev == NULL)
 // {
    fprintf(stderr, "Unable to find a suitable touch device\n");
    android_service_fd = connect_android_service();
    if( android_service_fd == -1) {
      return EXIT_FAILURE;
    //}
  /* } else {
    state.has_mtslot =
      libevdev_has_event_code(state.evdev, EV_ABS, ABS_MT_SLOT);
    state.has_tracking_id =
      libevdev_has_event_code(sta
    .......
}*/

and rebuild the minitouch.so, but is doesn't work,why?

when excute "ndk-build" some folder do not generate

Hi, sorccu. sorry to bother you.
After excute "ndk-build" command line, in the folder "lib",I find 4 folders which are "arm64-v8a","armeabi-v7a","x86","x86_64" . But the "armeabi","mips","mips64" folder do not generate. I can't find the reason, so ask you for help. Thank you for your precious time.
My compute information:
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed. [01]: Intel64 Family 6 Model 94 Stepping 3 GenuineIntel
~3408 Mhz

Do not work on NUBIA z9mini

Hi,

I installed minitouch onNUBIA z9mini, then run 'adb shell /data/local/tmp/minitouch -h', but minitouch do not work.
the response is:
WARNING: linker: /data/local/tmp/minitouch: unused DT entry: type 0x6ffffffe arg 0xae0
WARNING: linker: /data/local/tmp/minitouch: unused DT entry: type 0x6fffffff arg 0x1
Usage: /data/local/tmp/minitouch [-h] [-d ] [-n ]
-d : Use the given touch device. Otherwise autodetect.
-n : Change the name of of the abtract unix domain socket. (minitouch)
-h: Show help.

The device info:
nubia

minitouch no longer works on MIUI after a system update

minitouch used to run on all our Xiaomi devices.
recently we upgraded some of our devices(via official push), and minitouch no longer works on them.

here is the os information and the error log of minitouch:

shell@natrium:/data/local/tmp $ getprop | grep build
[ro.bootimage.build.date]: [Thu Nov 10 22:33:40 CST 2016]
[ro.bootimage.build.date.utc]: [1478788420]
[ro.bootimage.build.fingerprint]: [Xiaomi/natrium/natrium:6.0.1/MXB48T/V8.0.12.0.MBGCNDI:user/test-keys]
[ro.build.characteristics]: [nosdcard]
[ro.build.date]: [Thu Nov 10 22:29:35 CST 2016]
[ro.build.date.utc]: [1478788175]
[ro.build.description]: [natrium-user 6.0.1 MXB48T V8.0.12.0.MBGCNDI release-keys]
[ro.build.display.id]: [MXB48T]
[ro.build.fingerprint]: [Xiaomi/natrium/natrium:6.0.1/MXB48T/V8.0.12.0.MBGCNDI:user/release-keys]
[ro.build.flavor]: [natrium-user]
[ro.build.host]: [c3-miui-ota-bd13]
[ro.build.id]: [MXB48T]
[ro.build.product]: [natrium]
[ro.build.tags]: [release-keys]
[ro.build.type]: [user]
[ro.build.user]: [builder]
[ro.build.version.all_codenames]: [REL]
[ro.build.version.base_os]: []
[ro.build.version.codename]: [REL]
[ro.build.version.incremental]: [V8.0.12.0.MBGCNDI]
[ro.build.version.preview_sdk]: [0]
[ro.build.version.release]: [6.0.1]
[ro.build.version.sdk]: [23]
[ro.build.version.security_patch]: [2016-11-01]
shell@natrium:/data/local/tmp $ ./minitouch
open: Permission denied
Unable to open device /dev/input/event7 for inspectionopen: Permission denied
Unable to open device /dev/input/event6 for inspectionopen: Permission denied
Unable to open device /dev/input/mouse2 for inspectionopen: Permission denied
Unable to open device /dev/input/event3 for inspectionopen: Permission denied
Unable to open device /dev/input/mouse0 for inspectionopen: Permission denied
Unable to open device /dev/input/event1 for inspectionopen: Permission denied
Unable to open device /dev/input/event0 for inspectionopen: Permission denied
Unable to open device /dev/input/mice for inspectionopen: Permission denied
Unable to open device /dev/input/event5 for inspectionopen: Permission denied
Unable to open device /dev/input/event4 for inspectionopen: Permission denied
Unable to open device /dev/input/mouse1 for inspectionopen: Permission denied
Unable to open device /dev/input/event2 for inspectionUnable to find a suitable touch device

wait in your own code

What's the content in the <> means, could you give me some examples?

Long tap on (10, 10) with 50 pressure using a single contact.

d 0 10 10 50
c

u 0
c

Python wrapper of minitouch

Like this project. 👍

For easier usage, I wrote a python wrapper of it. pyminitouch

With this, user can easily call python API to use minitouch. Need not care about dependencies / devices / version.

Before

  • Check device abi
  • Download a specified version minitouch
  • Install and run it
  • Build a socket
  • Send message with socket, and your message seems like:
    • d 0 150 150 50\nc\nu 0\nc\n
    • hard to read

An unfriendly process.

After

from pyminitouch import MNTDevice


_DEVICE_ID = '123456F'
device = MNTDevice(_DEVICE_ID)

# single-tap
device.tap([(400, 600)])
# multi-tap
device.tap([(400, 400), (600, 600)])
# set the pressure, default == 100
device.tap([(400, 600)], pressure=50)

# ... and something else you want, just like minitouch itself!

You can view github page for further usage.

Redmi Note 8 Pro fails on minitouch

$ adb devices -l
List of devices attached
mrdeeqswm7aqkvvk device usb:336658432X product:begonia model:Redmi_Note_8_Pro device:begonia transport_id:42

$ adb shell ls -al /dev/input/
total 0
drwxr-xr-x 2 root root 140 2019-10-29 16:31 .
drwxr-xr-x 17 root root 5480 2019-10-29 16:31 ..
crw-rw---- 1 system radio 13, 64 2019-10-29 16:31 event0
crw-rw---- 1 system radio 13, 65 2019-10-29 16:31 event1
crw-rw---- 1 system radio 13, 66 2019-10-29 16:31 event2
crw-rw---- 1 root input 13, 67 2019-10-29 16:31 event3
crw-rw---- 1 root input 13, 68 2019-10-29 16:31 event4

The output of minitouch is like this:
open: Permission denied
Unable to open device /dev/input/event2 for inspection
open: Permission denied
Unable to open device /dev/input/event0 for inspection
open: Permission denied
Unable to open device /dev/input/event1 for inspection

The event0, event1 and event2 are in the system group, does it mean minitouch cannot run on this device? any workaround way?

Any suggest is appreciated, thanks in advance.

minitouch is not supported by 4ktv STB

Hello,

I have issue with Android set top box 4ktv (manufacturer: 'AMLOGIC', model: '4ktv', version: '6.0.1', abi: 'armeabi-v7a', product: 'p212', cpuPlatform: 'gxl', openGLESVersion: '2.0' ), i tried to apply @LoCorVin 's https://github.com/LoCorVin/minitouch , but it didn't help.

'+ ndk-build
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14.
/root/android-ndk-r16b/build/core/setup-app.mk:81: Android NDK: Application targets deprecated ABI(s): mips64 armeabi mips
/root/android-ndk-r16b/build/core/setup-app.mk:82: Android NDK: Support for these ABIs will be removed in a future NDK release.
[arm64-v8a] Install : minitouch => libs/arm64-v8a/minitouch
[arm64-v8a] Install : minitouch-nopie => libs/arm64-v8a/minitouch-nopie
[mips64] Install : minitouch => libs/mips64/minitouch
[mips64] Install : minitouch-nopie => libs/mips64/minitouch-nopie
[x86_64] Install : minitouch => libs/x86_64/minitouch
[x86_64] Install : minitouch-nopie => libs/x86_64/minitouch-nopie
[armeabi] Install : minitouch => libs/armeabi/minitouch
[armeabi] Install : minitouch-nopie => libs/armeabi/minitouch-nopie
[armeabi-v7a] Install : minitouch => libs/armeabi-v7a/minitouch
[armeabi-v7a] Install : minitouch-nopie => libs/armeabi-v7a/minitouch-nopie
[mips] Install : minitouch => libs/mips/minitouch
[mips] Install : minitouch-nopie => libs/mips/minitouch-nopie
[x86] Install : minitouch => libs/x86/minitouch
[x86] Install : minitouch-nopie => libs/x86/minitouch-nopie
++ adb shell getprop ro.product.cpu.abi
++ tr -d '\r'

  • abi=armeabi-v7a
    ++ adb shell getprop ro.build.version.sdk
    ++ tr -d '\r'
  • sdk=23
  • (( 23 >= 16 ))
  • bin=minitouch
  • adb push libs/armeabi-v7a/minitouch /data/local/tmp/
    libs/armeabi-v7a/minitouch: 1 file pushed. 0.4 MB/s (34324 bytes in 0.089s)
  • adb shell /data/local/tmp/minitouch
    Note: device /dev/input/mouse1 is not supported by libevdev
    Note: device /dev/input/mice is not supported by libevdev
    Note: device /dev/input/mouse0 is not supported by libevdev
    Unable to find a suitable touch device'

Any idea where could be the problem or how can I fix it?

Many thanks

syntax error: 'newline' unexpected

Run minitouch in kaios (base on firefoxos ) ,not working with this error:
/data/local/tmp/minitouch[7]: syntax error: 'newline' unexpected

steps:

adb -s e118d13 forward tcp:20945 localabstract:minitouch

adb -s e118d13 shell /data/local/tmp/minitouch
/data/local/tmp/minitouch[7]: syntax error: 'newline' unexpected

maybe this info can help

adb shell getevent -lp
add device 1: /dev/input/event5
name: "msm8909-skuc-qf2809-snd-card Headset Jack"
events:
SW (0005): SW_HEADPHONE_INSERT SW_MICROPHONE_INSERT SW_LINEOUT_INSERT
SW_JACK_PHYSICAL_INS
SW_MUTE_DEVICE SW_MAX 0010

input props:

add device 2: /dev/input/event4
name: "msm8909-skuc-qf2809-snd-card Button Jack"
events:
KEY (0001): KEY_VOLUMEDOWN KEY_VOLUMEUP KEY_MEDIA
BTN_4
BTN_5 BTN_6 BTN_7
KEY_VOICECOMMAND
input props:
INPUT_PROP_TOPBUTTONPAD
add device 3: /dev/input/event2
name: "qpnp_pon"
events:
KEY (0001): KEY_VOLUMEDOWN KEY_POWER
input props:
INPUT_PROP_TOPBUTTONPAD
add device 4: /dev/input/event1
name: "hall"
events:
KEY (0001): 0256
input props:
INPUT_PROP_TOPBUTTONPAD
could not get driver version for /dev/input/mice, Not a typewriter
add device 5: /dev/input/event3
name: "gpio-keys"
events:
KEY (0001): KEY_VOLUMEUP KEY_CAMERA
input props:

add device 6: /dev/input/event0
name: "matrix_keypad.72"
events:
KEY (0001): KEY_1 KEY_2 KEY_3
KEY_4
KEY_5 KEY_6 KEY_7
KEY_8
KEY_9 KEY_0 KEY_ENTER
KEY_UP
KEY_LEFT KEY_RIGHT KEY_DOWN
KEY_MENU
KEY_BACK KEY_HOMEPAGE KEY_SEND
KEY_MESSENGER
KEY_NUMERIC_STAR KEY_NUMERIC_POUND
MSC (0004): MSC_SCAN
input props:

Minitouch is not supported on Android TV

I hava a Nvidia Android TV (sdk version: 24, build: darcy-userdebug 7.0 nrd90m 2427168_956.0090) and I find that minitouch can not run on it. The following is the log of minitouch:

Note: device /dev/input/js1 is not supported by libevdev
Note: device /dev/input/js0 is not supported by libevdev
Note: device /dev/input/mice is not supported by libevdev
Unable to find a suitable touch device

Could you please provide some help? Thanks!

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

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

Big Problem!

WHAT A GREAT JOB!
But I find a small problem .
when i use the adb command ,"input keyevent XXX",it too slow .
so i want have a function call "minikey" that can input keyevent faster !
poor english , sorry ......
thanks for your coding!

minitouch is not supported by lenovo P1

[2017-03-30 16:13:58.783] INF/device:plugins:touch 29264 [b827eb32b11e_1-1.5.4.2] Connecting to minitouch service
[2017-03-30 16:13:59.225] INF/device:plugins:touch 29264 [b827eb32b11e_1-1.5.4.2] minitouch says: "Note: device /dev/input/event1 was outscored by /dev/input/event0 (1100 >= 1000)"
[2017-03-30 16:13:59.226] INF/device:plugins:touch 29264 [b827eb32b11e_1-1.5.4.2] minitouch says: "Note: device /dev/input/mice is not supported by libevdev"
[2017-03-30 16:13:59.574] INF/device:plugins:touch 29264 [b827eb32b11e_1-1.5.4.2] minitouch says: "Type B touch device goodix_ts (1080x1920 with 16 contacts) detected on /dev/input/event0 (score 1100)"
[2017-03-30 16:13:59.575] INF/device:plugins:touch 29264 [b827eb32b11e_1-1.5.4.2] minitouch says: "Note: hard-limiting maximum number of contacts to 10"
[2017-03-30 16:14:00.320] INF/device:plugins:touch 29264 [b827eb32b11e_1-1.5.4.2] minitouch says: "Connection established"

This is maybe a mistake in README.md

$

Example output: $ 9876

This is the pid of the # minicap process. Useful if you want to kill the process.

Is minitouch output minicap process's pid ?

Shift to another location when I click

log:
Note: device /dev/input/mice is not supported by libevdev

Note: device /dev/input/event1 was outscored by /dev/input/event2 (2000 >= 2000)

Type A touch device goodix2-ts (4096x4096 with 256 contacts) detected on /dev/input/event2 (score 2000)
Note: hard-limiting maximum number of contacts to 10
May you help to give me some advices,thanks.

Include libevdev on Android

Hello,

I created a jni project in Android with some C code to move cursor on screen and for injecting keyboard events.

I want to include livevdev for this following function :
unsigned int event_type = EV_KEY; const char* name = "BTN_A"; int code = libevdev_event_code_from_name(event_type, name); if(code < 0) { puts("There was an error!"); }

I need to handle the code of a keyboard key.
Please I'm lost on your documentation. I don't understand how to include libevdev on my jni folder.

Can you help me ?
It would be very nice

Thank you !

Minitouch fails if ABS_MT_POSITION_X is no supported event code

I am currently working on a web emulator where I'm using a strange web emulator where the evdev responsible for screen interaction in /dev/input/ is not supporting the ABS_MT_POSITION_... eventcodes. Probably because this emulator does not support multitouch.

I was able to modify the minitouch code such that ABS_... event codes are used iff ABS_MT_POSITION_... is not supported. If it is ok with you I would like to clean up my code a bit and contribute by creating a pull request?
Do you have any requirements or suggestions how I should handle multiple possible /dev/input files that would then be accepted. What I was Thinking about:

  1. Accept a device in consider_device if one of the two methods is supported and giving ABS_MT_POSITION the preference
  2. Check through all devices and and only if no ABS_MT_POSITION device is found check a second time and accept devices with ABS_X support.
      • an arg in the main that can be set to also allow ABS_X devices

Android 10 support

Do you guys have plan to support Android 10? Since version 10 have been quite popular? Thank you!

Permission denied

Hi, Simo.
My NDK version is 15, and APP_PLATFORM has a default value of 14, which is compiled successfully. My android device system version is android 5.1.1, copy minitouch to /data/local/tmp directory; then execute the command "adb shell /data/local/tmp/minitouch", minitouch failed to start successfully, the following is the exception log.

WARNING: linker: /data/local/tmp/minitouch: unused DT entry: type 0x6ffffffe arg 0xa88
WARNING: linker: /data/local/tmp/minitouch: unused DT entry: type 0x6fffffff arg 0x2
open: Permission denied
Unable to open device /dev/input/event4 for inspectionopen: Permission denied
Unable to open device /dev/input/event3 for inspectionopen: Permission denied
Unable to open device /dev/input/event1 for inspectionopen: Permission denied
Unable to open device /dev/input/event0 for inspectionopen: Permission denied
Unable to open device /dev/input/mice for inspectionopen: Permission denied
Unable to open device /dev/input/event2 for inspectionUnable to find a suitable touch device

I hope you can provide some help. Thank you very much!

Bad experience when swiping phone

Hello, when I tried to simulate sliding the phone's screen by capturing the mouse's sliding event and sending coordinates to the minitouch, sometimes the screen would slide back to the first screen rather than the second.

I know this is due to the phone's handling of the swipe event.

But when I'm using it, the experience is very bad.

Do you have a similar problem? Can you give me some advice?

wrong position

Hi,Simo Kinnunen!I found when I use minitouch in some advices,if I press slot 0,then I press slot 1,when I up the slot 1,the slot 1 position will be drag to the left-bottom corner,but just appear at some devices,so if you have so solutions to solve it?thanks!^_^

screen display

samsung s8, the width and height may be wrong.

image

real width is 1440, height is 2960

how to translate "adb shell input swipe .." into "m <contact> <x> <y> <pressure>"?

I use adb shell get event -l -t to monitor the swipe action on my android device ,
well a typical drag action is like this:

[ 24969.637831] /dev/input/event4: EV_ABS ABS_MT_PRESSURE 0000002f
[ 24969.637831] /dev/input/event4: EV_ABS ABS_MT_POSITION_X 000001bc
[ 24969.637831] /dev/input/event4: EV_ABS ABS_MT_POSITION_Y 00000370
[ 24969.637831] /dev/input/event4: EV_ABS ABS_MT_TRACKING_ID 00000000
[ 24969.637831] /dev/input/event4: EV_SYN SYN_MT_REPORT 00000000
[ 24969.637831] /dev/input/event4: EV_KEY BTN_TOUCH DOWN
[ 24969.637831] /dev/input/event4: EV_SYN SYN_REPORT 00000000
[ 24969.649806] /dev/input/event4: EV_ABS ABS_MT_PRESSURE 0000002f
[ 24969.649806] /dev/input/event4: EV_ABS ABS_MT_POSITION_X 000001bc
[ 24969.649806] /dev/input/event4: EV_ABS ABS_MT_POSITION_Y 00000369
[ 24969.649806] /dev/input/event4: EV_ABS ABS_MT_TRACKING_ID 00000000

in a" m <contact> <x> <y> <pressure> "command , I use
ABS_MT_POSITION_X for the mintouch "<x>"
ABS_MT_POSITION_Y for the mintouch "<y>"
ABS_MT_PRESSURE for the mintouch "<pressure>"

and ,for the first ABS_MT_POSITION_X and ABS_MT_POSITION_Y i use a "d <contact> <x> <y>"command

I translate a drag action as follows:
msocket.send(bytes('d 0 489 1420 44\n'))
msocket.send(bytes('c\n'))
msocket.send(bytes('m 0 6 -1221 48\n'))
msocket.send(bytes('c\n'))
msocket.send(bytes('u 0\n'))
msocket.send(bytes('c\n'))
msocket.send(bytes('d 0 124 1388 48'))
msocket.send(bytes('c\n'))
msocket.send(bytes('u 0\n'))
msocket.send(bytes('c\n'))

Is that right?
or what else should I do for the purpose?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.