Skip to content

Commit

Permalink
feat: detect device new brand SPURT: K700
Browse files Browse the repository at this point in the history
feat: detect device brand Xiaomi: Redmi 12 (23053RN02L)
feat: detect device brand Samsung: Galaxy M54 5G (SM-M546B)
feat: detect device brand Vargo: VX4
  • Loading branch information
sanchezzzhak committed Oct 11, 2023
1 parent f476f1f commit 54a2cab
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 19 deletions.
1 change: 1 addition & 0 deletions Parser/Device/AbstractDeviceParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,7 @@ abstract class AbstractDeviceParser extends AbstractParser
'43' => 'Spectralink',
'SP' => 'Spice',
'84' => 'Sprint',
'SPU' => 'SPURT',
'QS' => 'SQOOL',
'S4' => 'Star',
'OL' => 'Starlight',
Expand Down
16 changes: 16 additions & 0 deletions Tests/fixtures/phablet-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1679,3 +1679,19 @@
model: Galaxy Z Flip 5
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/20G75 Instagram 296.0.0.18.107 (iPhone14,8; iOS 16_6; en_US; en; scale=3.00; 1284x2778; 505423516)
os:
name: iOS
version: "16.6"
platform: ""
client:
type: mobile app
name: Instagram App
version: 296.0.0.18.107
device:
type: phablet
brand: Apple
model: iPhone 14 Plus
os_family: iOS
browser_family: Unknown
134 changes: 134 additions & 0 deletions Tests/fixtures/smartphone-37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2053,3 +2053,137 @@
model: C1 Max
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 13; 23053RN02L Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/117.0.0.0 Mobile Safari/537.36
os:
name: Android
version: "13"
platform: ""
client:
type: browser
name: Chrome Webview
version: 117.0.0.0
engine: Blink
engine_version: 117.0.0.0
device:
type: smartphone
brand: Xiaomi
model: Redmi 12
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 13; moto g14 Build/TLB33.78-61-2; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/117.0.0.0 Mobile Safari/537.36
os:
name: Android
version: "13"
platform: ""
client:
type: browser
name: Chrome Webview
version: 117.0.0.0
engine: Blink
engine_version: 117.0.0.0
device:
type: smartphone
brand: Motorola
model: Moto G14
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 13; SM-M546B Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 Instagram 300.0.0.29.110 Android (33/13; 450dpi; 1080x2173; samsung; SM-M546B; m54x; s5e8835; pt_BR; 515103460)
os:
name: Android
version: "13"
platform: ""
client:
type: mobile app
name: Instagram App
version: 300.0.0.29.110
device:
type: smartphone
brand: Samsung
model: Galaxy M54 5G
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 13; SM-A346M Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 Instagram 301.0.0.33.110 Android (33/13; 450dpi; 1080x2130; samsung; SM-A346M; a34x; mt6877; pt_BR; 517900830)
os:
name: Android
version: "13"
platform: ""
client:
type: mobile app
name: Instagram App
version: 301.0.0.33.110
device:
type: smartphone
brand: Samsung
model: Galaxy A34 5G
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 13; SM-A145M Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 Instagram 300.0.0.29.110 Android (33/13; 450dpi; 1080x2209; samsung; SM-A145M; a14; s5e3830; pt_BR; 515103471)
os:
name: Android
version: "13"
platform: ""
client:
type: mobile app
name: Instagram App
version: 300.0.0.29.110
device:
type: smartphone
brand: Samsung
model: Galaxy A14
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 10; SM-J600GT Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Mobile Safari/537.36 Instagram 298.0.0.31.110 Android (29/10; 320dpi; 720x1384; samsung; SM-J600GT; j6lte; samsungexynos7870; pt_BR; 510206622)
os:
name: Android
version: "10"
platform: ""
client:
type: mobile app
name: Instagram App
version: 298.0.0.31.110
device:
type: smartphone
brand: Samsung
model: Galaxy J6
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 8.1.0; VX4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Safari/537.36
os:
name: Android
version: 8.1.0
platform: ""
client:
type: browser
name: Chrome Mobile
version: 113.0.0.0
engine: Blink
engine_version: 113.0.0.0
device:
type: smartphone
brand: Vargo
model: VX4
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; K700 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/110.0.5481.65 Mobile Safari/537.36 Instagram 269.0.0.18.75 Android (29/10; 320dpi; 720x1446; SPURT; K700; SPURT_K700; mt6762; ar_YE; 444561807)
os:
name: Android
version: "10"
platform: ""
client:
type: mobile app
name: Instagram App
version: 269.0.0.18.75
device:
type: smartphone
brand: SPURT
model: K700
os_family: Android
browser_family: Unknown
46 changes: 27 additions & 19 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13914,6 +13914,14 @@ Lexibook:
- regex: '(MFC[0-9]{3}[a-z]{2,})'
model: '$1'

# Vargo or Ivargo
Vargo:
regex: 'Vargo[; _]|(?:V210101|Android 8(?:[\d.]*);(?: [\w-]+;)? VX4)(?:[);/ ]|$)'
device: 'smartphone'
models:
- regex: '(V210101|VX4)(?:[);/ ]|$)'
model: '$1'

# LG or LGE (lg.com)
LG:
regex: '(?<!TECNO )LG|Web0S; Linux/SmartTV|portalmmm/2\.0 (?:KE|KG|KP|L3)|(?:(?!VX20|VX19)VX[0-9]+|L-0[12]D|L-07C|P713|(LM-[A-Z][0-9]{3}[A-Z]{0,3}(?:\(FGN?\)|\(G\)|\.FN|\.F(?:GN?)?)?)|LM-(X625N1|G820QM[0127])|G Watch|lucye)(?:[);/ ]|$)|NetCast|RS98[78]|RS500|VS(?:50[01]|835|876|880|98[05-8]|99[056]|(410|415|425|500|880)PP)|VS820|VS870 4G|Nexsus 5|LML(41[34]D|211B|713D|212V)L|VK810 4G|VK815|X5-LG|L-05[DE]|L-03K|L-01[LJK]|L-52A|L-[45]1A|901LG|A001LG|80[12]LG|402LG|LGT32|L-02K|L-01F|LM-V40|DM-01K|DM-02H|LMX130IM|VS810PP|VS425|VM670|VS930 4G'
Expand Down Expand Up @@ -20679,6 +20687,8 @@ Samsung:
model: 'Galaxy M53 5G'
- regex: '(?:SAMSUNG-)?SM-M625'
model: 'Galaxy M62'
- regex: '(?:SAMSUNG-)?SM-M546'
model: 'Galaxy M54 5G'
- regex: '(?:SAMSUNG-)?SM-W201([689])'
model: 'Galaxy W201$1'
- regex: '(?:SAMSUNG-)?SM-W2022'
Expand Down Expand Up @@ -24192,9 +24202,15 @@ VK Mobile:
device: 'feature phone'
model: 'VK$1'

# Fortis
Fortis:
regex: '(Apollo 5 Neo)(?:[);/ ]|$)'
device: 'smartphone'
model: '$1'

# Vernee
Vernee:
regex: 'Vernee|(?:Mars Pro|Apollo[ _](?:Lite|X)|Thor (?:E|Plus)|X2_euro|M7_EEA|T3 Pro|V2 Pro|Apollo)(?:[);/ ]|$)'
regex: 'Vernee|(?:Mars Pro|Apollo[ _](?:Lite|X)|Thor (?:E|Plus)|X2_euro|M7_EEA|T3 Pro|V2 Pro|(?<!MAXTRON )Apollo)(?:[);/ ]|$)'
device: 'smartphone'
models:
- regex: 'Apollo[ _]Lite'
Expand Down Expand Up @@ -25371,7 +25387,7 @@ Zopo:

# Xiaomi
Xiaomi:
regex: 'Xiaomi(?!/(?:Miui|Mint[ ])Browser)| ONC(?: Build|[;)])|MiTV-\w|MiProjA1|Mi9 Pro 5G|(?:MI [a-z0-9]+|Mi-4c|MI-One[ _]?[a-z0-9]+|MIX(?: 2S?)?|MIX 2S ART|pomelo)(?:[);/ ]|$)|HM (?:[^/;]+) (?:Build|MIUI)|(?:2014501|2014011|201481[12378]|201302[23]|2013061) Build|Redmi|POCOPHONE|(?:SHARK )?KTUS-[AH]0|(?:SHARK )?(KLE|KSR|MBU|PAR)-[AH]0|SK[RW]-[AH]0|PRS-[AH]0|POCO F1|DLT-[AH]0|MIBOX[234]([_ ]PRO)?|MiTV4[ACSX]?|AWM-A0|MI CC 9 Meitu Edition|MiBOX1S|M2006J10C|M2006C3(?:L[IGC]|LVG|MN?G|MT)|M2007J1(?:7[CGI]|SC)|M2002(?:J9[SEG]|F4LG)|HM2014819|WT88047|210611(?:8C|19(?:BI|[AD]G|AL))|M2001(?:J2G|C3K3I)|M2004J1(?:5SC|9AG)|M2004J(?:7[AB]|19)[CG]|M2012K11(?:[CGI]|A[CI])|M2011K2[CG]|M2011J18C|M2006C3[ML]II|M2003J(?:15SC|15SS|6B2G|6A1G)|M2007J3S[ICYGP]|M2007J22[CG]|M2103K19[CGYI]|M2101K(?:[79]AG|7AI|7B[GI]|6[GIRP]|7BNY|9[GCR])|M2010J19S[CGYIL]|M2102(?:K1AC|K1[CG]|J2SC)|HM NOTE 1(?:LTE|W)|MI[_ ]PLAY|XIG01|Qin 1s\+|Qin ?2(?: Pro)?|MI_(NOTE_Pro|5X|4i|(?:A2|8)_Lite)|A001XM|lancelot|XIG02|2107119DC|M2101K(?:7BL|9AI)|A101XM|M2012K10C|M2104K10AC|M19(?:01F7[1S]|10F4S|08(?:F1XE|C3JGG)|08C3J[IH]|06F9S[IH]|02F1G)|21051182[CG]|21081111RG|2109119D[GI]|21091116(?:AI|[AU]?C|i|U[GI])|220111(?:7T[LGIY]|19TI|19UY|6S[IRC]|6TG|[67]SG|7SL)|21121(?:119S[CG]|23A[CG]|119VL|210C)|2204121(?:6[CI]|6UC|9[CGI]|9NY|1AC)|220333Q(?:AG|NY|L|BI)|2107113S[IGR]|22031(?:29G|116BG|21C)|PAR-H0|M2105K81A?C|2109119BC|2202(?:1119KR|1211RC|33L2[CGI])|22011(?:2[23][CG]|211C|16TI|17S[YI])|joyeuse|galahad|hydrogen|begonia|kenzo|willow|beryllium|rosemary| MDG1|KLE-AO|Mi ?Pad \d|220612(?:18C|[23]SC)|2207(?:12(?:2MC|12AG|19AI)|33S(?:F?G|[IL])|43FI)|2208(?:7RA4DI|1212(?:U?G|C)|128(?:1AC|3[GC]))|Black Shark|MZB8298IN|2210(?:1317C|1316(?:U[PG]|UCP?|[CIG])|1(?:29SG|32[CG]))|2211(?:13(?:3[CG]|17I)|1317G)|23013RK75C|23053RN02[AY]|2209(?:5RA98C|116AG|129SC)|2212(?:0RN86[GI]|6RN91Y|ARNC4L|2RK93C|7RK46C)|2302(?:6RN54G|1RAA(?:EG|2Y)|8R(?:N4DG|A60L|NCAG))|angelican|vnd_camellia|2304(?:9RAD8C|FPN6D[GC])|2303(?:0RAC7Y|CRA44A|ERA42L)|M1906G7G|Hongmi 4A|23046RP50C|M1912G7BC|23076RN4BI|23043RP34G'
regex: 'Xiaomi(?!/(?:Miui|Mint[ ])Browser)| ONC(?: Build|[;)])|MiTV-\w|MiProjA1|Mi9 Pro 5G|(?:MI [a-z0-9]+|Mi-4c|MI-One[ _]?[a-z0-9]+|MIX(?: 2S?)?|MIX 2S ART|pomelo)(?:[);/ ]|$)|HM (?:[^/;]+) (?:Build|MIUI)|(?:2014501|2014011|201481[12378]|201302[23]|2013061) Build|Redmi|POCOPHONE|(?:SHARK )?KTUS-[AH]0|(?:SHARK )?(KLE|KSR|MBU|PAR)-[AH]0|SK[RW]-[AH]0|PRS-[AH]0|POCO F1|DLT-[AH]0|MIBOX[234]([_ ]PRO)?|MiTV4[ACSX]?|AWM-A0|MI CC 9 Meitu Edition|MiBOX1S|M2006J10C|M2006C3(?:L[IGC]|LVG|MN?G|MT)|M2007J1(?:7[CGI]|SC)|M2002(?:J9[SEG]|F4LG)|HM2014819|WT88047|210611(?:8C|19(?:BI|[AD]G|AL))|M2001(?:J2G|C3K3I)|M2004J1(?:5SC|9AG)|M2004J(?:7[AB]|19)[CG]|M2012K11(?:[CGI]|A[CI])|M2011K2[CG]|M2011J18C|M2006C3[ML]II|M2003J(?:15SC|15SS|6B2G|6A1G)|M2007J3S[ICYGP]|M2007J22[CG]|M2103K19[CGYI]|M2101K(?:[79]AG|7AI|7B[GI]|6[GIRP]|7BNY|9[GCR])|M2010J19S[CGYIL]|M2102(?:K1AC|K1[CG]|J2SC)|HM NOTE 1(?:LTE|W)|MI[_ ]PLAY|XIG01|Qin 1s\+|Qin ?2(?: Pro)?|MI_(NOTE_Pro|5X|4i|(?:A2|8)_Lite)|A001XM|lancelot|XIG02|2107119DC|M2101K(?:7BL|9AI)|A101XM|M2012K10C|M2104K10AC|M19(?:01F7[1S]|10F4S|08(?:F1XE|C3JGG)|08C3J[IH]|06F9S[IH]|02F1G)|21051182[CG]|21081111RG|2109119D[GI]|21091116(?:AI|[AU]?C|i|U[GI])|220111(?:7T[LGIY]|19TI|19UY|6S[IRC]|6TG|[67]SG|7SL)|21121(?:119S[CG]|23A[CG]|119VL|210C)|2204121(?:6[CI]|6UC|9[CGI]|9NY|1AC)|220333Q(?:AG|NY|L|BI)|2107113S[IGR]|22031(?:29G|116BG|21C)|PAR-H0|M2105K81A?C|2109119BC|2202(?:1119KR|1211RC|33L2[CGI])|22011(?:2[23][CG]|211C|16TI|17S[YI])|joyeuse|galahad|hydrogen|begonia|kenzo|willow|beryllium|rosemary| MDG1|KLE-AO|Mi ?Pad \d|220612(?:18C|[23]SC)|2207(?:12(?:2MC|12AG|19AI)|33S(?:F?G|[IL])|43FI)|2208(?:7RA4DI|1212(?:U?G|C)|128(?:1AC|3[GC]))|Black Shark|MZB8298IN|2210(?:1317C|1316(?:U[PG]|UCP?|[CIG])|1(?:29SG|32[CG]))|2211(?:13(?:3[CG]|17I)|1317G)|23013RK75C|23053RN02[AYL]|2209(?:5RA98C|116AG|129SC)|2212(?:0RN86[GI]|6RN91Y|ARNC4L|2RK93C|7RK46C)|2302(?:6RN54G|1RAA(?:EG|2Y)|8R(?:N4DG|A60L|NCAG))|angelican|vnd_camellia|2304(?:9RAD8C|FPN6D[GC])|2303(?:0RAC7Y|CRA44A|ERA42L)|M1906G7G|Hongmi 4A|23046RP50C|M1912G7BC|23076RN4BI|23043RP34G'
device: 'smartphone'
models:
# specific smartphone models
Expand Down Expand Up @@ -25615,7 +25631,7 @@ Xiaomi:
model: 'Redmi 10X Pro'
- regex: '22120RN86[GI]|22126RN91Y|2212ARNC4L'
model: 'Redmi 12C'
- regex: '23053RN02[AY]'
- regex: '23053RN02[AYL]'
model: 'Redmi 12'
- regex: '23076RN4BI(?:[);/ ]|$)'
model: 'Redmi 12 5G'
Expand Down Expand Up @@ -27951,8 +27967,6 @@ NEXBOX:
model: 'Smart 4G Adventure Pro'
- regex: 'SMART 4G Adventure'
model: 'Smart 4G Adventure'
- regex: 'SMART 4G M1'
model: 'Smart 4G M1'
- regex: 'SMART[ _]4G[_ ]Speedy[_ ]5inch'
model: 'Smart 4G Speedy 5'
- regex: 'SMART[ _]4G[_ ]Champion'
Expand All @@ -27963,6 +27977,8 @@ NEXBOX:
model: 'Smart 4G P1'
- regex: 'SMART[ _]4G M1 Plus'
model: 'Smart 4G M1 Plus'
- regex: 'SMART 4G M1'
model: 'Smart 4G M1'
- regex: 'TRUE BEYOND TAB 3G'
device: 'tablet'
model: 'Beyond Tab 3G'
Expand Down Expand Up @@ -31650,12 +31666,6 @@ Zentality:
device: 'smartphone'
model: '$1'

# Fortis
Fortis:
regex: '(Apollo 5 Neo)(?:[);/ ]|$)'
device: 'smartphone'
model: '$1'

# OpelMobile (opelmobile.com.au)
OpelMobile:
regex: 'Opel ?Mobile|(?:OpelMobile_Smart(?:JX|X1)|Easy_Smart_2)(?:[);/ ]|$)'
Expand Down Expand Up @@ -33480,14 +33490,6 @@ Gooweel:
- regex: 'M5 Pro'
model: 'M5 Pro'

# Vargo or Ivargo
Vargo:
regex: 'Vargo[; _]|(?:V210101)(?:[);/ ]|$)'
device: 'smartphone'
models:
- regex: '(V210101)(?:[);/ ]|$)'
model: '$1'

# Elekta (elektagulf.com)
Elekta:
regex: 'ELED-(?:4[238]S[AM]{2}RT|5[05](?:CV_)?SMART_UHD|32SMART)(?:[);/ ]|$)'
Expand Down Expand Up @@ -37447,6 +37449,12 @@ VOLKANO:
device: 'tablet'
model: '$1'

# SPURT
SPURT:
regex: '(?: K700)(?:[);/ ]|$)'
device: 'smartphone'
model: 'K700'

# Devices with undectable brand, but detectable model
Unknown:
regex: 'Plasma Mobile|WebTV/(\d+\.\d+)|TV Bro|(?:M10 Ultra|FO-R15|TVBOX|Smart[ _]?TV|SmartATV|M8S\+ 4K|PCBox|rk(?:3128|322x|3368)(?:[_-]box)?|H10 PLAY|Smart AIO TV|TVBOX_L|L-BOX|TVBOX-5G|mips.+(?:Opera TV|wireless|wired)|smartbox|TV BOX|I12Pro Max|(?:audi_)?ks1280x480|AT&T TV|RealtekATV|AOSP on r33a0|hx322x_box|X98_S500)(?:[);/ ]|$)'
Expand Down

0 comments on commit 54a2cab

Please sign in to comment.