タッチスクリーンの調査
なかなかうまく動いてくれないAndroid Zaurusのタッチスクリーン。straceで調査。本館に書くほどでもないので、こちらにメモ。
$ fuser /dev/input/touchscreen0 1235 2190 $ ps ax 1235 ? S 0:00 /usr/bin/tskeys 2190 tty1 Sl 0:11 system_server 4587 tty1 Sl 0:01 com.google.android.development $ strace -p 1235 Process 1235 attached - interrupt to quit read(3, "h\236\246G\320\300\2\0\3\0\0\0|\v\0\0", 16) = 16 read(3, "h\236\246G\34\301\2\0\3\0\1\0\300\v\0\0", 16) = 16 $ strace -p 2190 Process 2190 attached - interrupt to quit ioctl(9, 0xc0186201, 0xbef1f7a8) = 0 futex(0x1537b4, FUTEX_WAKE, 2147483647) = 1 getpriority(PRIO_PROCESS, 0) = 20 ioctl(9, 0xc0186201, 0xbef1f658) = 0 $ strace -p 4587 Process 4587 attached - interrupt to quit futex(0x16f694, FUTEX_WAIT, -16, NULL) = 0 timer_delete(0x1) = 0 timer_delete(0x1) = 0 getpid() = 4587 getuid32() = 1000 getpriority(PRIO_PROCESS, 0) = 20 ioctl(9, 0xc0186201, 0xbef1f710) = 0 ioctl(9, 0xc0186201, 0xbef1f710) = 0 timer_delete(0x1) = 0 gettimeofday({1202101732, 599316}, NULL) = 0
android.developmentはPointer Locationで、この時はタッチに反応している。ただし90度回転しているけど。
で、いったんHomeに戻って、再度Pointer Locationを起動。
$ strace -p 1235 Process 1235 attached - interrupt to quit read(3, "\373\236\246G\364b\5\0\3\0\0\0Z\n\0\0", 16) = 16 read(3, "\373\236\246G@c\5\0\3\0\1\0\264\v\0\0", 16) = 16 $ strace -p 2190 Process 2190 attached - interrupt to quit ioctl(9, 0xc0186201$ strace -p 4587 Process 4587 attached - interrupt to quit futex(0x16f694, FUTEX_WAIT, -31, NULL
オフスクリーンキー(LCDの外にあるホームやメールのアイコンのやつ)を拾うプロセス1235は元気良くタッチを拾っているが、android.developmentもsystem_serverも待ちのままWake Upが来ない。これが、動いたり動かなかったりの理由。futexがおかしいらしい。
read()ではなくioctl()で拾っているように見える。file descriptorの9を開いている瞬間をstraceで拾いたかったのだが、まだ出来てない。initが子プロセスとして起動してるので。