Skip to content

Commit

Permalink
feat(device) detect brand Motorola: Moto One Macro (PAGS0005IN)
Browse files Browse the repository at this point in the history
feat(device) detect brand TCL: 408 (T507D), 405 (T506A)
feat(device) detect brand UMIDIGI: G5 Tab (MT16)
feat(device) detect brand Hotwav: Tab R5
feat(device) detect brand Kinstone: KST103SD-L
  • Loading branch information
sanchezzzhak committed Dec 2, 2024
1 parent b44d651 commit c010b7a
Show file tree
Hide file tree
Showing 3 changed files with 129 additions and 12 deletions.
54 changes: 54 additions & 0 deletions Tests/fixtures/smartphone-41.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2518,3 +2518,57 @@
model: "406"
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 13; PAGS0005IN) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36
os:
name: Android
version: "13"
platform: ""
client:
type: browser
name: Chrome Mobile
version: 126.0.0.0
engine: Blink
engine_version: 126.0.0.0
device:
type: smartphone
brand: Motorola
model: Moto One Macro
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; T507D Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/130.0.6723.58 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Webview
version: 130.0.6723.58
engine: Blink
engine_version: 130.0.6723.58
device:
type: smartphone
brand: TCL
model: "408"
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; T506A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Mobile Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome Mobile
version: 130.0.0.0
engine: Blink
engine_version: 130.0.0.0
device:
type: smartphone
brand: TCL
model: "405"
os_family: Android
browser_family: Chrome
54 changes: 54 additions & 0 deletions Tests/fixtures/tablet-12.yml
Original file line number Diff line number Diff line change
Expand Up @@ -899,3 +899,57 @@
model: Tab 10 WiFi
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 13; MT16) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
os:
name: Android
version: "13"
platform: ""
client:
type: browser
name: Chrome
version: 130.0.0.0
engine: Blink
engine_version: 130.0.0.0
device:
type: tablet
brand: UMIDIGI
model: G5 Tab
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; TAB R5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome
version: 130.0.0.0
engine: Blink
engine_version: 130.0.0.0
device:
type: tablet
brand: Hotwav
model: Tab R5
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 12; KST103SD-L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
os:
name: Android
version: "12"
platform: ""
client:
type: browser
name: Chrome
version: 130.0.0.0
engine: Blink
engine_version: 130.0.0.0
device:
type: tablet
brand: Kinstone
model: KST103SD-L
os_family: Android
browser_family: Chrome
33 changes: 21 additions & 12 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17797,7 +17797,7 @@ Torque:

# motorola
Motorola:
regex: 'MOT(?!TO)|(?<!AN)DROID ?(?:Build|[a-z0-9]+)|portalmmm/2\.0 (?:E378i|L6|L7|v3)|XOOM [^;/]*Build|XT1941-2|XT1924-9|XT1925-10|XT1965-6|XT1970-[25]|XT1799-2|XT1021|XT2171-[23]|XT2013-[124]|XT2015-2|XT2055-2|XT2061-3|XT2071-4|XT2201-[126]|XT-2201|XT2113-2|XT2115-1|XT2175-2|XT2141-1|XT2125-4|XT2127-2|XT2129-[123]|XT2143-1|XT2153-1|XT2158-6|XT2215-[124]|XT2221-[12]|XT2225-[12]|XT2233-2|XT2251-1|XT2243-2|XT2241-1|XT2169-1|XT2137-[12]|XT1710-(?:08|10)|XT180[3-5]|XT2315-1|XT2261-1|XT2271-5|XT2333-1|XT2335-[23]|XT2139-1|XT2131(?:-[134]|DL)|XT2303-2|XT2301-5|XT2307-1|XT2321-[23]|XT2323-3|XT2343-[1236]|XT2363-2| XT2401-2|XT2409-5|XT2453-2|XT194[23]-1|XT1929-15|XT2073-2|XT2083-9|XT2081-1|XT2093DL|XT2093-[37]|(?<!Xtreme )(?:XT|MZ|MB|ME)[0-9]{3,4}[a-z]?(?:\(Defy\)|-0[1-5])?(?:[;]? Build|\))|lineage_osprey|ATRIX HD|PAMR00(?:0[28]|10)IN|PANB0001IN|PANB001[35]IN|PANV000[59]IN'
regex: 'MOT(?!TO)|(?<!AN)DROID ?(?:Build|[a-z0-9]+)|portalmmm/2\.0 (?:E378i|L6|L7|v3)|XOOM [^;/]*Build|XT1941-2|XT1924-9|XT1925-10|XT1965-6|XT1970-[25]|XT1799-2|XT1021|XT2171-[23]|XT2013-[124]|XT2015-2|XT2055-2|XT2061-3|XT2071-4|XT2201-[126]|XT-2201|XT2113-2|XT2115-1|XT2175-2|XT2141-1|XT2125-4|XT2127-2|XT2129-[123]|XT2143-1|XT2153-1|XT2158-6|XT2215-[124]|XT2221-[12]|XT2225-[12]|XT2233-2|XT2251-1|XT2243-2|XT2241-1|XT2169-1|XT2137-[12]|XT1710-(?:08|10)|XT180[3-5]|XT2315-1|XT2261-1|XT2271-5|XT2333-1|XT2335-[23]|XT2139-1|XT2131(?:-[134]|DL)|XT2303-2|XT2301-5|XT2307-1|XT2321-[23]|XT2323-3|XT2343-[1236]|XT2363-2| XT2401-2|XT2409-5|XT2453-2|XT194[23]-1|XT1929-15|XT2073-2|XT2083-9|XT2081-1|XT2093DL|XT2093-[37]|(?<!Xtreme )(?:XT|MZ|MB|ME)[0-9]{3,4}[a-z]?(?:\(Defy\)|-0[1-5])?(?:[;]? Build|\))|lineage_osprey|ATRIX HD|PAMR00(?:0[28]|10)IN|PANB0001IN|PANB001[35]IN|PANV000[59]IN|PAGS0005IN'
device: 'smartphone'
models:
# Explicit feature phone models
Expand All @@ -17812,6 +17812,8 @@ Motorola:
model: 'Moto Tab G62'
device: 'tablet'
# Explicit smartphone models
- regex: 'PAGS0005IN'
model: 'Moto One Macro'
- regex: '(?:MOT-|Motorola-)?XT300'
model: 'Spice'
- regex: 'ThinkPhone'
Expand Down Expand Up @@ -21169,7 +21171,7 @@ Pentagram:

# Tcl (tcl.com)
TCL:
regex: 'TCL,|TCL[a-z0-9]+;|smarttv_AFTMM-TCL|AFTDEC012E|AFTMD002|AFTSHN02|AFTMD001|TCL[_ -][a-z0-9]+|(?:TCL[_ -][^;/]+ Build)|(?:TCLGalaG60(?:\(9108A\))?|4163D|4187[DMU]|4188[CLRSVO]|5004S|5033TP|5087Z|5101A|5102[BKLMOP]|5107G|5124J|5130[JMEI]|5133MP|5133A|5148A|5152D|5159[AJ]|5164[AD]|5199I|6102[ADH]|6125[ADFH]|6127[AI]|6156[ADH]|6159[AK]|6165[AHS]|7040N|8491X|9048S|9060[GX]|9080G|9081X|9295G|9296[GQ]|A(?:50[2789]|600)DL|T(?:60[123]|701)DL|T(?:506D|671[EFGHO]|676[HJK]|766[AHJSU]|767[GHW]|770[BH]|771K|773O|774[BH]|775[BH]|776[HO]|779W|780H|781SPP|781S|781|782H|790[SY]|799[BH]|810[HS])|Percee TV|9183W|9198S|9309X2|9317X1|8[14]96G|916[016]G| 9061| 8182| 8167| 8095|BeyondTV\d?|UnionTV|T507U|5131[AG]|T610[KE]|T612B|9132[GS]|9137W|T430W|T431[DUQ]|T501[CL]|T768S|9199S|9494G|9460G|9466X|T60[79]DL|T506[GKTF])(?:_(?:RU|EEA|TR))?(?:[);/ ]|$)'
regex: 'TCL,|TCL[a-z0-9]+;|smarttv_AFTMM-TCL|AFTDEC012E|AFTMD002|AFTSHN02|AFTMD001|TCL[_ -][a-z0-9]+|(?:TCL[_ -][^;/]+ Build)|(?:TCLGalaG60(?:\(9108A\))?|4163D|4187[DMU]|4188[CLRSVO]|5004S|5033TP|5087Z|5101A|5102[BKLMOP]|5107G|5124J|5130[JMEI]|5133MP|5133A|5148A|5152D|5159[AJ]|5164[AD]|5199I|6102[ADH]|6125[ADFH]|6127[AI]|6156[ADH]|6159[AK]|6165[AHS]|7040N|8491X|9048S|9060[GX]|9080G|9081X|9295G|9296[GQ]|A(?:50[2789]|600)DL|T(?:60[123]|701)DL|T(?:506D|671[EFGHO]|676[HJK]|766[AHJSU]|767[GHW]|770[BH]|771K|773O|774[BH]|775[BH]|776[HO]|779W|780H|781SPP|781S|781|782H|790[SY]|799[BH]|810[HS])|Percee TV|9183W|9198S|9309X2|9317X1|8[14]96G|916[016]G| 9061| 8182| 8167| 8095|BeyondTV\d?|UnionTV|T507[DU]|5131[AG]|T610[KE]|T612B|9132[GS]|9137W|T430W|T431[DUQ]|T501[CL]|T768S|9199S|9494G|9460G|9466X|T60[79]DL|T506[AGKTF])(?:_(?:RU|EEA|TR))?(?:[);/ ]|$)'
device: 'smartphone'
models:
- regex: 'TCLGalaG60(?:\(9108A\))?(?:[);/ ]|$)'
Expand Down Expand Up @@ -21198,15 +21200,15 @@ TCL:
model: '305i'
- regex: '6102H(?:[);/ ]|$)'
model: '306'
- regex: 'T506D(?:[);/ ]|$)'
- regex: 'T506[AD]'
model: '405'
- regex: 'T506[GK]'
model: '406'
- regex: 'T506F'
model: '406i'
- regex: 'T506T'
model: ' 406s'
- regex: 'T507U(?:[);/ ]|$)'
- regex: 'T507[DU]'
model: '408'
- regex: 'T610[KE](?:[);/ ]|$)'
model: '40 SE'
Expand Down Expand Up @@ -26755,7 +26757,7 @@ Ulefone:

# UMIDIGI or UMI (www.umidigi.com)
UMIDIGI:
regex: 'UMI(?:DIGI)?[ _]|(?:A[5]_Pro|.+; A[79] Pro|S3_Pro|ROME[_ ]X|BISON|hammer_S|S2 LITE|London|Z2_PRO|C NOTE 2|A11 Pro Max|Power 3|Android 10(?:[\d.]*);(?: [\w-]+;)? (?:A3[SX]|A7S(?! 2020))|RP0[1234]|MT0[17]|MT1[01]|MP0[1-9]|MP1[3789]|MP2[034-79]|MP34|Plus E|S2_PRO|RP05|(?<! HP Engage )One Pro|Diamond_X|TG3DBG1MA|Android [67](?:[\d.]*);(?: [\w-]+;)? Z Pro|Android 8(?:[\d.]*);(?: [\w-]+;)? A1_PRO|RP08|MP3[38]|PR4JBX20A|PG2309GBA)(?:[;/) ]|$)'
regex: 'UMI(?:DIGI)?[ _]|(?:A[5]_Pro|.+; A[79] Pro|S3_Pro|ROME[_ ]X|BISON|hammer_S|S2 LITE|London|Z2_PRO|C NOTE 2|A11 Pro Max|Power 3|Android 10(?:[\d.]*);(?: [\w-]+;)? (?:A3[SX]|A7S(?! 2020))|RP0[1234]|MT0[17]|MT1[016]|MP0[1-9]|MP1[3789]|MP2[034-79]|MP34|Plus E|S2_PRO|RP05|(?<! HP Engage )One Pro|Diamond_X|TG3DBG1MA|Android [67](?:[\d.]*);(?: [\w-]+;)? Z Pro|Android 8(?:[\d.]*);(?: [\w-]+;)? A1_PRO|RP08|MP3[38]|PR4JBX20A|PG2309GBA)(?:[;/) ]|$)'
device: 'smartphone'
models:
- regex: 'MT01'
Expand All @@ -26770,6 +26772,9 @@ UMIDIGI:
- regex: 'MT11'
device: 'tablet'
model: 'G2 Tab'
- regex: 'MT16'
device: 'tablet'
model: 'G5 Tab'

- regex: '(A[13579]|Z2|S3)[_ ]Pro'
model: '$1 Pro'
Expand Down Expand Up @@ -33818,14 +33823,15 @@ Sunstech:

# Hotwav (www.hotwav.com)
Hotwav:
regex: '(?:Venus[_ ](?:X[12]|X1[0245679]|R8 PLUS|R[236-9]|R1[028]|X16-1)|Cosmos[ _](?:V8_lite|V19_Plus|V2[0-3]|U2?|V1[359]|V[45689]|V8-2)|Pearl K[123]|Magic Q8|Magic 5 Plus|Magic (?:[89]|1[13])|Hot[_ ]6|Symbol (?:M1|X|Max|R60|Pro|S4)|Symbol|Cyber (?:[78X]|15)|Cyber (?:9|13|X) Pro|Cosmos|W10 Pro|TAB R7|TAB R6 (?:Pro|Ultra)|T5 Pro| M5i|Hyper 7 Pro)(?:[);/ ]|$)|(?:Android 8(?:[\d.]*);(?: [\w-]+;)? M5 Plus|Android 12(?:[\d.]*);(?: [\w-]+;)? W10|Android 13(?:[\d.]*);(?: [\w-]+;)? (?:T7(?: Pro)?|T5 Max))(?: Build|[;)])'
regex: '(?:Venus[_ ](?:X[12]|X1[0245679]|R8 PLUS|R[236-9]|R1[028]|X16-1)|Cosmos[ _](?:V8_lite|V19_Plus|V2[0-3]|U2?|V1[359]|V[45689]|V8-2)|Pearl K[123]|Magic Q8|Magic 5 Plus|Magic (?:[89]|1[13])|Hot[_ ]6|Symbol (?:M1|X|Max|R60|Pro|S4)|Symbol|Cyber (?:[78X]|15)|Cyber (?:9|13|X) Pro|Cosmos|W10 Pro|TAB R[57]|TAB R6 (?:Pro|Ultra)|T5 Pro| M5i|Hyper 7 Pro)(?:[);/ ]|$)|(?:Android 8(?:[\d.]*);(?: [\w-]+;)? M5 Plus|Android 12(?:[\d.]*);(?: [\w-]+;)? W10|Android 13(?:[\d.]*);(?: [\w-]+;)? (?:T7(?: Pro)?|T5 Max))(?: Build|[;)])'
device: 'smartphone'
models:
# explicit smartphone models
- regex: 'Cosmos[ _]V8_lite(?:[);/ ]|$)'
model: 'Cosmos V8 Lite'
- regex: 'Hot[_ ]6?(?:[);/ ]|$)'
model: 'Hot 6'
- regex: 'Venus R8 PLUS(?:[);/ ]|$)'
- regex: 'Venus R8 PLUS'
model: 'Venus R8 Plus'
- regex: 'Venus[_ ]X16(?:-1)?(?:[);/ ]|$)'
model: 'Venus X16'
Expand All @@ -33851,20 +33857,23 @@ Hotwav:
model: '$1'
- regex: 'M5i(?:[);/ ]|$)'
model: 'M5i'
- regex: 'Pearl K(3) (2021)'
model: 'Pearl K$1 ($2)'
# explicit phablet models
- regex: 'Symbol R60'
device: 'phablet'
model: 'Symbol R60'
# explicit tablet models
- regex: 'TAB R6 Pro'
device: 'tablet'
model: 'Tab R6 Rro'
- regex: 'TAB R6 Ultra'
device: 'tablet'
model: 'Tab R6 Ultra'
- regex: 'TAB R7'
- regex: 'TAB R([57])'
device: 'tablet'
model: 'Tab R7'
- regex: 'Pearl K(3) (2021)'
model: 'Pearl K$1 ($2)'
model: 'Tab R$1'
# explicit general
- regex: '(Cosmos[ _](?:V19_Plus|V2[0-3]|U2?|V1[359]|V[45689])|Pearl K[123](?: Prime)?|Magic Q8|Magic 5 Plus|Magic (?:[89]|1[13])|Symbol (?:X|Max)|Cosmos|M5 Plus)(?:-2)?(?:[);/ ]|$)'
model: '$1'
- regex: 'Symbol Pro'
Expand Down Expand Up @@ -41091,7 +41100,7 @@ ROiK:

# Kinstone
Kinstone:
regex: '(KST103SD)'
regex: '(KST103SD(?:-L)?)'
device: 'tablet'
model: '$1'

Expand Down

0 comments on commit c010b7a

Please sign in to comment.