From 3f25089cb70d06ba598e47690a172c538b2b61a2 Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Thu, 7 Nov 2024 12:39:38 +0100 Subject: [PATCH] Improves detection for Lectrus, Maxcom and Sunmax devices (#7906) * Improves detection for Sunmax devices * Improves detection for Maxcom devices * Improves detection for Lectrus devices * Fix engine version --- Tests/fixtures/clienthints.yml | 175 +++++++++++++++++++++++++++++++ Tests/fixtures/smartphone-18.yml | 36 +++++++ regexes/device/mobiles.yml | 16 ++- 3 files changed, 222 insertions(+), 5 deletions(-) diff --git a/Tests/fixtures/clienthints.yml b/Tests/fixtures/clienthints.yml index 358dfad3fc..c611901bc8 100644 --- a/Tests/fixtures/clienthints.yml +++ b/Tests/fixtures/clienthints.yml @@ -3684,3 +3684,178 @@ model: Galaxy A13 os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36 + headers: + Sec-CH-UA: '"Not_A Brand";v="8.0.0.0", "Chromium";v="120.0.6099.210", "Google Chrome";v="120.0.6099.210"' + Sec-CH-UA-Platform: "Android" + Sec-CH-UA-Mobile: "?1" + Sec-CH-UA-Full-Version: "120.0.6099.210" + Sec-CH-UA-Platform-Version: "11.0.0" + Sec-CH-UA-Model: "Model S 4G" + os: + name: Android + version: 11.0.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 120.0.6099.210 + engine: Blink + engine_version: 120.0.6099.210 + device: + type: smartphone + brand: Sunmax + model: Model S 4G + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36 + headers: + Sec-CH-UA: '"Chromium";v="124.0.6367.113", "Google Chrome";v="124.0.6367.113", "Not-A.Brand";v="99.0.0.0"' + Sec-CH-UA-Platform: "Android" + Sec-CH-UA-Mobile: "?1" + Sec-CH-UA-Full-Version: "124.0.6367.113" + Sec-CH-UA-Platform-Version: "11.0.0" + Sec-CH-UA-Model: "Model S" + os: + name: Android + version: 11.0.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 124.0.6367.113 + engine: Blink + engine_version: 124.0.6367.113 + device: + type: smartphone + brand: Sunmax + model: Model S + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 12; Model D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36 + headers: + Sec-CH-UA: '" Not A;Brand";v="99.0.0.0", "Chromium";v="102.0.5005.125", "Google Chrome";v="102.0.5005.125"' + Sec-CH-UA-Platform: "Android" + Sec-CH-UA-Mobile: "?1" + Sec-CH-UA-Full-Version: "102.0.5005.125" + Sec-CH-UA-Platform-Version: "12.0.0" + Sec-CH-UA-Model: "Model D" + os: + name: Android + version: 12.0.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 102.0.5005.125 + engine: Blink + engine_version: 102.0.5005.125 + device: + type: smartphone + brand: Sunmax + model: Model D + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; Model A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Mobile Safari/537.36 + headers: + Sec-CH-UA: '"Chromium";v="104.0.5112.69", " Not A;Brand";v="99.0.0.0", "Google Chrome";v="104.0.5112.69"' + Sec-CH-UA-Platform: "Android" + Sec-CH-UA-Mobile: "?1" + Sec-CH-UA-Full-Version: "104.0.5112.69" + Sec-CH-UA-Platform-Version: "8.1.0" + Sec-CH-UA-Model: "Model A" + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 104.0.5112.69 + engine: Blink + engine_version: 104.0.5112.69 + device: + type: smartphone + brand: Sunmax + model: Model A + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 11; Model 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Mobile Safari/537.36 + headers: + Sec-CH-UA: '"Chromium";v="94", "Google Chrome";v="94", ";Not A Brand";v="99"' + Sec-CH-UA-Platform: "Android" + Sec-CH-UA-Mobile: "?1" + Sec-CH-UA-Full-Version: "94.0.4606.85" + Sec-CH-UA-Platform-Version: "11.0.0" + Sec-CH-UA-Model: "Model 6" + os: + name: Android + version: 11.0.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 94.0.4606.85 + engine: Blink + engine_version: 94.0.4606.85 + device: + type: smartphone + brand: Sunmax + model: Model 6 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36 + headers: + Sec-CH-UA: '"Chromium";v="124.0.6367.82", "Google Chrome";v="124.0.6367.82", "Not-A.Brand";v="99.0.0.0"' + Sec-CH-UA-Platform: "Android" + Sec-CH-UA-Mobile: "?1" + Sec-CH-UA-Full-Version: "124.0.6367.82" + Sec-CH-UA-Platform-Version: "11.0.0" + Sec-CH-UA-Model: "Model_6_pro_4G" + os: + name: Android + version: 11.0.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 124.0.6367.82 + engine: Blink + engine_version: 124.0.6367.82 + device: + type: smartphone + brand: Sunmax + model: Model 6 Pro 4G + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Mobile Safari/537.36 + headers: + Sec-CH-UA: '"Chromium";v="122.0.6261.90", "Not(A:Brand";v="24.0.0.0", "Google Chrome";v="122.0.6261.90"' + Sec-CH-UA-Platform: "Android" + Sec-CH-UA-Mobile: "?1" + Sec-CH-UA-Full-Version: "122.0.6261.90" + Sec-CH-UA-Platform-Version: "9.0.0" + Sec-CH-UA-Model: "LECT-TAB1011H" + os: + name: Android + version: 9.0.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 122.0.6261.90 + engine: Blink + engine_version: 122.0.6261.90 + device: + type: tablet + brand: Lectrus + model: LECT-TAB1011H + os_family: Android + browser_family: Chrome diff --git a/Tests/fixtures/smartphone-18.yml b/Tests/fixtures/smartphone-18.yml index 153f0161d9..d7af5073c7 100644 --- a/Tests/fixtures/smartphone-18.yml +++ b/Tests/fixtures/smartphone-18.yml @@ -3669,3 +3669,39 @@ model: SS5424G os_family: Android browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 8.1.0; MS571) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Mobile Safari/537.36 + os: + name: Android + version: 8.1.0 + platform: "" + client: + type: browser + name: Chrome Mobile + version: 103.0.0.0 + engine: Blink + engine_version: 103.0.0.0 + device: + type: smartphone + brand: Maxcom + model: MS571 + os_family: Android + browser_family: Chrome +- + user_agent: Mozilla/5.0 (Linux; Android 9; MS572) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36 + os: + name: Android + version: "9" + platform: "" + client: + type: browser + name: Chrome Mobile + version: 108.0.0.0 + engine: Blink + engine_version: 108.0.0.0 + device: + type: smartphone + brand: Maxcom + model: MS572 + os_family: Android + browser_family: Chrome diff --git a/regexes/device/mobiles.yml b/regexes/device/mobiles.yml index c5c0627630..e88739c9c9 100644 --- a/regexes/device/mobiles.yml +++ b/regexes/device/mobiles.yml @@ -31914,14 +31914,14 @@ Ruggex: # Maxcom (maxcom.pl) Maxcom: - regex: '(?:MS(?:45[036]|505|507_STRONG|514|651)|MS457(?:PLUS)?|RS-401|Neva Rise S1)(?:[);/ ]|$)' + regex: '(?:MS(?:45[036]|505|507_STRONG|514|57[12]|651)|MS457(?:PLUS)?|RS-401|Neva Rise S1)(?:[);/ ]|$)' device: 'smartphone' models: - regex: '(MS457)PLUS(?:[);/ ]|$)' model: '$1 Plus' - regex: '(MS507)_STRONG(?:[);/ ]|$)' model: '$1 Strong' - - regex: 'MS(45[0367]|505|514|651)(?:[);/ ]|$)' + - regex: 'MS(45[0367]|505|514|57[12]|651)(?:[);/ ]|$)' model: 'MS$1' - regex: 'RS-401(?:[);/ ]|$)' model: 'RS-401' @@ -40437,9 +40437,15 @@ Khadas: # Sunmax or sunmax mobile (sunmaxmobile.com) Sunmax: - regex: '(Model Y)(?:[);/ ]|$)' + regex: 'Model[ _][6ADSY](?:[ _]pro)?(?:[ _]4G)?(?:[);/ ]|$)' device: 'smartphone' - model: '$1' + models: + - regex: 'Model_6_pro_4G' + model: 'Model 6 Pro 4G' + - regex: '(Model S 4G)' + model: '$1' + - regex: '(Model [6ADSY])' + model: '$1' # Kapsys (kapsys.com) Kapsys: @@ -40858,7 +40864,7 @@ BluSlate: # Lectrus Lectrus: - regex: 'LECT-TAB(1011|0711)(?:[);/ ]|$)' + regex: 'LECT-TAB(1011H?|0711)(?:[);/ ]|$)' device: 'tablet' model: 'LECT-TAB$1'