openstf / minitouch Goto Github PK
View Code? Open in Web Editor NEWMinimal multitouch event producer for Android.
License: Other
Minimal multitouch event producer for Android.
License: Other
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?
please guide me how to use minicap and minitouch together.
As you said in #18
"Screen resolution and touch resolution are often not the same."
Do you know how to get device touch resolution?
First of all, thank you for creating these features.
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.
the device is 1280480,but the output of banner.maxX and banner.maxY in touch/index.js is 480800.
what should I do to map display coordinates to touch coordinates.
what should I modify in code of stf project.
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
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
Hello
If no use "adb forward",how to use the lib?how to create the socket connection? For java or other Programing language
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.
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.
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
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.
Could you provide an example of a web page? Thanks
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
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)
fatal: unable to connect to anongit.freedesktop.org:
anongit.freedesktop.org[0: 131.252.210.161]: errno=Operation timed out
Thanks in Advance.
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)"
I gived the right positon, but minitouch didn't do it correctly
The device has not been rooted, so how minitouch write to it?
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"
But when I touch the real device with my hand, minitouch print an error, and connection will be broken:
Hope you can offer some help. Thank you so much :-)
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?
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
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.
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
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
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.
d 0 150 150 50\nc\nu 0\nc\n
An unfriendly process.
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.
$ 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.
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'
Any idea where could be the problem or how can I fix it?
Many thanks
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:
Problem:
I tried to follow the steps in Instructions but were not able to figure out where to put commands.
after "nc localhost 1111" cmd no output Appears.
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!
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
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!
[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"
$
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 ?
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.
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 !
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:
Do you guys have plan to support Android 10? Since version 10 have been quite popular? Thank you!
Hi, buddy.
Meizu Pro7 Plus doesn't respond to the minitouch input, just like #16
Hello, what should I do if I want to use getRuntime().exec("cmd")
in my app?How do I write this CMD
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!
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?
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!^_^
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.