Summary | OS version detection when using android/gmail app doesn't work |
Queue | Synchronization |
Queue Version | FRAMEWORK_5_2 |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | manuel-horde (at) mausz (dot) at |
Created | 06/09/2017 (3002 days ago) |
Due | |
Updated | 06/11/2017 (3000 days ago) |
Assigned | 06/09/2017 (3002 days ago) |
Resolved | 06/11/2017 (3000 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
It looks like this is either OS and/or device vendor dependent. My
Note 5 is on Android 7.0 and also sends the OS field.
mysql> select distinct device_agent, device_properties like
-> '%"Settings:OS%' AS hasOS from horde_activesync_device where
-> device_type like 'Android' order by device_agent;
+-----------------------------------------------------+----------+
| device_agent | hasOS |
+-----------------------------------------------------+----------+
| Android-Mail/7.5.21.158049789.release | 1 |
| Nine-nobleltevzw/LMY47X | 1 |
+-----------------------------------------------------+----------+
Anyway, I've added a check that doesn't rely on the OS version now.
The downside is that this will only work for newly added device
entries since the multiplex value is persisted to storage once
determined.
You can use the activesync_device_modify hook to override existing
device entries. There is example code in the
horde/config/hooks.php.dist file. Of course, if you are feeling
adventurous, you could also just manually change the multiplex value
to 0 in the device_properties hash directly in the RDBMS.
gmail/Android-Mail app later.
non-multiplexed collections.
commit 3af184994febaa4971a8e586364b8a5dc79f6c7b
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date: Sun Jun 11 10:50:32 2017 -0400
Bug: 14655Force newer android Gmail clients to no multiplex.framework/ActiveSync/lib/Horde/ActiveSync/Device.php | 5 +++++
1 file changed, 5 insertions(+)
http://github.com/horde/horde/commit/3af184994febaa4971a8e586364b8a5dc79f6c7b
property. Same for all android devices with "Android-Mail" being the
device_agent.
mysql> select count(*) from horde_activesync_device where device_type
like 'Android' \G
count(*): 74
mysql> select count(*) from horde_activesync_device where device_type
like 'Android' and device_properties like '%"Settings:OS"%'\G
count(*): 52
mysql> select count(*) from horde_activesync_device where device_agent
like 'Android-Mail/%'\G
count(*): 12
mysql> select count(*) from horde_activesync_device where device_agent
like 'Android-Mail/%' and device_properties like '%"Settings:OS"%'\G
count(*): 0
mysql> select distinct device_agent, device_properties like
'%"Settings:OS%' AS hasOS from horde_activesync_device where
device_type like 'Android' order by device_agent;
+----------------------------------------------------------------+-------+
| device_agent | hasOS |
+----------------------------------------------------------------+-------+
| AirWatch Boxer (SM-G900F; Android 6.0.1) Version 3.10.1.13/337 | 0 |
| Android-Mail/6.10.23.137993986.release | 0 |
| Android-Mail/6.10.9.136347105.release | 0 |
| Android-Mail/6.5-1.123769152.release | 0 |
| Android-Mail/6.9.133109232.release | 0 |
| Android-Mail/6.9.25.134833125.release | 0 |
| Android-Mail/7.2.12.147797444.release | 0 |
| Android-Mail/7.2.26.149804060.release | 0 |
| Android-Mail/7.3.26.153522445.release | 0 |
| Android-Mail/7.4.23.154506495.release | 0 |
| Android-Mail/7.5.21.158049789.release | 0 |
| Android-Mail/7.5.7.156101332.release | 0 |
| Android/4.0.3-EAS-1.3 | 0 |
| Android/4.0.3-EAS-1.3 | 1 |
| Android/4.0.4-EAS-1.3 | 1 |
| Android/4.1.1-EAS-1.3 | 1 |
| Android/4.1.2-EAS-1.3 | 1 |
| Android/4.2.1-EAS-1.3 | 1 |
| Android/4.2.2-EAS-1.3 | 0 |
| Android/4.2.2-EAS-1.3 | 1 |
| Android/4.4-EAS-1.3 | 1 |
| Android/4.4.2-EAS-1.3 | 0 |
| Android/4.4.2-EAS-1.3 | 1 |
| Android/4.4.4-EAS-2.0 | 0 |
| Android/4.4.4-EAS-2.0 | 1 |
| Android/5.0-EAS-2.0 | 0 |
| Android/5.0-EAS-2.0 | 1 |
| Android/5.0.2-EAS-2.0 | 1 |
| Android/5.1-EAS-2.0 | 1 |
| Android/5.1.1-EAS-1.3 | 1 |
| Android/5.1.1-EAS-2.0 | 1 |
| Android/6.0-EAS-2.0 | 1 |
| Android/6.0.1-EAS-2.0 | 1 |
| Android/7.0-EAS-2.0 | 1 |
| Nine-C6603/10.6.A.0.454 | 1 |
| Nine-occam/LMY47V | 1 |
| samsungGTI9300/6.0.1-EAS-2.0 | 1 |
| Tasks+Notes/8.2.1 | 1 |
+----------------------------------------------------------------+-------+
38 rows in set (0.00 sec)
with the UserAgent, though it might be due to this test device being
on Android 5, and not 6.
other users as well.
Our horde installation has something about 19k users currently
registered (accounts get created on login) but (thankfully) only 350
have ActiveSync devices registered. From this data I can tell that no
Android 7 devices has an OS property. Same for all android devices
with "Android-Mail" being the device_agent. If interested I can export
you the activesync_device table.
I'll verify the non-multiplex types supported by the
gmail/Android-Mail app later.
with the UserAgent, though it might be due to this test device being
on Android 5, and not 6.
[409][2017-06-10T13:11:20-04:00] I: <Provision:Provision>
[409][2017-06-10T13:11:20-04:00] I: <Settings:DeviceInformation>
[409][2017-06-10T13:11:20-04:00] I: <Settings:Set>
[409][2017-06-10T13:11:20-04:00] I: <Settings:Model>
[409][2017-06-10T13:11:20-04:00] I: SM-G900V
[409][2017-06-10T13:11:20-04:00] I: </Settings:Model>
[409][2017-06-10T13:11:20-04:00] I: <Settings:FriendlyName>
[409][2017-06-10T13:11:20-04:00] I: SM-G900V
[409][2017-06-10T13:11:20-04:00] I: </Settings:FriendlyName>
[409][2017-06-10T13:11:20-04:00] I: <Settings:OS>
[409][2017-06-10T13:11:20-04:00] I: Android 5.0
[409][2017-06-10T13:11:20-04:00] I: </Settings:OS>
[409][2017-06-10T13:11:20-04:00] I: <Settings:UserAgent>
[409][2017-06-10T13:11:20-04:00] I: Android-Mail/7.5.21.158049789.release
[409][2017-06-10T13:11:20-04:00] I: </Settings:UserAgent>
[409][2017-06-10T13:11:20-04:00] I: </Settings:Set>
[409][2017-06-10T13:11:20-04:00] I: </Settings:DeviceInformation>
Assigned to Michael Rubinsky
State ⇒ Feedback
collections on all or only certain collection types?
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Synchronization
Summary ⇒ OS version detection when using android/gmail app doesn't work
Type ⇒ Bug
Priority ⇒ 1. Low
version being sent by the client. However the gmail app only sends the
UserAgent, no OS version or any other properties to detect the OS.
Thus everything gets multiplexed / no support for separate calendars.
A currently up2date android / gmail app sends these properties:
device_type: Android
device_agent: Android-Mail/7.5.21.158049789.release
device_supported:
a:1:{s:8:"Contacts";a:58:{i:0;s:22:"POOMCONTACTS:FirstName";i:1;s:21:"POOMCONTACTS:LastName";i:2;s:23:"POOMCONTACTS:MiddleName";i:3;s:19:"POOMCONTACTS:Suffix";i:4;s:24:"POOMCONTACTS:CompanyName";i:5;s:21:"POOMCONTACTS:JobTitle";i:6;s:26:"POOMCONTACTS:Email1Address";i:7;s:26:"POOMCONTACTS:Email2Address";i:8;s:26:"POOMCONTACTS:Email3Address";i:9;s:33:"POOMCONTACTS:Business2PhoneNumber";i:10;s:32:"POOMCONTACTS:BusinessPhoneNumber";i:11;s:17:"POOMCONTACTS2:MMS";i:12;s:30:"POOMCONTACTS:BusinessFaxNumber";i:13;s:30:"POOMCONTACTS2:CompanyMainPhone";i:14;s:26:"POOMCONTACTS:HomeFaxNumber";i:15;s:28:"POOMCONTACTS:HomePhoneNumber";i:16;s:29:"POOMCONTACTS:Home2PhoneNumber";i:17;s:30:"POOMCONTACTS:MobilePhoneNumber";i:18;s:27:"POOMCONTACTS:CarPhoneNumber";i:19;s:29:"POOMCONTACTS:RadioPhoneNumber";i:20;s:24:"POOMCONTACTS:PagerNumber";i:21;s:34:"POOMCONTACTS:AssistnamePhoneNumber";i:22;s:23:"POOMCONTACTS2:IMAddress";i:23;s:24:"POOMCONTACTS2:IMAddress2";i:24;s:24:"POOMCONTACTS2:IMAddress3";i:25;s:25
:"POOMCONTACTS:BusinessCity";i:26;s:28:"POOMCONTACTS:BusinessCountry";i:27;s:31:"POOMCONTACTS:BusinessPostalCode";i:28;s:26:"POOMCONTACTS:BusinessState";i:29;s:27:"POOMCONTACTS:BusinessStreet";i:30;s:21:"POOMCONTACTS:HomeCity";i:31;s:24:"POOMCONTACTS:HomeCountry";i:32;s:27:"POOMCONTACTS:HomePostalCode";i:33;s:22:"POOMCONTACTS:HomeState";i:34;s:23:"POOMCONTACTS:HomeStreet";i:35;s:22:"POOMCONTACTS:OtherCity";i:36;s:25:"POOMCONTACTS:OtherCountry";i:37;s:28:"POOMCONTACTS:OtherPostalCode";i:38;s:23:"POOMCONTACTS:OtherState";i:39;s:24:"POOMCONTACTS:OtherStreet";i:40;s:28:"POOMCONTACTS:YomiCompanyName";i:41;s:26:"POOMCONTACTS:YomiFirstName";i:42;s:25:"POOMCONTACTS:YomiLastName";i:43;s:22:"POOMCONTACTS2:NickName";i:44;s:26:"POOMCONTACTS:AssistantName";i:45;s:25:"POOMCONTACTS2:ManagerName";i:46;s:19:"POOMCONTACTS:Spouse";i:47;s:23:"POOMCONTACTS:Department";i:48;s:18:"POOMCONTACTS:Title";i:49;s:27:"POOMCONTACTS:OfficeLocation";i:50;s:24:"POOMCONTACTS2:CustomerId";i:51;s:26:"POOMCONTACTS2:Gover
nmentId";i:52;s:25:"POOMCONTACTS2:AccountName";i:53;s:24:"POOMCONTACTS:Anniversary";i:54;s:21:"POOMCONTACTS:Birthday";i:55;s:20:"POOMCONTACTS:WebPage";i:56;s:20:"POOMCONTACTS:Picture";i:57;s:19:"POOMCONTACTS:FileAs";}}
device_properties:
a:5:{s:16:"announcedVersion";s:23:"2.5,12.0,12.1,14.0,14.1";s:9:"userAgent";s:37:"Android-Mail/7.5.21.158049789.release";s:7:"version";s:4:"14.1";s:7:"blocked";N;s:9:"multiplex";i:15;}
where as "Android-Mail/7.5.21.158049789.release" is the current gmail
app version.
Also the current code in getMajorVersion and getMinorVersion
incorrectly parses the useragent as Android 7.5
I assume the best thing to do is to add "Android-Mail" to the parsing
and return some fixed android version. e.g 6.0 or something. Plus
extend the _sniffMultiplex method. I can send a PR for that if desired.