Skip to content

Commit

Permalink
Adds detection for various devices and improves os detection (#7179)
Browse files Browse the repository at this point in the history
* Adds detection for Digit4G brand and devices
* Adds detection for JPay brand and devices
* Adds detection for Teracube and devices
* Adds detection for Völfen brand and device
* Adds detection for eNOVA brand and device
* Adds detection for TOSCIDO W109
* Adds detection for MobiIoT MobiGo 2
* Adds detection for T96 brand and device
* Adds detection for Zealot brand and device
* Adds detection for X88 brand and device
* Adds detection for neoCore brand and device
* Improves detection for Android TV and Changhong devices
* Adds detection for Ricoh brand and device
* Add website for iWaylink
* Adds detection for Benesse TAB-A03-BR2
* Adds detection for DIXON TS-M103A
* Adds detection for X96 brand and device
* Adds detection for Sirin Labs Solarin and Sirin OS
* Adds detection for Siragon SP-6150
* Adds detection for Novey brand and device
* Adds detection for Unnion Technologies brand and device
* Adds detection for Partner Mobile brand and device
* Adds detection for Siragon SP-5300
* Adds detection for neoCore E1+
* Adds detection for Kodak Smartway T2
* Improves detection for H96 Max RK3318
* Adds detection for Maxwest Gravity 6P
* Adds detection for Cellacom brand and device
* Improves detection for TOSCIDO W109

ref #7139
  • Loading branch information
liviuconcioiu authored Jul 13, 2022
1 parent fbc7e04 commit 4e4bb2c
Show file tree
Hide file tree
Showing 11 changed files with 772 additions and 26 deletions.
19 changes: 17 additions & 2 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'CJ' => 'Cavion',
'4D' => 'Canal Digital',
'02' => 'Cell-C',
'CEL' => 'Cellacom',
'34' => 'CellAllure',
'7C' => 'Celcus',
'CE' => 'Celkon',
Expand Down Expand Up @@ -334,6 +335,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'D3' => 'Digicel',
'DH' => 'Digihome',
'DD' => 'Digiland',
'DIG' => 'Digit4G',
'DIC' => 'DIGICOM',
'Q0' => 'DIGIFORS',
'DQ' => 'DISH',
Expand Down Expand Up @@ -361,6 +363,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'DRE' => 'DreamTab',
'DU' => 'Dune HD',
'UD' => 'DUNNS Mobile',
'ENO' => 'eNOVA',
'EB' => 'E-Boda',
'EJ' => 'Engel',
'ENA' => 'ENACOM',
Expand Down Expand Up @@ -645,6 +648,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'UJ' => 'Juniper Systems',
'J5' => 'Just5',
'7J' => 'Jumper',
'JPA' => 'JPay',
'JV' => 'JVC',
'JXD' => 'JXD',
'JS' => 'Jesy',
Expand Down Expand Up @@ -832,6 +836,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'MG' => 'MyWigo',
'J3' => 'Mymaga',
'07' => 'MyGica',
'NEO' => 'neoCore',
'08' => 'Nabi',
'N7' => 'National',
'NC' => 'Navcity',
Expand Down Expand Up @@ -870,6 +875,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'N5' => 'NOA',
'N1' => 'Noain',
'N6' => 'Nobby',
'NOV' => 'Novey',
'57' => 'Nubia',
'JN' => 'NOBUX',
'NB' => 'Noblex',
Expand Down Expand Up @@ -938,6 +944,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'PT' => 'Pantech',
'94' => 'Packard Bell',
'H9' => 'Parrot Mobile',
'PAR' => 'Partner Mobile',
'PAP' => 'PAPYRE',
'PB' => 'PCBOX',
'PC' => 'PCD',
Expand Down Expand Up @@ -1028,6 +1035,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'RH' => 'Remdun',
'RP' => 'Revo',
'8R' => 'Retroid Pocket',
'RIC' => 'Ricoh',
'RI' => 'Rikomagic',
'RM' => 'RIM',
'RN' => 'Rinno',
Expand Down Expand Up @@ -1098,7 +1106,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'98' => 'Simply',
'52' => 'Singtech',
'31' => 'Siragon',
'83' => 'Sirin labs',
'83' => 'Sirin Labs',
'5Z' => 'SK Broadband',
'GK' => 'SKG',
'SW' => 'Sky',
Expand Down Expand Up @@ -1167,6 +1175,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'SM' => 'Symphony',
'4S' => 'Syrox',
'TM' => 'T-Mobile',
'T96' => 'T96',
'TK' => 'Takara',
'73' => 'Tambo',
'9N' => 'Tanix',
Expand Down Expand Up @@ -1194,6 +1203,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'TE' => 'Telit',
'65' => 'Telia',
'PW' => 'Telpo',
'TER' => 'Teracube',
'TD' => 'Tesco',
'TA' => 'Tesla',
'9T' => 'Tetratab',
Expand Down Expand Up @@ -1261,6 +1271,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'US' => 'Uniscope',
'U2' => 'UNIWA',
'UO' => 'Unnecto',
'UNN' => 'Unnion Technologies',
'UU' => 'Unonu',
'UN' => 'Unowhy',
'UY' => 'UNNO',
Expand Down Expand Up @@ -1325,6 +1336,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'Z7' => 'VOX',
'VO' => 'Voxtel',
'VY' => 'Voyo',
'VOL' => 'Völfen',
'VH' => 'Vsmart',
'V9' => 'Vsun',
'VU' => 'Vulcan',
Expand Down Expand Up @@ -1362,6 +1374,8 @@ abstract class AbstractDeviceParser extends AbstractParser
'XT' => 'X-TIGI',
'XV' => 'X-View',
'X4' => 'X.Vision',
'X88' => 'X88',
'X96' => 'X96',
'XG' => 'Xgody',
'QX' => 'XGIMI',
'XL' => 'Xiaolajiao',
Expand Down Expand Up @@ -1393,6 +1407,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'YX' => 'Yxtel',
'0Z' => 'Zatec',
'2Z' => 'Zaith',
'ZEA' => 'Zealot',
'PZ' => 'Zebra',
'ZE' => 'Zeemi',
'WZ' => 'Zeeker',
Expand Down Expand Up @@ -1649,7 +1664,7 @@ protected function hasDesktopFragment(): bool
{
return
$this->matchUserAgent('(?:Windows (?:NT|IoT)|X11; Linux x86_64)') &&
!$this->matchUserAgent(' Mozilla/|Android|Tablet|Mobile|iPhone|Windows Phone') &&
!$this->matchUserAgent(' Mozilla/|Andr[o0]id|Tablet|Mobile|iPhone|Windows Phone|ricoh') &&
!$this->matchUserAgent('Lenovo|compatible; MSIE|Trident/|Tesla/|XBOX|FBMD/|ARM; ?([^)]+)');
}

Expand Down
3 changes: 2 additions & 1 deletion Parser/OperatingSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class OperatingSystem extends AbstractParser
'SSE' => 'SUSE',
'SAF' => 'Sailfish OS',
'SEE' => 'SeewoOS',
'SIR' => 'Sirin OS',
'SLW' => 'Slackware',
'SOS' => 'Solaris',
'SYL' => 'Syllable',
Expand Down Expand Up @@ -177,7 +178,7 @@ class OperatingSystem extends AbstractParser
protected static $osFamilies = [
'Android' => [
'AND', 'CYN', 'FIR', 'REM', 'RZD', 'MLD', 'MCD', 'YNS', 'GRI', 'HAR',
'ADR', 'CLR', 'BOS', 'REV', 'LEN',
'ADR', 'CLR', 'BOS', 'REV', 'LEN', 'SIR',
],
'AmigaOS' => ['AMG', 'MOR'],
'BlackBerry' => ['BLB', 'QNX'],
Expand Down
16 changes: 16 additions & 0 deletions Tests/Parser/fixtures/oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3527,3 +3527,19 @@
version: 15.3.1
platform:
family: iOS
-
user_agent: Mozilla/5.0 (Windows NT 6.0; Changhong Andr0id TV Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 SMART-TV
os:
name: Android TV
short_name: ADR
version:
platform:
family: Android
-
user_agent: Mozilla/5.0 (Linux; Android 8.1.0; FINNEY U1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.210 Mobile Safari/537.36
os:
name: Sirin OS
short_name: SIR
version:
platform:
family: Android
36 changes: 36 additions & 0 deletions Tests/fixtures/peripheral.yml
Original file line number Diff line number Diff line change
Expand Up @@ -588,3 +588,39 @@
model: Desk21T-03
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; U; Android 10; en-us; MobiGo2 Build/QP1A.190711.020) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Mobile Safari/537.36 PHX/7.7
os:
name: Android
version: "10"
platform: ""
client:
type: browser
name: Phoenix Browser
version: "7.7"
engine: Blink
engine_version: 87.0.4280.101
device:
type: peripheral
brand: MobiIoT
model: MobiGo 2
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (X11; Linux x86_64; ricoh_mfpapnl) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.34 Safari/534.24
os:
name: GNU/Linux
version: ""
platform: x64
client:
type: browser
name: Chrome
version: 11.0.696.34
engine: WebKit
engine_version: "534.24"
device:
type: peripheral
brand: Ricoh
model: MFP
os_family: GNU/Linux
browser_family: Chrome
Loading

0 comments on commit 4e4bb2c

Please sign in to comment.