From 8ee1bdc32d5860e173f5f8e9819eedd3967fa0f5 Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Mon, 25 Mar 2024 09:05:17 +0100 Subject: [PATCH] Adds detection for System76 brand and improves detection for Apple and Meta devices (#7641) * Improves detection for Apple Watch * Adds detection for Meta Quest 2 and Quest Pro * Adds detection for System76 * Adds detection for Meta Portal Go --- Parser/Device/AbstractDeviceParser.php | 1 + Tests/fixtures/desktop.yml | 36 ++++++++++++++++++++++++++ Tests/fixtures/smart_display.yml | 18 +++++++++++++ Tests/fixtures/unknown.yml | 13 ++++++++++ Tests/fixtures/wearable.yml | 36 ++++++++++++++++++++++++++ regexes/device/mobiles.yml | 19 ++++++++++++-- 6 files changed, 121 insertions(+), 2 deletions(-) diff --git a/Parser/Device/AbstractDeviceParser.php b/Parser/Device/AbstractDeviceParser.php index ba1e5f2eb0..d542623179 100644 --- a/Parser/Device/AbstractDeviceParser.php +++ b/Parser/Device/AbstractDeviceParser.php @@ -1526,6 +1526,7 @@ abstract class AbstractDeviceParser extends AbstractParser 'SYC' => 'Syco', 'SM' => 'Symphony', '4S' => 'Syrox', + 'SYS' => 'System76', 'TM' => 'T-Mobile', 'T96' => 'T96', 'TAD' => 'TADAAM', diff --git a/Tests/fixtures/desktop.yml b/Tests/fixtures/desktop.yml index ca1c06930b..600b13f26b 100644 --- a/Tests/fixtures/desktop.yml +++ b/Tests/fixtures/desktop.yml @@ -9711,3 +9711,39 @@ model: Chromebook Flip C101PA os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Wayland; Linux x86_64; System76 Galago Pro (galp2)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.175 Safari/537.36 Ubuntu/22.04 (5.0.2497.48-1) Vivaldi/5.0.2497.48 + os: + name: Ubuntu + version: "22.04" + platform: x64 + client: + type: browser + name: Vivaldi + version: "5.0.2497.48" + engine: Blink + engine_version: "96.0.4664.175" + device: + type: desktop + brand: System76 + model: Galago Pro + os_family: GNU/Linux + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Wayland; Linux x86_64; System76) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.133 Safari/537.36 Ubuntu/22.04 (5.2.2623.34-1) Vivaldi/5.2.2623.39 + os: + name: Ubuntu + version: "22.04" + platform: x64 + client: + type: browser + name: Vivaldi + version: "5.2.2623.39" + engine: Blink + engine_version: "100.0.4896.133" + device: + type: desktop + brand: System76 + model: "" + os_family: GNU/Linux + browser_family: Chrome diff --git a/Tests/fixtures/smart_display.yml b/Tests/fixtures/smart_display.yml index 7c36aac83a..56b3ca4865 100644 --- a/Tests/fixtures/smart_display.yml +++ b/Tests/fixtures/smart_display.yml @@ -429,3 +429,21 @@ model: XD-SDD05-2101 os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 10; PortalGo) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.9999.0 Safari/537.36 + os: + name: Android + version: "10" + platform: "" + client: + type: browser + name: Chrome + version: "102.0.9999.0" + engine: Blink + engine_version: "102.0.9999.0" + device: + type: smart display + brand: Meta + model: Portal Go + os_family: Android + browser_family: Chrome diff --git a/Tests/fixtures/unknown.yml b/Tests/fixtures/unknown.yml index e9669f882e..522d29998a 100644 --- a/Tests/fixtures/unknown.yml +++ b/Tests/fixtures/unknown.yml @@ -3436,3 +3436,16 @@ model: "" os_family: Windows browser_family: Chrome +- + user_agent: ESPN Watch Extension/6396 CFNetwork/1333.0.4 Darwin/21.5.0 + os: + name: iOS + version: "15.5" + platform: "" + client: null + device: + type: "" + brand: Apple + model: "" + os_family: iOS + browser_family: Unknown diff --git a/Tests/fixtures/wearable.yml b/Tests/fixtures/wearable.yml index a79944b4a7..7585795268 100644 --- a/Tests/fixtures/wearable.yml +++ b/Tests/fixtures/wearable.yml @@ -2297,3 +2297,39 @@ model: "" os_family: Android browser_family: Firefox +- + user_agent: Mozilla/5.0 (X11; Linux x86_64; Quest 3) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/32.1.0.37.133.575621010 Chrome/122.0.6261.64 VR Safari/537.36 + os: + name: Android + version: "" + platform: x64 + client: + type: browser + name: Oculus Browser + version: "32.1.0.37.133.575621010" + engine: Blink + engine_version: "122.0.6261.64" + device: + type: wearable + brand: Meta + model: Quest 3 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (X11; Linux x86_64; Quest Pro) AppleWebKit/537.36 (KHTML, like Gecko) OculusBrowser/32.1.0.37.133.575621010 Chrome/122.0.6261.64 VR Safari/537.36 + os: + name: Android + version: "" + platform: x64 + client: + type: browser + name: Oculus Browser + version: "32.1.0.37.133.575621010" + engine: Blink + engine_version: "122.0.6261.64" + device: + type: wearable + brand: Meta + model: Quest Pro + os_family: Android + browser_family: Chrome diff --git a/regexes/device/mobiles.yml b/regexes/device/mobiles.yml index 49fed963a5..478d136184 100644 --- a/regexes/device/mobiles.yml +++ b/regexes/device/mobiles.yml @@ -985,7 +985,7 @@ Apple: - regex: 'Watch7,[24]' device: 'wearable' model: 'Watch Series 9 45mm' - - regex: 'Watch|for Apple Watch' + - regex: 'Apple Watch' device: 'wearable' model: 'Watch' @@ -6373,13 +6373,20 @@ Cube: # Meta (https://about.facebook.com/), former Oculus (https://www.oculus.com/) Meta: - regex: '(?:Pacific|(?