Skip to content

Commit

Permalink
Adds detection for Altimo, AmazonBasics, Atlantic Electrics, Black Bo…
Browse files Browse the repository at this point in the history
…x, Canal+, Cecotec, DIORA, Dinalink, Elektroland, FITCO, Filimo, Graetz, HOFER, Homatics, Kendo, Maxwell, MEGA VISION, MEO, NABO, NetBox, OCEANIC, Orava, Play Now, PROSONIC, Sagemcom, SEHMAX, Silva Schneider, Solas, Super General, TADAAM, TAUBE, VANGUARD, Walker, We. by Loewe., WONDER brands. improves detection for other brands, improves version detection for Fire OS (#7540)

* Improves detection for Hisense devices
* Adds test for Hisense 50A60GEVS
* Adds detection for We. by Loewe. brand and devices
* Adds detection for TAUBE brand
* Improves detection for Sencor brand
* Improves detection for Dyon brand
* Improves detection for Loewe brand and devices
* Adds detection for Maxwell brand
* Improves detection for Majestic brand
* Improves detection for Schneider brand
* Improves detection for RCA Tablets brand
* Adds detection for Super General brand
* Adds detection for Graetz brand
* Improves Unknown regex
* Improves detection for Crown brand
* Improves detection for Fuego brand
* Improves detection for SEG brand
* Improves detection for REGAL brand
* Adds detection for FITCO brand
* Adds detection for Solas brand
* Adds detection for Altimo brand
* Adds detection for Walker brand
* Adds detection for Cecotec brand
* Adds detection for Atlantic Electrics
* Improves detection for Walker brand
* Improves detection for Turbo-X brand
* Adds detection for Orava brand
* Adds detection for Kendo brand
* Adds detection for HOFER brand
* Improves detection for Nokia brand
* Adds detection for Silva Schneider brand
* Adds detection for PROSONIC brand
* Adds detection for DIORA brand
* Adds detection for Elektroland brand
* Adds detection for NABO brand
* Adds detection for OCEANIC brand
* Adds detection for SEHMAX brand
* Adds detection for VANGUARD brand
* Adds detection for WONDER brand
* Adds detection for MEGA VISION brand
* Move tests from smartphone to tv
* Move tests from tablet to smartphone
* Move tests from smartphone to desktop
* Move tests from smartphone to phablet
* Move tests from smartphone to tablet
* Move tests from smartphone to wearable
* Move tests from smartphone to car browser
* Move tests from smartphone to portable media player
* Move tests from smartphone to feature phone
* Improves general model detection for various brands
* Improves general detection for tv
* Adds detection for Black Box brand
* Adds detection for Homatics brand
* Adds detection for Canal+ brand
* Adds detection for Dinalink brand
* Adds detection for Filimo brand
* Adds detection for NetBox brand
* Adds detection for MEO brand
* Adds detection for Sagemcom brand
* Improves detection for ONVO brand
* Adds detection for TADAAM brand
* Improves detection for TIMvision brand
* Improves detection for Sunny brand
* Adds detection for Play Now brand
* Rename models from Box to TV Box
* Improves version detection for Fire OS
* Adds detection for AmazonBasics brand
* Adds detection for Amazon Fire TV Stick 4K Max (2023)
* Improves detection for Amazon devices
* Adds detection for Amazon Fire TV 2 (2023)
* Improves detection for Fire OS
* Improves regex for MEO brand
* Rename AmazonBasics to Amazon Basics
* Improves detection for Fire OS
* Remove duplicate tests
* Improves detection for Fire OS
* Change device type for Micromax Canvas Tab
* Move tests from smartphone to tablet
* Change device type for NASCO Snap Pro
* Move test from tablet to smartphone
* Change device type for Explay A350TV
* Move test from tablet to smartphone
* Change device type for Fluo L
* Move test from tablet to smartphone
* Improves regex for Fire OS
* Improves detection for Fire OS
* Adds client hints mapping for Fire OS

refs #7535, #7536, #7537, #7539
  • Loading branch information
liviuconcioiu committed Dec 22, 2023
1 parent 30463d5 commit 449cbca
Show file tree
Hide file tree
Showing 54 changed files with 18,687 additions and 17,695 deletions.
35 changes: 35 additions & 0 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ abstract class AbstractDeviceParser extends AbstractParser
'A7' => 'Allwinner',
'A1' => 'Altech UEC',
'66' => 'Altice',
'ALM' => 'Altimo',
'A5' => 'altron',
'ALT' => 'Altus',
'KN' => 'Amazon',
'AMZ' => 'Amazon Basics',
'AMA' => 'AMA',
'AG' => 'AMGOO',
'9A' => 'Amigoo',
Expand Down Expand Up @@ -182,6 +184,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'AU' => 'Asus',
'6A' => 'AT&T',
'ATH' => 'Athesi',
'ATE' => 'Atlantic Electrics',
'5Q' => 'Atmaca Elektronik',
'YH' => 'ATMAN',
'2A' => 'Atom',
Expand Down Expand Up @@ -247,6 +250,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'ZB' => 'Bittium',
'BK' => 'Bkav',
'5B' => 'Black Bear',
'BLK' => 'Black Box',
'BF' => 'Black Fox',
'BPC' => 'Blackpcs',
'B2' => 'Blackview',
Expand Down Expand Up @@ -299,8 +303,10 @@ abstract class AbstractDeviceParser extends AbstractParser
'CA' => 'Cat',
'BC' => 'Camfone',
'CJ' => 'Cavion',
'CAN' => 'Canal+',
'4D' => 'Canal Digital',
'CNG' => 'Canguro',
'CEC' => 'Cecotec',
'CEI' => 'Ceibal',
'02' => 'Cell-C',
'CEL' => 'Cellacom',
Expand Down Expand Up @@ -414,10 +420,12 @@ abstract class AbstractDeviceParser extends AbstractParser
'1D' => 'Diva',
'DIV' => 'DiverMax',
'D6' => 'Divisat',
'DIO' => 'DIORA',
'X6' => 'DIXON',
'DIM' => 'DIMO',
'5D' => 'DING DING',
'DIN' => 'Dinax',
'DNA' => 'Dinalink',
'DM' => 'DMM',
'DN' => 'DNS',
'DC' => 'DoCoMo',
Expand Down Expand Up @@ -481,6 +489,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'03' => 'Electroneum',
'Z8' => 'ELECTRONIA',
'EL1' => 'Elecson',
'ELK' => 'Elektroland',
'L0' => 'Element',
'EG' => 'Elenberg',
'EL' => 'Elephone',
Expand Down Expand Up @@ -552,6 +561,8 @@ abstract class AbstractDeviceParser extends AbstractParser
'FX' => 'Finlux',
'F3' => 'FireFly Mobile',
'F8' => 'FISE',
'FIT' => 'FITCO',
'FLM' => 'Filimo',
'FIL' => 'FILIX',
'FL' => 'Fly',
'QC' => 'FLYCAT',
Expand Down Expand Up @@ -634,6 +645,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'GOO' => 'GOODTEL',
'8G' => 'Gplus',
'GR' => 'Gradiente',
'GRE' => 'Graetz',
'GP' => 'Grape',
'G6' => 'Gree',
'GRA' => 'Great Asia',
Expand Down Expand Up @@ -685,7 +697,9 @@ abstract class AbstractDeviceParser extends AbstractParser
'HLL' => 'HLLO',
'HKC' => 'HKC',
'8W' => 'HKPro',
'HOF' => 'HOFER',
'H1' => 'Hoffmann',
'HOM' => 'Homatics',
'H0' => 'Hometech',
'HM' => 'Homtom',
'HZ' => 'Hoozo',
Expand Down Expand Up @@ -836,6 +850,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'K3' => 'Keneksi',
'KX' => 'Kenxinda',
'KEN' => 'Kenbo',
'KND' => 'Kendo',
'KZG' => 'KZG',
'K1' => 'Kiano',
'5W' => 'Kingbox',
Expand Down Expand Up @@ -961,6 +976,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'ZM' => 'Maximus',
'6X' => 'Maxtron',
'0D' => 'MAXVI',
'MAX' => 'Maxwell',
'XZ' => 'MAXX',
'MW' => 'Maxwest',
'M0' => 'Maze',
Expand All @@ -979,13 +995,15 @@ abstract class AbstractDeviceParser extends AbstractParser
'MK' => 'MediaTek',
'MD' => 'Medion',
'M2' => 'MEEG',
'MEG' => 'MEGA VISION',
'MP' => 'MegaFon',
'X0' => 'mPhone',
'3M' => 'Meitu',
'M1' => 'Meizu',
'0E' => 'Melrose',
'MU' => 'Memup',
'ME' => 'Metz',
'MEO' => 'MEO',
'MX' => 'MEU',
'MI' => 'MicroMax',
'MS' => 'Microsoft',
Expand Down Expand Up @@ -1056,6 +1074,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'7V' => 'Navitel',
'N3' => 'Navon',
'7R' => 'NavRoad',
'NAB' => 'NABO',
'NAS' => 'NASCO',
'NP' => 'Naomi Phone',
'NAN' => 'Nanho',
Expand All @@ -1068,6 +1087,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'1N' => 'Neomi',
'7Q' => 'Neon IQ',
'8F' => 'Neolix',
'NET' => 'NetBox',
'NA' => 'Netgear',
'NEM' => 'Netmak',
'NU' => 'NeuImage',
Expand Down Expand Up @@ -1141,6 +1161,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'OLA' => 'Olax',
'OLK' => 'Olkya',
'OLY' => 'Olympia',
'OCE' => 'OCEANIC',
'OLT' => 'OLTO',
'OJ' => 'Ookee',
'OD' => 'Onda',
Expand All @@ -1162,6 +1183,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'OPT' => 'Optoma',
'OPH' => 'Ophone',
'OR' => 'Orange',
'ORA' => 'Orava',
'O5' => 'Orbic',
'Y6' => 'Orbita',
'ORB' => 'Orbsmart',
Expand Down Expand Up @@ -1223,6 +1245,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'PIR' => 'PIRANHA',
'PIN' => 'PINE',
'9P' => 'Planet Computers',
'PLA' => 'Play Now',
'PY' => 'Ployer',
'P4' => 'Plum',
'PLU' => 'PlusStyle',
Expand Down Expand Up @@ -1255,6 +1278,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'P6' => 'Proline',
'5O' => 'Prology',
'P1' => 'ProScan',
'PRO' => 'PROSONIC',
'P7' => 'Protruly',
'R0' => 'ProVision',
'7O' => 'Polestar',
Expand Down Expand Up @@ -1341,6 +1365,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'SLF' => 'SAILF',
'X1' => 'Safaricom',
'SG' => 'Sagem',
'SAG' => 'Sagemcom',
'4L' => 'Salora',
'SA' => 'Samsung',
'SAT' => 'Samtech',
Expand All @@ -1358,6 +1383,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'SCO' => 'Scosmos',
'ZG' => 'Schok',
'G8' => 'SEG',
'SEX' => 'SEHMAX',
'SD' => 'Sega',
'0U' => 'Selecline',
'9G' => 'Selenga',
Expand Down Expand Up @@ -1385,6 +1411,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'1S' => 'Sigma',
'70' => 'Silelis',
'SJ' => 'Silent Circle',
'SIL' => 'Silva Schneider',
'10' => 'Simbans',
'98' => 'Simply',
'SIM' => 'simfer',
Expand Down Expand Up @@ -1420,6 +1447,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'JL' => 'SOLO',
'SOS' => 'SOSH',
'SOD' => 'Soda',
'SOL' => 'Solas',
'16' => 'Solone',
'OI' => 'Sonim',
'SVE' => 'Sveon',
Expand Down Expand Up @@ -1464,6 +1492,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'W8' => 'SUNWIND',
'SBX' => 'SuperBOX',
'SBR' => 'Sber',
'SGE' => 'Super General',
'SU' => 'SuperSonic',
'79' => 'SuperTab',
'S5' => 'Supra',
Expand All @@ -1482,12 +1511,14 @@ abstract class AbstractDeviceParser extends AbstractParser
'4S' => 'Syrox',
'TM' => 'T-Mobile',
'T96' => 'T96',
'TAD' => 'TADAAM',
'TK' => 'Takara',
'73' => 'Tambo',
'9N' => 'Tanix',
'U5' => 'Taiga System',
'TAL' => 'Talius',
'7G' => 'TAG Tech',
'TAU' => 'TAUBE',
'T5' => 'TB Touch',
'TC' => 'TCL',
'T0' => 'TD Systems',
Expand Down Expand Up @@ -1619,6 +1650,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'VC' => 'Vankyo',
'VAL' => 'VALEM',
'VAT' => 'VALTECH',
'VAN' => 'VANGUARD',
'VB' => 'VC',
'VN' => 'Venso',
'VEN' => 'Venstar',
Expand Down Expand Up @@ -1694,10 +1726,12 @@ abstract class AbstractDeviceParser extends AbstractParser
'ZC' => 'VUCATIMES',
'VO2' => 'VOLKANO',
'VUE' => 'Vue Micro',
'WAK' => 'Walker',
'WA' => 'Walton',
'WAF' => 'WAF',
'WAL' => 'Waltter',
'WHI' => 'White Mobile',
'WBL' => 'We. by Loewe.',
'WM' => 'Weimei',
'WE' => 'WellcoM',
'W6' => 'WELLINGTON',
Expand Down Expand Up @@ -1726,6 +1760,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'WL' => 'Wolder',
'WG' => 'Wolfgang',
'WQ' => 'Wolki',
'WON' => 'WONDER',
'WO' => 'Wonu',
'W1' => 'Woo',
'WR' => 'Wortmann',
Expand Down
21 changes: 21 additions & 0 deletions Parser/OperatingSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,27 @@ public function parse(): ?array
if ('HarmonyOS' === $name) {
$version = '';
}

if ('Fire OS' === $osFromUserAgent['name']) {
$majorVersion = (int) (\explode('.', $version, 1)[0] ?? '0');

$fireOsVersionMapping = [
'11' => '8',
'10' => '8',
'9' => '7',
'7' => '6',
'5' => '5',
'4.4.3' => '4.5.1',
'4.4.2' => '4',
'4.2.2' => '3',
'4.0.3' => '3',
'4.0.2' => '3',
'4' => '2',
'2' => '1',
];

$version = $fireOsVersionMapping[$version] ?? $fireOsVersionMapping[$majorVersion] ?? $version;
}
}

$short = $osFromClientHints['short_name'];
Expand Down
72 changes: 72 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3998,3 +3998,75 @@
version:
platform:
family: Other Mobile
-
user_agent: Mozilla/5.0 (Linux; Android 7.1.2; AFTBU001) AppleWebKit/537.36 (KHTML, like Gecko) Silk/96.1.237 like Chrome/96.0.4664.128 Safari/537.36
os:
name: Fire OS
short_name: FIR
version: "6"
platform:
family: Android
-
user_agent: Mozilla/5.0 (Linux; Android 11; AFTKRT Build/RS8101.1854N; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/112.0.5615.197 Mobile Safari/537.36 cordova-amazon-fireos/3.4.0 AmazonWebAppPlatform/3.4.0;2.0
os:
name: Fire OS
short_name: FIR
version: "8"
platform:
family: Android
-
user_agent: Mozilla/5.0 (Linux; Android 9; KFMAWI Build/PS7327.3329N; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/112.0.5615.197 Mobile Safari/537.36 cordova-amazon-fireos/3.4.0 AmazonWebAppPlatform/3.4.0;2.0
os:
name: Fire OS
short_name: FIR
version: "7"
platform:
family: Android
-
user_agent: Mozilla/5.0 (Linux; U; Android 5.1.1; en-US; KFSUWI Build/LVY48F) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.11.3.1204 Mobile Safari/537.36
os:
name: Fire OS
short_name: FIR
version: "5"
platform:
family: Android
-
user_agent: Mozilla/5.0 (Linux; Android 11; KFQUWI) AppleWebKit/537.36 (KHTML, like Gecko) Silk/94.5.2 like Chrome/94.0.4606.128 Safari/537.36
os:
name: Fire OS
short_name: FIR
version: "8"
platform:
family: Android
-
user_agent: Mozilla/5.0 (Linux; Android 7.1.2; KFMUWI) AppleWebKit/537.36 (KHTML, like Gecko) Silk/80.4.14 like Chrome/80.0.3987.119 Safari/537.36
os:
name: Fire OS
short_name: FIR
version: "6"
platform:
family: Android
-
user_agent: Mozilla/5.0 (Linux; U; Android 4.0.3; en-gb; KFTT Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30
os:
name: Fire OS
short_name: FIR
version: "3"
platform:
family: Android
-
user_agent: Mozilla/5.0 (Linux; Android 4.2.2; KFAPWI Build/JDQ39) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Safari/537.36
os:
name: Fire OS
short_name: FIR
version: "3"
platform:
family: Android
-
user_agent: Mozilla/5.0 (Linux; Android 4.0.4; KFJWA Build/IMM76D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.42 Safari/537.36
os:
name: Fire OS
short_name: FIR
version: "3"
platform:
family: Android
18 changes: 18 additions & 0 deletions Tests/fixtures/car_browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -935,3 +935,21 @@
model: SDA-8TAB
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; Android 7.0; QUAD-CORE T3 K2001M Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.92 Safari/537.36
os:
name: Android
version: "7.0"
platform: ""
client:
type: browser
name: Chrome
version: 30.0.1599.92
engine: Blink
engine_version: "30.0.1599.92"
device:
type: car browser
brand: Allwinner
model: QUAD-CORE T3 K2001M
os_family: Android
browser_family: Chrome
4 changes: 2 additions & 2 deletions Tests/fixtures/clienthints-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2094,8 +2094,8 @@
headers:
http-x-requested-with: com.amazon.webapps.gms.search
os:
name: Android
version: "9"
name: Fire OS
version: "7"
platform: ""
client:
type: mobile app
Expand Down
4 changes: 2 additions & 2 deletions Tests/fixtures/clienthints.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@
Sec-CH-UA-Model: "KFKAWI"
Sec-CH-Prefers-Color-Scheme: "light"
os:
name: Android
version: "9.0.0"
name: Fire OS
version: "7"
platform: ""
client:
type: browser
Expand Down
Loading

0 comments on commit 449cbca

Please sign in to comment.