aboutsummaryrefslogtreecommitdiff
path: root/rmidevice
AgeCommit message (Collapse)Author
2021-06-17Upgrade rmi4utils to v1.3.5.Elliott Hughes
Test: treehugger Change-Id: Idc8e95b7710f049ffd55e1a52e3f975c88fbd331
2021-04-15Merge pull request #14 from enh-google/masterAndrew Duggan
Fix rmi4utils Android build.
2021-02-12[LSC] Add LOCAL_LICENSE_KINDS to external/rmi4utilsandroid-s-preview-1Bob Badour
Added SPDX-license-identifier-Apache-2.0 to: Android.bp f54test/Android.bp rmi4update/Android.bp rmidevice/Android.bp rmihidtool/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Exempt-From-Owner-Approval: janitorial work Change-Id: Ibcb25a1902d4bb9150aeb05bc5e801f370a3ae5c
2020-11-20Change path name for i2c_hid to i2c_hid_acpi according to patch on 2020/11, ↵David Chiu
and also need backward compatible.
2020-10-30Add a condition in HID descriptor for PTP, and let workaround of erasing ↵david.chiu@tw.synaptics.com
before parsing necessary information be run for touch screen only.
2020-03-30Fix the Android build.Elliott Hughes
Android's libc doesn't have the GNU versionsort extension.
2019-07-29Remove debug print statementsAndrew Duggan
2019-07-29Support reflashing on bootloader version 8.knockout
2018-11-16Convert rmi4utils to Android.bpandroid-wear-8.0.0_r2android-n-iot-release-ihome-igv1nougat-iot-releaseDan Willemsen
See build/soong/README.md for more information. Test: cd external/rmi4utils; mma Change-Id: I774bef8e463aafa523b0ac4698d07e8aba74cc37
2018-09-06Workaround to check event maximum valueVincent Huang
2018-08-29Increase timeout to wait for device to appearAndrew Duggan
2018-08-29Revert "Add delay between bind and unbind to avoid race when binding the driver"Andrew Duggan
This reverts commit 580f8ec5c0280afb812e0eaa4643388a128b0eb7.
2018-07-31Add delay between bind and unbind to avoid race when binding the driverAndrew Duggan
2018-07-30Cache the transport device and use that when rebinding the driver and read ↵Andrew Duggan
all pending inotifyt events
2018-07-10Use fixed width interger types to avoid sign extending bus, vendor, or ↵Andrew Duggan
product ids
2017-10-12Use -Werror in external/rmi4utilsChih-Hung Hsieh
* Suppress existing warnings. Bug: 66996870 Test: build with WITH_TIDY=1 Change-Id: I2ad78f07782ca824db01e23e1309bcde34420e8e
2017-03-30Fix warning about uninitialized variableAndrew Duggan
2017-03-30For HID devices restore the original operating mode on closeAndrew Duggan
2017-03-30Consolidate utility functions into the rmidevice libraryAndrew Duggan
2016-06-13Don't automatically switch back to mouse modeAndrew Duggan
2016-05-17Make sure members get cleared if HIDDevice::Open() failsAndrew Duggan
2016-05-17Make sure the RMIDevice's members are cleared on closeAndrew Duggan
2016-05-17Make sure device is closed if it doesn't match search criteriaAndrew Duggan
2016-05-17Filter device discovery based on device typeAndrew Duggan
2016-05-16Consolidate device discovery into the rmidevice libraryAndrew Duggan
2016-05-16Remove redundant enum in hiddevice.hAndrew Duggan
2016-03-31rmidevice: Make sure config id doesn't get sign extended on 64 bit buildsAndrew Duggan
2016-02-23rmidevice / rmihidtool: Add feature to print config idAndrew Duggan
Based on changes from Leon Tu.
2015-10-16Use inotify to avoid races when rebinding the driverAndrew Duggan
2015-10-16UPSTREAM: rmi4update: Make sure the device file exists when rebinding the driverandroid-wear-o-preview-4android-wear-o-preview-3android-wear-n-preview-3android-wear-n-preview-2android-wear-n-preview-1android-wear-7.1.1_r1android-o-preview-4android-o-preview-3android-o-preview-2android-o-preview-1android-o-iot-preview-5android-n-preview-5android-n-preview-4android-n-preview-3android-n-preview-2android-n-preview-1android-n-mr2-preview-2android-n-mr2-preview-1android-n-mr1-preview-2android-n-mr1-preview-1android-n-iot-preview-4android-n-iot-preview-2android-cts_7.1_r1android-cts-7.1_r9android-cts-7.1_r8android-cts-7.1_r7android-cts-7.1_r6android-cts-7.1_r5android-cts-7.1_r4android-cts-7.1_r3android-cts-7.1_r29android-cts-7.1_r28android-cts-7.1_r27android-cts-7.1_r26android-cts-7.1_r25android-cts-7.1_r24android-cts-7.1_r23android-cts-7.1_r22android-cts-7.1_r21android-cts-7.1_r20android-cts-7.1_r2android-cts-7.1_r19android-cts-7.1_r18android-cts-7.1_r17android-cts-7.1_r16android-cts-7.1_r15android-cts-7.1_r14android-cts-7.1_r13android-cts-7.1_r12android-cts-7.1_r11android-cts-7.1_r10android-cts-7.1_r1android-cts-7.0_r9android-cts-7.0_r8android-cts-7.0_r7android-cts-7.0_r6android-cts-7.0_r5android-cts-7.0_r4android-cts-7.0_r33android-cts-7.0_r32android-cts-7.0_r31android-cts-7.0_r30android-cts-7.0_r3android-cts-7.0_r29android-cts-7.0_r28android-cts-7.0_r27android-cts-7.0_r26android-cts-7.0_r25android-cts-7.0_r24android-cts-7.0_r23android-cts-7.0_r22android-cts-7.0_r21android-cts-7.0_r20android-cts-7.0_r2android-cts-7.0_r19android-cts-7.0_r18android-cts-7.0_r17android-cts-7.0_r16android-cts-7.0_r15android-cts-7.0_r14android-cts-7.0_r13android-cts-7.0_r12android-cts-7.0_r11android-cts-7.0_r10android-cts-7.0_r1android-7.1.2_r9android-7.1.2_r8android-7.1.2_r6android-7.1.2_r5android-7.1.2_r4android-7.1.2_r39android-7.1.2_r38android-7.1.2_r37android-7.1.2_r36android-7.1.2_r33android-7.1.2_r32android-7.1.2_r30android-7.1.2_r3android-7.1.2_r29android-7.1.2_r28android-7.1.2_r27android-7.1.2_r25android-7.1.2_r24android-7.1.2_r23android-7.1.2_r2android-7.1.2_r19android-7.1.2_r18android-7.1.2_r17android-7.1.2_r16android-7.1.2_r15android-7.1.2_r14android-7.1.2_r13android-7.1.2_r12android-7.1.2_r11android-7.1.2_r10android-7.1.2_r1android-7.1.1_r9android-7.1.1_r8android-7.1.1_r7android-7.1.1_r61android-7.1.1_r60android-7.1.1_r6android-7.1.1_r59android-7.1.1_r58android-7.1.1_r57android-7.1.1_r56android-7.1.1_r55android-7.1.1_r54android-7.1.1_r53android-7.1.1_r52android-7.1.1_r51android-7.1.1_r50android-7.1.1_r49android-7.1.1_r48android-7.1.1_r47android-7.1.1_r46android-7.1.1_r45android-7.1.1_r44android-7.1.1_r43android-7.1.1_r42android-7.1.1_r41android-7.1.1_r40android-7.1.1_r4android-7.1.1_r39android-7.1.1_r38android-7.1.1_r35android-7.1.1_r33android-7.1.1_r32android-7.1.1_r31android-7.1.1_r3android-7.1.1_r28android-7.1.1_r27android-7.1.1_r26android-7.1.1_r25android-7.1.1_r24android-7.1.1_r23android-7.1.1_r22android-7.1.1_r21android-7.1.1_r20android-7.1.1_r2android-7.1.1_r17android-7.1.1_r16android-7.1.1_r15android-7.1.1_r14android-7.1.1_r13android-7.1.1_r12android-7.1.1_r11android-7.1.1_r10android-7.1.1_r1android-7.1.0_r7android-7.1.0_r6android-7.1.0_r5android-7.1.0_r4android-7.1.0_r3android-7.1.0_r2android-7.1.0_r1android-7.0.0_r9android-7.0.0_r8android-7.0.0_r7android-7.0.0_r6android-7.0.0_r5android-7.0.0_r4android-7.0.0_r36android-7.0.0_r35android-7.0.0_r34android-7.0.0_r33android-7.0.0_r32android-7.0.0_r31android-7.0.0_r30android-7.0.0_r3android-7.0.0_r29android-7.0.0_r28android-7.0.0_r27android-7.0.0_r24android-7.0.0_r21android-7.0.0_r19android-7.0.0_r17android-7.0.0_r15android-7.0.0_r14android-7.0.0_r13android-7.0.0_r12android-7.0.0_r11android-7.0.0_r10android-7.0.0_r1o-previewo-iot-preview-5nougat-releasenougat-mr2.3-releasenougat-mr2.2-releasenougat-mr2.1-releasenougat-mr2-security-releasenougat-mr2-releasenougat-mr2-pixel-releasenougat-mr2-devnougat-mr1.8-releasenougat-mr1.7-releasenougat-mr1.6-releasenougat-mr1.5-releasenougat-mr1.4-releasenougat-mr1.3-releasenougat-mr1.2-releasenougat-mr1.1-releasenougat-mr1-wear-releasenougat-mr1-volantis-releasenougat-mr1-security-releasenougat-mr1-releasenougat-mr1-flounder-releasenougat-mr1-devnougat-mr1-cts-releasenougat-mr0.5-releasenougat-dr1-releasenougat-devnougat-cts-releasenougat-bugfix-releasen-iot-preview-4n-iot-preview-2Andrew Duggan
The /dev/hidrawX device may not exist immediately after writing to the bind file. This change checks to see if it exists before attempting to reopen the device. (cherry picked from commit 8336b9c19bbf2adad93a4e193cd9258cf3fc7d0d) Signed-off-by: Benson Leung <bleung@google.com> Bug: 24809436 Change-Id: I02a662a2fc38e93df32190c03f35a1db3640f451
2015-10-16rmi4update: Make sure the device file exists when rebinding the driverAndrew Duggan
The /dev/hidrawX device may not exist immediately after writing to the bind file. This change checks to see if it exists before attempting to reopen the device.
2015-09-10HIDDevice::Write: return number of bytes of data writtenAndrew Duggan
Write was returning the size of an output report since that is what the the lower level write is returning. On success HIDDevice::Write should return the number of bytes actual data which is what the caller cares about.
2015-09-10HIDDevice::GetAttentionReport: Fix copying of attention dataAndrew Duggan
2015-09-10HIDDevice::Read: Check that the bytes reported by the report match what we ↵Andrew Duggan
expect Make sure that the bytes in the report do no exceed the bytes which were requested or that the bytes exceed the bytes remaining in the buffer.
2015-09-10rmidevice: Check return value of Read(), Write()Andrew de los Reyes
Addresses security concern: All users of Read and Write fail to check for return value being equal to desired write size (only look for <0, not a size >= 0 but less than expected). This can lead to all kinds of corruption or overflows.
2015-09-10HIDDevice: WriteDeviceNameToFile: check lengths, close return valueAndrew de los Reyes
Addresses security concern: WriteDeviceNameToFile does not check buffer lengths, and uses a fixed size of 19, though this is likely safe due to how the kernel builds the /sys tree entries. Also fails to check return code of "close".
2015-09-10HIDDevice::GetReport: Fix count for split readsAndrew de los Reyes
Haven't tested split reads. Addresses security concern: HIDDevice::GetReport does not correctly handle split reads (count is used at the end as if it were the total size of bytes read, which it isn't), which could lead to communication corruption and data content confusion (m_attnData and m_readData could have partially updated contents). It's unlikely the hidraw interface could be tricked into doing split reads, but I haven't tested it.
2015-09-10HIDDevice::Read: Fix possible out of bounds accessAndrew de los Reyes
Addresses security concern: HIDDevice::Read contains potential past-end-of-buffer write (and read) when presented with a malicious/corrupt device report (m_readData[HID_RMI4_READ_INPUT_COUNT] is not compared against the remaining buf size. It asks nicely for no more than what would fit, but the value in m_readData is HID device controlled, but isn't checked against the actual size of the incoming buffer)
2015-09-10HIDDevice::ParseReportSizes: check for valid descriptorsAndrew de los Reyes
Addresses security concern: HIDDevice::ParseReportSizes contains potential past-end-of-buffer reads when presented with a malicious/corrupt device descriptor (++i and i + 1, i + 2 array indexes don't validate they're less than m_rptDesc.size).
2015-09-10validate m_*Report lengthsAndrew de los Reyes
Addresses Security concerns: HIDDevice::Open does not validate minimum sizes for m_*ReportSize, which could lead to past-end-of-buffer writes when using m_*Report arrays. HIDDevice::GetAttentionReport does not correctly validate the size of the m_attnData buffer vs the buf len. This is a past-end-of-buffer read condition. I don't understand the point of reading bytes-many bytes but returning *len set to the valid size of bytes in the buffer.
2015-09-10RMIDevice: Make dtor vitualAndrew de los Reyes
To avoid compilation warning
2015-05-07Fix build warning on ARM and some cleanup.Andrew Duggan
2015-05-06Print protocol specific information about a deviceAndrew Duggan
2015-05-06Allow rebinding of the transport device to force a reload of the HID descriptorsAndrew Duggan
In some cases during firmware update the size of the input reports can change this commit allows for the unbinding and rebinding of the transport HID device to force a reload of the HID descriptors so that the new size if read by the HID transport drivers.
2014-11-10Print the interrupt mask part of the function infoAndrew Duggan
2014-11-10Change GetReport to only read one report at a time and remove HIDDevice's ↵Andrew Duggan
attention report queue Simplify GetReport and only have it read a single report and let the functions which call it decide if they have gotten the data which they are looking for. Also, remove in the HIDDevice attention report queue since reports are queued in the kernel so queueing in userspace is unnecessary.
2014-09-29Have interrupt register number and mask in RMIFunctionSatoshi Noguchi
2014-09-29Have register base addresses in 16 bit in RMIFunctionSatoshi Noguchi
2014-09-29Continue scanning the PDT even if we found a blank page when ScanPDT's ↵Satoshi Noguchi
optional endPage parameter is set
2014-09-16Set the page before querying propertiesAndrew Duggan