touchscreen working as touchpad in 5.1

306 views
Skip to first unread message

Rob

unread,
May 13, 2015, 3:27:04 PM5/13/15
to andro...@googlegroups.com
I'm trying out Android 5.1 (x86) as a live Iso on my Gigabyte M912M convertible netbook with a Penmount 6000 (resistive) touchscreen. In prior versions, up to the most recent 4.4 RC2, the touchscreen is correctly recognized, and with slight changes to the init.sh (adding the device name in one line) even able to calibrate with the calibration tool. Now in 5.1 it only works in touchpad mode. How can I make sure that the touchscreen does work correctly (and will be able to calibrate) in 5.1?

Some one else posted a similar question here: http://www.android-x86.net/index.php/topic,565.0.html

Greetings, Rob

gawen...@googlemail.com

unread,
Nov 14, 2016, 10:44:19 PM11/14/16
to Android-x86
Hi,

I have found the issue.

In Kitkat when there was a touch device with no available input device configuration file (.idc), a GenericTouch.idc would be loaded.
The code for this special check is in frameworks/base/services/input/EventHub.cpp in method void EventHub::loadConfigurationLocked(Device* device).

if ((device->classes & INPUT_DEVICE_CLASS_TOUCH) && device->configurationFile.isEmpty()) {
        device
->configurationFile = getInputDeviceConfigurationFilePathByName(String8("GenericTouch"),
                INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION
);
   
}

However in later Android versions neither GenericTouch.idc nor this check are present anymore resulting in an incorrect detection of Penmount 6000 touchscreens (and possible other resistive touchscreens).
In fact the number of idc files shrunk from 7 (kitkat) to 3 (Lollipop),. Marshmallow has 7 in total again, but not the GenericTouch.idc. The special check in EventHub.cpp is also not present in marshmallow.

Could anyone of the Android-x86 team comment on the missing GenericTouch.idc? As this code has not been around in official android sourcecode, it must have been a patch specifically for/from Android-x86.
As Android-x86 pursues the goal to be as compatible as possible with most devices a step "backwards" that would require (more) device specific .idc files to be present seems not to be intended?

@Rob: to get your touchscreen to work, read this documentation. You can see that in the example Google has a touch device named touch_dev with the matching touch_dev.idc file. You could try copying the GenericTouch.idc from Kitkat(I have attached it) and rename it to your device name (replace whitespaces with underscores). To test if it works, install Android x86 with system partition read write, copy your idc file to /system/usr/idc/ and reboot.

Kind regards,
Robin
GenericTouch.idc

Chih-Wei Huang

unread,
Nov 14, 2016, 10:55:24 PM11/14/16
to Android-x86
2016-11-14 23:24 GMT+08:00 gawendauni via Android-x86
<andro...@googlegroups.com>:
> Hi,
>
> I have found the issue.
>
> In Kitkat when there was a touch device with no available input device
> configuration file (.idc), a GenericTouch.idc would be loaded.
> The code for this special check is in
> frameworks/base/services/input/EventHub.cpp in method void
> EventHub::loadConfigurationLocked(Device* device).
>
> if ((device->classes & INPUT_DEVICE_CLASS_TOUCH) &&
> device->configurationFile.isEmpty()) {
> device->configurationFile =
> getInputDeviceConfigurationFilePathByName(String8("GenericTouch"),
> INPUT_DEVICE_CONFIGURATION_FILE_TYPE_CONFIGURATION);
> }
>
> However in later Android versions neither GenericTouch.idc nor this check
> are present anymore resulting in an incorrect detection of Penmount 6000
> touchscreens (and possible other resistive touchscreens).
> In fact the number of idc files shrunk from 7 (kitkat) to 3 (Lollipop),.
> Marshmallow has 7 in total again, but not the GenericTouch.idc. The special
> check in EventHub.cpp is also not present in marshmallow.


> Could anyone of the Android-x86 team comment on the missing
> GenericTouch.idc? As this code has not been around in official android
> sourcecode, it must have been a patch specifically for/from Android-x86.
> As Android-x86 pursues the goal to be as compatible as possible with most
> devices a step "backwards" that would require (more) device specific .idc
> files to be present seems not to be intended?

Good finding. I almost forgot that.

There are some discussion about the usage of GenericTouch.idc
before, say

https://groups.google.com/d/msg/android-x86/IHLdjQgsjNw/TXokXUEme3kJ

Simply speaking, we decided not to use GenericTouch.idc anymore
since it's unnecessary and may cause other side effects.

In your case, please provide an idc file for your touchscreen.

gawen...@googlemail.com

unread,
Nov 15, 2016, 10:39:23 AM11/15/16
to Android-x86
Here it is. As said, it is just a renamed copy of GenericTouch.idc. Are there any other parameters that should be added/changed for single touch resistive screens?
The official documentation for idc files on source.android.com is not very detailed and lacks meaningful examples. Where can I read up the possible property names and their respective values?

Additionally to the idc file 14e1:6000 is the usb id pair that needs to be added in function init_tscal() of init.sh.
DIALOGUE_INC_PenMount_USB.idc
Reply all
Reply to author
Forward
0 new messages