[DEV]Porting Touchscreen driver for Android 4.0 (ICS) ROMS
This thread is general discussion for DEVs only about Touchscreen driver porting for Android 4.0 (ICS) ROMS..
I'm worry about the new methode of input processing on Android 3.x and 4.x.
So while waiting the AOSP source code of Android 4.0 (ICS) is released by Google, is better for we to start porting the Touchscreen driver to be compatible with Android 4.0 Build.
As we know, many developer have start to porting the ICS SDK to various devices,
but not all touchscreen devices will work.
lucky to have native touchscreen input working, also with multitouch capability..
And sometimes just have pointer input working, so we should to use 2 fingers for input operation.
But my device is end up with not working touchscreen or pointer input..
So, better for we discussing about porting the Touchscreen driver and configuration to make our Touchscreen device is recognized by Android 4.0 System.
For now, we don't have the libinput.so source code, so we focussing on kernel side and on *.idc files that placed on /system/usr/idc/
Actually I've success on modify my device touchscreen driver to work on ICS SDK ROMs, soon I will post all log and modification files.
Here is some P.O.C video:
My CSL Mi-410 (FIH-FB0) same like Huawei X6, Wellcom A99, Cherrymobile Magnum HD, is using BU21018MWV Touchscreen device from ROHM.
But I think it can be implementing on all Touchscreen devices driver.
And maybe other developers have other solution about how to make touchscreen device's recognized by ICS System, so we will discussing on this thread.
I will Separate the info based on touchscreen device vendor, like synaptic, atmel, cypress, etc.
G+: tjstyle Github: tjstyle Twitter: tj_style Like my work? Please award it with some donation..
I fun with ICS SDK system Image and ramdisk, trying to booting up the ICS system on my CSL Mi-410.
But.. end up with not working touchscreen, see the logcat:
Code:
23:54:06.962 Info SystemServer 134 Input Method Service
23:54:06.962 Info EventHub 134 New device: id=8, fd=107, path='/dev/input/event2', name='bu21018mwvkey', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
23:54:06.962 Debug EventHub 134 No input device configuration file found for device 'bu21018mwv'.
23:54:06.962 Warning InputManagerService 134 Couldn't create dir.: /data/system/inputmethod
23:54:06.962 Info EventHub 134 New device: id=9, fd=114, path='/dev/input/event1', name='bu21018mwv', classes=0x15, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
23:54:06.962 Debug EventHub 134 No input device configuration file found for device 'fbx_kybd'.
23:54:06.962 Info EventHub 134 New device: id=10, fd=116, path='/dev/input/event0', name='fbx_kybd', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
23:54:06.962 Info InputReader 134 Device added: id=10, name='fbx_kybd', sources=0x00000101
23:54:06.962 Info InputReader 134 Touch device 'bu21018mwv' could not query the properties of its associated display 0. The device will be inoperable until the display size becomes available.
23:54:06.962 Info InputReader 134 Device added: id=9, name='bu21018mwv', sources=0x00002103
23:54:06.962 Info InputReader 134 Device added: id=8, name='bu21018mwvkey', sources=0x00000101
23:54:06.962 Info InputReader 134 Device added: id=3, name='7k_handset', sources=0x80000101
23:54:06.962 Info SystemServer 134 Accessibility Manager
23:54:06.962 Info InputReader 134 Reconfiguring input devices. changes=0x00000004
23:54:06.962 Info InputReader 134 Device reconfigured: id=9, name='bu21018mwv', surface size is now 480x800, mode is 3
So I try to place bu21018mwv.idc at /system/usr/idc/.
Reboot the phone and when come back to Lockscreen and see the logcat:
Code:
23:57:03.720 Info EventHub 134 New device: id=8, fd=110, path='/dev/input/event2', name='bu21018mwvkey', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
23:57:03.720 Info SystemServer 134 Input Method Service
23:57:03.720 Info EventHub 134 New device: id=9, fd=114, path='/dev/input/event1', name='bu21018mwv', classes=0x15, configuration='/system/usr/idc/bu21018mwv.idc', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
23:57:03.720 Debug EventHub 134 No input device configuration file found for device 'fbx_kybd'.
23:57:03.720 Warning InputManagerService 134 Couldn't create dir.: /data/system/inputmethod
23:57:03.720 Info EventHub 134 New device: id=10, fd=115, path='/dev/input/event0', name='fbx_kybd', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
23:57:03.720 Info InputReader 134 Device added: id=10, name='fbx_kybd', sources=0x00000101
23:57:03.720 Info InputReader 134 Touch device 'bu21018mwv' could not query the properties of its associated display 0. The device will be inoperable until the display size becomes available.
23:57:03.720 Info InputReader 134 Device added: id=9, name='bu21018mwv', sources=0x00001103
23:57:03.720 Info InputReader 134 Device added: id=8, name='bu21018mwvkey', sources=0x00000101
23:57:03.720 Info InputReader 134 Device added: id=3, name='7k_handset', sources=0x80000101
23:57:03.720 Info InputReader 134 Reconfiguring input devices. changes=0x00000004
23:57:03.720 Info InputReader 134 Device reconfigured: id=9, name='bu21018mwv', surface size is now 480x800, mode is 1
Good.. The Input manager is using bu21018mwv.idc..
I try to touch the screen with one finger, there is no logcat message, but when I touch the screen with two fingers lot of message are bouching on logcat:
Compile the kernel, flash the new boot.img to my phone and remove the bu21018mwv.idc.
When i reboot the phone and come back to Lockscreen, try to touch and move with one, also with two finger, there is no bounching message again on logcat:
Code:
00:01:39.612 Info EventHub 134 New device: id=3, fd=103, path='/dev/input/event9', name='7k_handset', classes=0x81, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
00:01:39.612 Debug EventHub 134 No input device configuration file found for device 'proximity'.
00:01:39.612 Debug EventHub 134 No input device configuration file found for device 'light'.
00:01:39.612 Debug EventHub 134 No input device configuration file found for device 'orientation'.
00:01:39.612 Debug EventHub 134 No input device configuration file found for device 'accelerometer'.
00:01:39.612 Debug EventHub 134 No input device configuration file found for device 'bu21018mwvkey'.
00:01:39.612 Debug BluetoothAdapterStateMachine 134 PowerOff process message: 5
00:01:39.612 Info EventHub 134 New device: id=8, fd=110, path='/dev/input/event2', name='bu21018mwvkey', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
00:01:39.612 Debug EventHub 134 No input device configuration file found for device 'bu21018mwv-ics'.
00:01:39.612 Info SystemServer 134 Input Method Service
00:01:39.612 Info EventHub 134 New device: id=9, fd=111, path='/dev/input/event1', name='bu21018mwv-ics', classes=0x15, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
00:01:39.612 Debug EventHub 134 No input device configuration file found for device 'fbx_kybd'.
00:01:39.612 Warning InputManagerService 134 Couldn't create dir.: /data/system/inputmethod
00:01:39.612 Info EventHub 134 New device: id=10, fd=115, path='/dev/input/event0', name='fbx_kybd', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
00:01:39.612 Info InputReader 134 Device added: id=10, name='fbx_kybd', sources=0x00000101
00:01:39.612 Info InputReader 134 Touch device 'bu21018mwv-ics' could not query the properties of its associated display 0. The device will be inoperable until the display size becomes available.
00:01:39.612 Info InputReader 134 Device added: id=9, name='bu21018mwv-ics', sources=0x00002103
00:01:39.612 Info InputReader 134 Device added: id=8, name='bu21018mwvkey', sources=0x00000101
00:01:39.612 Info InputReader 134 Device added: id=3, name='7k_handset', sources=0x80000101
00:01:39.721 Info InputReader 134 Reconfiguring input devices. changes=0x00000004
00:01:39.721 Info SystemServer 134 Accessibility Manager
00:01:39.721 Info InputReader 134 Device reconfigured: id=9, name='bu21018mwv-ics', surface size is now 480x800, mode is 3
But the Touchscreen are now recognized as pointer, not as native touchscreen..
And the last, i've place the bu21018mwv-ics.idc (just to make different name with original driver) to /system/usr/idc/
Reboot the phone, back to lockscreen, try to touch the screen, and here is the logcat:
Code:
00:08:01.750 Info EventHub 134 New device: id=3, fd=103, path='/dev/input/event9', name='7k_handset', classes=0x81, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
00:08:01.750 Debug EventHub 134 No input device configuration file found for device 'proximity'.
00:08:01.750 Debug EventHub 134 No input device configuration file found for device 'light'.
00:08:01.750 Debug EventHub 134 No input device configuration file found for device 'orientation'.
00:08:01.750 Debug EventHub 134 No input device configuration file found for device 'accelerometer'.
00:08:01.750 Debug EventHub 134 No input device configuration file found for device 'bu21018mwvkey'.
00:08:01.750 Debug BluetoothAdapterStateMachine 134 PowerOff process message: 5
00:08:01.750 Info EventHub 134 New device: id=8, fd=110, path='/dev/input/event2', name='bu21018mwvkey', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
00:08:01.750 Info SystemServer 134 Input Method Service
00:08:01.750 Info EventHub 134 New device: id=9, fd=114, path='/dev/input/event1', name='bu21018mwv-ics', classes=0x15, configuration='/system/usr/idc/bu21018mwv-ics.idc', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
00:08:01.750 Warning InputManagerService 134 Couldn't create dir.: /data/system/inputmethod
00:08:01.750 Debug EventHub 134 No input device configuration file found for device 'fbx_kybd'.
00:08:01.750 Info EventHub 134 New device: id=10, fd=116, path='/dev/input/event0', name='fbx_kybd', classes=0x1, configuration='', keyLayout='/system/usr/keylayout/Generic.kl', keyCharacterMap='/system/usr/keychars/Generic.kcm', builtinKeyboard=false
00:08:01.750 Info InputReader 134 Device added: id=10, name='fbx_kybd', sources=0x00000101
00:08:01.750 Info InputReader 134 Touch device 'bu21018mwv-ics' could not query the properties of its associated display 0. The device will be inoperable until the display size becomes available.
00:08:01.750 Info InputReader 134 Device added: id=9, name='bu21018mwv-ics', sources=0x00001103
00:08:01.750 Info InputReader 134 Device added: id=8, name='bu21018mwvkey', sources=0x00000101
00:08:01.750 Info InputReader 134 Device added: id=3, name='7k_handset', sources=0x80000101
00:08:01.750 Info InputReader 134 Reconfiguring input devices. changes=0x00000004
00:08:01.750 Info InputReader 134 Device reconfigured: id=9, name='bu21018mwv-ics', surface size is now 480x800, mode is 1
And GREAAAT... My touchscreen is work as native touchscreen..
I think this methode will can be implemented on all touchscreen driver, and maybe we not must to do that if we can modify the libinput source code.
or maybe other developers have another methode? please share in this thread..
G+: tjstyle Github: tjstyle Twitter: tj_style Like my work? Please award it with some donation..
Cool thank you. I actually got the touchscreen driver I was porting from the Nexus S running and can now use the touchscreen in ICS, but I'm havubh trouble getting the softkeys to work.
Those of us who use Linux on a day to day basis don’t think twice about sinking … more
XDA Developers was founded by developers, for developers. It is now a valuable resource for people who want to make the most of their mobile devices, from customizing the look and feel to adding new functionality. Are you a developer?