Skip to content

Commit

Permalink
feat(device) detect brand Digma model: HIT 3G (HT7071MG)
Browse files Browse the repository at this point in the history
feat(device) detect brand Doogee model: Hitman DG850
feat(device) detect brand Irbis models: TZ01, TZ02, TZ56, TZ93
feat(device) detect brand Turbo-X model: Hive V 3G
feat(device) detect brand OnePlus models: 7 (GM1905), 7T Pro (HD1913)
fix(device) detect brand Xiaomi model: HM NOTE 1W
feat(device) detect brand MTC models: MTC SMART Run, 968

issue matomo-org#6355
  • Loading branch information
sanchezzzhak committed Aug 21, 2020
1 parent 34915e2 commit e1b103d
Show file tree
Hide file tree
Showing 2 changed files with 265 additions and 19 deletions.
240 changes: 240 additions & 0 deletions Tests/fixtures/smartphone-16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4419,3 +4419,243 @@
model: V989 Air Core 8
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; HIT 3G HT7071MG) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.136
engine: Blink
engine_version: ""
device:
type: tablet
brand: D2
model: HIT 3G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Hitman_DG850) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.96 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 78.0.3904.96
engine: Blink
engine_version: ""
device:
type: smartphone
brand: DO
model: Hitman DG580
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Hive V 3G) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.136 Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.136
engine: Blink
engine_version: ""
device:
type: tablet
brand: TR
model: Hive V 3G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; HM NOTE 1W) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: phablet
brand: XI
model: Redmi Note
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; IRBIS TZ01) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 76.0.3809.132
engine: Blink
engine_version: ""
device:
type: tablet
brand: I6
model: TZ01
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; IRBIS TZ02 Build/KVT49L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.158 Safari/537.36 OPR/47.0.2249.129167
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Opera
short_name: OP
version: 47.0.2249.129167
engine: Blink
engine_version: ""
device:
type: tablet
brand: I6
model: TZ02
os_family: Android
browser_family: Opera
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; IRBIS TZ56) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.79 Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 79.0.3945.79
engine: Blink
engine_version: ""
device:
type: tablet
brand: I6
model: TZ56
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; IRBIS TZ93) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.92 Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome
short_name: CH
version: 77.0.3865.92
engine: Blink
engine_version: ""
device:
type: tablet
brand: I6
model: TZ93
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; MTC SMART Run Build/ARK) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3435.52 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.4.2
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 60.0.3435.52
engine: Blink
engine_version: ""
device:
type: smartphone
brand: M9
model: Smart Run 4G
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; GM1905) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.116 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "10"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 79.0.3945.116
engine: Blink
engine_version: ""
device:
type: smartphone
brand: 'ON'
model: "7"
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; HD1913) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: "10"
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 80.0.3987.87
engine: Blink
engine_version: ""
device:
type: smartphone
brand: 'ON'
model: 7T Pro
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 4.0.4; MTC_968 Build/ICECREAM) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 4.0.4
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 42.0.2311.111
engine: Blink
engine_version: ""
device:
type: smartphone
brand: M9
model: "968"
os_family: Android
browser_family: Chrome
44 changes: 25 additions & 19 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1591,13 +1591,11 @@ Amoi:

# Ainol
Ainol:
regex: 'Numy|(?:novo[0-9]|Novo 10 Hero|AX10PRO|NUMY3GAX9|NOVO10 Spark)[);/ ]'
regex: 'Numy|novo[0-9]|Novo 10 Hero|AX10PRO|NUMY3GAX9|NOVO10 Spark'
device: 'tablet'
models:
- regex: 'Numy 3G AX1'
model: 'Novo 7 Numy AX1 3G'
- regex: 'NOVO7[);/ ]'
model: 'Novo 7'
- regex: 'NOVO10 Spark'
model: 'Novo 10 Spark'
- regex: 'AX10PRO'
Expand All @@ -1612,12 +1610,16 @@ Ainol:
model: 'Numy 3G AX9'
- regex: '(Novo 10 Hero QuadCore)'
model: '$1'

- regex: 'Novo7 Flame[);/ ]'
model: 'Novo 7 Flame'
- regex: 'NOVO7[);/ ]'
model: 'Novo 7'
- regex: 'Numy[ _]([^;/]+) Build'
model: 'Numy $1'
- regex: 'Novo([0-9]+)[ \-]([^;/]+) Build'
model: 'Novo $1 $2'


# Archos
Archos:
regex: '(?:YL-)?Archos|A50TI[);/ ]'
Expand Down Expand Up @@ -3766,10 +3768,10 @@ Digiland:

# Digma
Digma:
regex: 'Digma[_ ]([^;/]+) Build|HIT HT707[10]MG|CITI ATL 4G|CITI Octa 80|CITI 1902 3G|CITI Z530 3G|(CITI[_ ](?:[A-Z0-9]+)[_ ][34]G)[ _]C[ST](11[459]4MG|3001ML|500[67]PG|8209MG|8139ML|8152ML)|HIT 4G|HT7074ML|IDX5|(iDx10|iDx7)|MVM900H(?:WZ|C)|MVM908HCZ|(iDxD8 3G|iDxD10 3G|iDrQ10 3G|iDxD[45]|iDxQ5|iD[nx]D7(?:[_ ]3G)?)|PS604M|PT452E|Linx A400 3G LT4001PG|Linx C500 3G LT5001PG|Linx PS474S|LS504[01]PL|LT40(47|54)MG|LS405[01]MG|LS5053ML|LT5048MG|LT5052ML|HT5035PG|HT4039PG|LT4049PG|NS6902QL|NS9797MG|TT1004PG|TT7025MG|((?:Optima|Platina|Plane)[ _](?:[EM])?(?:[0-9\.ST]+|Prime)(?:[ _][43]G)?)|(VOX[ _](?:[0-9\.A-Z]+)[_ ][43]G)'
regex: 'Digma[_ ]([^;/]+) Build|HIT HT707[10]MG|CITI ATL 4G|CITI Octa 80|CITI 1902 3G|CITI Z530 3G|(CITI[_ ](?:[A-Z0-9]+)[_ ][34]G)[ _]C[ST](11[459]4MG|3001ML|500[67]PG|8209MG|8139ML|8152ML)|HIT 4G|HT7074ML|IDX5|(iDx10|iDx7)|MVM900H(?:WZ|C)|MVM908HCZ|(iDxD8 3G|iDxD10 3G|iDrQ10 3G|iDxD[45]|iDxQ5|iD[nx]D7(?:[_ ]3G)?)|PS604M|PT452E|Linx A400 3G LT4001PG|Linx C500 3G LT5001PG|Linx PS474S|LS504[01]PL|LT40(47|54)MG|LS405[01]MG|LS5053ML|LT5048MG|HT7071MG|LT5052ML|HT5035PG|HT4039PG|LT4049PG|NS6902QL|NS9797MG|TT1004PG|TT7025MG|((?:Optima|Platina|Plane)[ _](?:[EM])?(?:[0-9\.ST]+|Prime)(?:[ _][43]G)?)|(VOX[ _](?:[0-9\.A-Z]+)[_ ][43]G)'
device: 'smartphone'
models:
- regex: 'HIT HT707[10]MG'
- regex: 'HIT(?: 3G)? HT707[10]MG'
model: 'HIT 3G'
device: 'tablet'
- regex: 'iDx5'
Expand Down Expand Up @@ -3879,7 +3881,7 @@ DoCoMo:

# Doogee
Doogee:
regex: 'DOOGEE[ _-]|Valencia2_Y100pro|Y100_Plus|X5max(?:[_ ]PRO)?|(KISSME|BIGBOY|COLLO[23]?|DAGGER|DISCOVERY2?|FIND|HOTWIND|LATTE|MAX|MINT|MOON|PIXELS|RAINBOX|TURBO|VALENCIA|VOYAGER2?|TITANS2?)[ -_](DG[0-9]+C?)[);/ ]|BL[579]000[);/ ]|BL12000|BL5500[_ ]Lite|X9 Mini|LEO_DG280|Y9Plus'
regex: 'DOOGEE[ _-]|Valencia2_Y100pro|Y100_Plus|X5max(?:[_ ]PRO)?|(KISSME|BIGBOY|COLLO[23]?|DAGGER|DISCOVERY2?|FIND|HOTWIND|LATTE|MAX|MINT|MOON|PIXELS|RAINBOX|TURBO|VALENCIA|VOYAGER2?|TITANS2?)[ -_](DG[0-9]+C?)[);/ ]|BL[579]000[);/ ]|BL12000|BL5500[_ ]Lite|X9 Mini|LEO_DG280|Y9Plus|Hitman_DG850'
device: 'smartphone'
models:
- regex: 'Y100_Plus[);/ ]'
Expand All @@ -3898,6 +3900,8 @@ Doogee:
model: 'BL12000'
- regex: 'KISSME-DG580'
model: 'Kissme DG580'
- regex: 'Hitman_DG850'
model: 'Hitman DG580'
- regex: 'X9 Mini'
model: 'X9 Mini'
- regex: '(X5max(?:[_ ]PRO)?)'
Expand Down Expand Up @@ -6137,7 +6141,7 @@ iRulu:

# Irbis
Irbis:
regex: 'TZ(1(?:00|42|50|84|65|7[035-89]|9[578])|49|7(?:1[2467]|2[01567]|37|4[257]|5[23457]|62|72|7[17]|8[1]|9[47])|8(?:[34]1|5[3-8]|6[45]|7[2478]|8[1-5]|9[0127])|96[0-9])|TZ(?:one|art|HIT|81L)|(SP(?:0[56]|2[01]|4[1-36]|40[12]|45[345]|50|51[0147]|531|55[012]))[;)\ ]'
regex: 'IRBIS|TZ(1(?:00|42|50|84|65|7[035-89]|9[578])|49|7(?:1[2467]|2[01567]|37|4[257]|5[23457]|62|72|7[17]|8[1]|9[47])|8(?:[34]1|5[3-8]|6[45]|7[2478]|8[1-5]|9[0127])|96[0-9])|TZ(?:one|art|HIT|81L)|(SP(?:0[56]|2[01]|4[1-36]|40[12]|45[345]|50|51[0147]|531|55[012]))[;)\ ]'
device: 'tablet'
models:
- regex: '(TZ(?:[0-9]+)|TZ(?:one|art|HIT|81L))[;)\ ]'
Expand Down Expand Up @@ -9362,7 +9366,7 @@ Onda:

# OnePlus
OnePlus:
regex: '(?:du_)?ONEPLUS|(?:A0001|A200[135]|A300[03]|A3010|A5000|A600[03]|A601[03]|E100[135]|GM191[03517]|GM190[013]|HD191[01]|HD190[01357]|HD1925|IN201[037]|IN202[03])(?: Build|\))'
regex: '(?:du_)?ONEPLUS|(?:A0001|A200[135]|A300[03]|A3010|A5000|A600[03]|A601[03]|E100[135]|GM191[03517]|GM190[0135]|HD191[013]|HD190[01357]|HD1925|IN201[037]|IN202[03])(?: Build|\))'
device: 'smartphone'
models:
- regex: 'IN202[03][);/ ]'
Expand All @@ -9371,11 +9375,11 @@ OnePlus:
model: '8'
- regex: 'GM191[03517][);/ ]'
model: '7 Pro'
- regex: 'GM190[013][);/ ]'
- regex: 'GM190[0135][);/ ]'
model: '7'
- regex: 'HD190[01357][);/ ]'
model: '7T'
- regex: 'HD191[01][);/ ]'
- regex: 'HD191[013][);/ ]'
model: '7T Pro'
- regex: 'HD1925[);/ ]'
model: '7T Pro 5G'
Expand Down Expand Up @@ -11763,12 +11767,16 @@ Sendo:

# Turbo-X
Turbo-X:
regex: 'Turbo-X'
regex: 'Turbo-X|Hive V 3G'
device: 'smartphone'
models:
- regex: 'Turbo-X Ice[);/ ]'
device: 'tablet'
model: 'Ice'
- regex: 'Hive V 3G[);/ ]'
device: 'tablet'
model: 'Hive V 3G'

- regex: 'Turbo-X Tablet([^;/]+) Build'
device: 'tablet'
model: 'Tablet$1'
Expand Down Expand Up @@ -13310,7 +13318,7 @@ POCO:

# Xiaomi
Xiaomi:
regex: 'Xiaomi(?!/(?:Miui|Mint[ ])Browser)|Mi9 Pro 5G|(?:MI [a-z0-9]+|Mi-4c|MI-One[ _]?[a-z0-9]+|MIX(?: 2S?)?)[);/ ]|HM (?:[^/;]+) (?:Build|MIUI)|(?:2014501|2014011|201481[12378]|201302[23]|2013061) Build|Redmi|MI_NOTE_Pro|POCOPHONE|(?:SHARK )?(KLE|MBU)-A0|SKR-[AH]0|SKW-[AH]0|POCO F1|DLT-[AH]0|MIBOX[234]([_ ]PRO)?|MiTV4[CSX]?|MiTV-(MSSP1|AXSO0)|AWM-A0|MI CC 9 Meitu Edition|MiBOX1S|MiTV4A|M2002J9E|HM2014819|WT88047|M2004J(?:7[AB]|19)C|M2003J15SC|HM NOTE 1LTE'
regex: 'Xiaomi(?!/(?:Miui|Mint[ ])Browser)|Mi9 Pro 5G|(?:MI [a-z0-9]+|Mi-4c|MI-One[ _]?[a-z0-9]+|MIX(?: 2S?)?)[);/ ]|HM (?:[^/;]+) (?:Build|MIUI)|(?:2014501|2014011|201481[12378]|201302[23]|2013061) Build|Redmi|MI_NOTE_Pro|POCOPHONE|(?:SHARK )?(KLE|MBU)-A0|SKR-[AH]0|SKW-[AH]0|POCO F1|DLT-[AH]0|MIBOX[234]([_ ]PRO)?|MiTV4[CSX]?|MiTV-(MSSP1|AXSO0)|AWM-A0|MI CC 9 Meitu Edition|MiBOX1S|MiTV4A|M2002J9E|HM2014819|WT88047|M2004J(?:7[AB]|19)C|M2003J15SC|HM NOTE 1(?:LTE|W)'
device: 'smartphone'
models:
# specific smartphone models
Expand Down Expand Up @@ -13428,7 +13436,7 @@ Xiaomi:
- regex: '(MiTV)(4[CSX]|4)[);/ ]'
model: '$1 $2'
device: 'tv'
- regex: 'HM NOTE 1W (?:Build|MIUI)'
- regex: 'HM NOTE 1W[);/ ]'
device: 'phablet'
model: 'Redmi Note'
- regex: 'HM NOTE 1TD (?:Build|MIUI)'
Expand Down Expand Up @@ -14644,12 +14652,10 @@ Lemhoov:
model: '$1'
# MTC
MTC:
regex: 'MTC[ _](97[82]|970|982[OT]|982|1078)|(MTC_)?SMART[ _]?(Race[2]?|Sprint|Run|Surf[2]?)[ _]4G|MTC975'
regex: 'MTC[ _](968|97[82]|970|982[OT]?|1078)|(?:MTC[_ ])?SMART[ _]?(?:Race[2]?|Sprint|Run|Surf[2]?)[ _]4G|MTC975|MTC SMART Run'
device: 'smartphone'
models:
- regex: 'MTC[ _](97[82]|970[H]?|982[OT]|982)'
model: '$1'
- regex: 'MTC(975)'
- regex: 'MTC[ _]?(97[258]|970[H]?|982[OT]?|968)'
model: '$1'
- regex: 'MTC[ _](1078)'
model: '$1'
Expand All @@ -14660,7 +14666,7 @@ MTC:
model: 'Smart Race 2 4G'
- regex: '(MTC_)?SMART[ _]Sprint[ _]4G'
model: 'Smart Sprint 4G'
- regex: 'SMART[ _]?Run[ _]4G'
- regex: 'SMART[ _]?Run(?:[ _]4G)?'
model: 'Smart Run 4G'
- regex: 'SMART[ _]Surf2[ _]4G'
model: 'Smart Surf 2 4G'
Expand Down

0 comments on commit e1b103d

Please sign in to comment.