Skip to content

Commit

Permalink
feat(device) detect brand MicroMax model: Canvas Power
Browse files Browse the repository at this point in the history
feat(device) detect brand Sony model: Xperia Z4v (E6508)
feat(device) detect brand Kyocera models: DuraForce (E6560C, E6560T),
 DuraForce XD (E6790TM), Brigadier (E6782), DuraScout (E6782L)

issue matomo-org#6355
  • Loading branch information
sanchezzzhak committed Aug 26, 2020
1 parent b5503a1 commit f46ef84
Show file tree
Hide file tree
Showing 2 changed files with 154 additions and 4 deletions.
140 changes: 140 additions & 0 deletions Tests/fixtures/smartphone-16.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7259,3 +7259,143 @@
model: A95X R1
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; AQ5001 Canvas Power Build/LMY49J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.111 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 76.0.3809.111
engine: Blink
engine_version: ""
device:
type: smartphone
brand: MI
model: Canvas Power
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; E6560C) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.92 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 77.0.3865.92
engine: Blink
engine_version: ""
device:
type: smartphone
brand: KY
model: DuraForce
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; E6560T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 80.0.3987.87
engine: Blink
engine_version: ""
device:
type: smartphone
brand: KY
model: DuraForce
os_family: Android
browser_family: Chrome
-
user_agent: 'Mozilla/5.0 (Linux; Android 5.1.1; E6508 Build/28.0.A.7.27) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.76 Mobile Safari/537.36'
os:
name: Android
short_name: AND
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 47.0.2526.76
engine: Blink
engine_version: ""
device:
type: smartphone
brand: SO
model: Xperia Z4v
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; E6782) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 80.0.3987.87
engine: Blink
engine_version: ""
device:
type: smartphone
brand: KY
model: Brigadier
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; E6782L) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 80.0.3987.87
engine: Blink
engine_version: ""
device:
type: smartphone
brand: KY
model: DuraScout
os_family: Android
browser_family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 5.1.1; E6790TM) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36
os:
name: Android
short_name: AND
version: 5.1.1
platform: ""
client:
type: browser
name: Chrome Mobile
short_name: CM
version: 79.0.3945.93
engine: Blink
engine_version: ""
device:
type: smartphone
brand: KY
model: DuraForce XD
os_family: Android
browser_family: Chrome
18 changes: 14 additions & 4 deletions regexes/device/mobiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,11 @@ Apple:

# micromax
MicroMax:
regex: '(?:MicroMax[ \-\_]?[a-z0-9]+|Q327)|4560MMX|P70221 Build|YU(?:5040|5530)[);/ ]'
regex: '(?:MicroMax[ \-\_]?[a-z0-9]+|Q327)|4560MMX|P70221 Build|(?:YU(?:5040|5530)|AQ5001 Canvas Power)[);/ ]'
device: 'smartphone'
models:
- regex: 'AQ5001 Canvas Power'
model: 'Canvas Power'
- regex: 'AQ5001'
model: 'Canvas Juice 2'
- regex: '4560MMX[);/ ]'
Expand Down Expand Up @@ -4219,7 +4221,7 @@ Senseit:

# Sony & Sony Ericsson (combined as they are mixed up)
Sony:
regex: 'Sony(?: ?Ericsson)?|SGP|Xperia|(?:[4-9]0[12])SO|C1[569]0[45]|C2[01]0[45]|C230[45]|C530[236]|C550[23]|C6[56]0[236]|C6616|C68(?:0[26]|[34]3)|C69(?:0[236]|16|43)|D200[45]|D21(?:0[45]|14)|D22(?:0[236]|12|43)|D230[2356]|D240[36]|D25(?:02|33)|D510[236]|D530[36]|D5316|D5322|D5503|D58[03]3|D65(?:0[23]|43|63)|D66[03458]3|D66[14]6|D6708|E(?:20[0345]3|2006|210[45]|2115|2124|230[36]|2312|23[356]3|530[36]|53[3456]3|5506|55[356]3|56[46305][36]|58[02]3|65[35]3|66[0358]3|68[358]3)|I[34]312|I4332|F311[12356]|F331[13]|F321[12356]|F5[13]21|F5122|F813[12]|F833[12]|G312[135]|G311[26]|G322[136]|G3212|G331[123]|G3412|G3416|G342[136]|G823[12]|G834[123]|G8[14]4[12]|H(?:3113|3123|3133|3213|3223|3311|3321|4113|4133|4213|4233|4311|4331|4413|4433|82[167]6|83[12]4|8416|9436)|(?:WT|LT|SO|ST|SK|MK)[0-9]+[a-z]+[0-9]*(?: Build|\))|X?L39H|XM50[ht]|W960|portalmmm/2\.0 K|S3[69]h|SOL2[246]|SOV3[1-9]|SOV4[0-2]|X10[ia]v?|E1[05][ai]v?|MT[0-9]{2}[a-z]? Build|SO-0(?:[12]C|[345]D|[234]E|[1-5]F|[1-4]G|[1-4]H|[1-4]J|[1-5]K|1M|[1-3]L)|R800[aix]|J8270|J9110|J9210|J81[17]0|I[34]113|I3[12]23|I42[19]3|H9493|H8296|H8166|H4493|LiveWithWalkman|BRAVIA|SGP771|E3 Dual|A001SO|I4193'
regex: 'Sony(?: ?Ericsson)?|SGP|Xperia|(?:[4-9]0[12])SO|C1[569]0[45]|C2[01]0[45]|C230[45]|C530[236]|C550[23]|C6[56]0[236]|C6616|C68(?:0[26]|[34]3)|C69(?:0[236]|16|43)|D200[45]|D21(?:0[45]|14)|D22(?:0[236]|12|43)|D230[2356]|D240[36]|D25(?:02|33)|D510[236]|D530[36]|D5316|D5322|D5503|D58[03]3|D65(?:0[23]|43|63)|D66[03458]3|D66[14]6|D6708|E(?:20[0345]3|2006|210[45]|2115|2124|230[36]|2312|23[356]3|530[36]|53[3456]3|5506|55[356]3|56[46305][36]|58[02]3|65[35]3|66[0358]3|68[358]3)|I[34]312|I4332|F311[12356]|F331[13]|F321[12356]|F5[13]21|F5122|F813[12]|F833[12]|G312[135]|G311[26]|G322[136]|G3212|G331[123]|G3412|G3416|G342[136]|G823[12]|G834[123]|G8[14]4[12]|H(?:3113|3123|3133|3213|3223|3311|3321|4113|4133|4213|4233|4311|4331|4413|4433|82[167]6|83[12]4|8416|9436)|(?:WT|LT|SO|ST|SK|MK)[0-9]+[a-z]+[0-9]*(?: Build|\))|X?L39H|XM50[ht]|W960|portalmmm/2\.0 K|S3[69]h|SOL2[246]|SOV3[1-9]|SOV4[0-2]|X10[ia]v?|E1[05][ai]v?|MT[0-9]{2}[a-z]? Build|SO-0(?:[12]C|[345]D|[234]E|[1-5]F|[1-4]G|[1-4]H|[1-4]J|[1-5]K|1M|[1-3]L)|R800[aix]|J8270|J9110|J9210|J81[17]0|I[34]113|I3[12]23|I42[19]3|H9493|H8296|H8166|H4493|LiveWithWalkman|BRAVIA|SGP771|E3 Dual|A001SO|I4193|E6508'
device: 'smartphone'
models:
# SONY ERICSSON: explicit smartphone models
Expand Down Expand Up @@ -4504,6 +4506,8 @@ Sony:
model: 'Xperia Z3v'
- regex: 'SOV31|402SO|SO-03G'
model: 'Xperia Z4'
- regex: 'E6508'
model: 'Xperia Z4v'
- regex: 'SGP771'
model: 'Xperia Z4'
device: 'tablet'
Expand Down Expand Up @@ -7086,7 +7090,7 @@ K-Touch:

# kyocera (kyocera.co.jp, kyocera.com)
Kyocera:
regex: 'Kyocera|KWC-|QC-|(?:NP501KC|503KC|602KC|705KC|C51[27]0|C5155|C5215|C67[35]0|C6522N?|C6530N|C6740N?|C6743|E6[89]10|KYL2[13]|KYV31|KYV3[3-68]|KYF3[179]|KYY2[1-4]|S2151|KC-S701|S4-KC|KYV40U|KYV4[1-6]|KYV47-u|KC-S301AE|X3-KC|S6-KC)[;/) ]'
regex: 'Kyocera|KWC-|QC-|(?:NP501KC|503KC|602KC|705KC|C51[27]0|C5155|C5215|C67[35]0|C6522N?|C6530N|C6740N?|C6743|E6[89]10|KYL2[13]|KYV31|KYV3[3-68]|KYF3[179]|KYY2[1-4]|S2151|KC-S701|S4-KC|KYV40U|KYV4[1-6]|KYV47-u|KC-S301AE|X3-KC|S6-KC|E6560[CT]|E6782[L]?|E6790(?:TM)?)[;/) ]'
device: 'smartphone'
models:
# explicit smartphone models
Expand Down Expand Up @@ -7122,6 +7126,8 @@ Kyocera:
model: 'Hydro WAVE'
- regex: 'C6743'
model: 'Hydro Reach'
- regex: 'E6560[CT]'
model: 'DuraForce'
- regex: 'E6810'
model: 'DuraForce Pro'
- regex: 'E6910'
Expand Down Expand Up @@ -7168,10 +7174,14 @@ Kyocera:
model: 'Urbano V02'
- regex: 'KYV(?:45|38)[;/) ]'
model: 'Urbano V03'
- regex: '(?:Kyocera-)?E6790'
- regex: '(?:Kyocera-)?E6790(?:TM)?'
model: 'DuraForce XD'
- regex: 'X3-KC[;/) ]'
model: 'One X3'
- regex: 'E6782[;/) ]'
model: 'Brigadier'
- regex: 'E6782L[;/) ]'
model: 'DuraScout'
- regex: '(KC-S301AE)[;/) ]'
model: '$1'

Expand Down

0 comments on commit f46ef84

Please sign in to comment.