From a85068e0001359951330135d9aeaa28527673b82 Mon Sep 17 00:00:00 2001 From: kuuuube Date: Tue, 3 Mar 2026 16:52:49 -0500 Subject: [PATCH] Add support for matching inf_provider and add broad match for any tablet with wibusb or libwdi on device --- config/device_identifiers.json | 5 +++++ src/cleanup_modules/device_cleanup.rs | 3 +++ 2 files changed, 8 insertions(+) diff --git a/config/device_identifiers.json b/config/device_identifiers.json index d178f96..115ddec 100644 --- a/config/device_identifiers.json +++ b/config/device_identifiers.json @@ -22,5 +22,10 @@ "manufacturer": "GSPY", "hardware_id": "VID_(5543|28BD|256C|0A12|172F|0458|08CA|0483|0B57|2FEB|0543|056A|0531|2D80)", "class_uuid": "6264e7e6-b95c-4033-908f-86e7ab9e2555" + }, + { + "friendly_name": "LibUsb/Libwdi", + "hardware_id": "VID_(5543|28BD|256C|0A12|172F|0458|08CA|0483|0B57|2FEB|0543|056A|0531|2D80)", + "inf_provider": "(libusb|libwdi)" } ] \ No newline at end of file diff --git a/src/cleanup_modules/device_cleanup.rs b/src/cleanup_modules/device_cleanup.rs index 64110bb..62d3672 100644 --- a/src/cleanup_modules/device_cleanup.rs +++ b/src/cleanup_modules/device_cleanup.rs @@ -188,12 +188,14 @@ pub struct DeviceToUninstall { manufacturer: Option, hardware_id: Option, class_uuid: Option, + inf_provider: Option, } impl ToUninstall for DeviceToUninstall { fn matches(&self, other: &Device) -> bool { regex_cache::cached_match(other.description(), self.device_desc.as_deref()) && regex_cache::cached_match(other.manufacturer(), self.manufacturer.as_deref()) + && regex_cache::cached_match(other.inf_provider(), self.inf_provider.as_deref()) && match self.class_uuid { Some(uuid) => *other.class_guid() == uuid, None => true, @@ -240,5 +242,6 @@ async fn test_init() { regex_cache::cached_match(Some(""), d.device_desc.as_deref()); regex_cache::cached_match(Some(""), d.manufacturer.as_deref()); regex_cache::cached_match(Some(""), d.hardware_id.as_deref()); + regex_cache::cached_match(Some(""), d.inf_provider.as_deref()); }); }