Silently Allow Usage data access for a 3rd party app

SW
Simon Wraith
Symec Technologies Ltd

I'm struggling to silently Allow 'Usage data access' for a 3rd party app, I'm using Mobicontrol 14.4 with devices AE enrolled, fully managed. 

I can get the Storage, Phone, location and battery permissions enabled without user action but not usage tracking.

Has anyone been able to achieve this, is there a script available?

5 years ago
Android Scripting
ANSWERS
D
DDMOD@SOTI
5 years ago (edited 5 years ago)

Hi Simon,

Thanks for posting the question!

You can use the below script to silently grant the usage data access permission:

afw_set_permission_grant_state <apk of the app> android.permission.USAGE_ACCESS_SETTINGS allow

 

 

SW
Simon Wraith
5 years ago

Thanks for your response.

I tried the below on a number of different manufacture devices, however, it it had no effect.

afw_set_permission_grant_state com.symec.optimise android.permission.USAGE_ACCESS_SETTINGS allow

Any other suggestions?

J
JVMOD@SOTI
5 years ago (edited 5 years ago)

Hello Simon,

Enroll device as Android Plus, run watchsettings on script -> click on that activity and note the value from the logs section,

re-enroll device as Android Enterprise and run writesecuresetting -sec SETTING:{value}

Please provide device details - 

Manufacturer -

Device OS - 

Model -

RC
Raymond Chan Diamond Contributor
5 years ago

Hi Simon,

Have you enabled the "write system settings" permission of the device agent before trying the script?

What are the version and build numbers of your device agent?

SW
Simon Wraith
5 years ago

See below the devices I've tied this on.

Samsung Galaxy Tab Active2   Android 9   T395XXU6CSL1/T395BTU6CSL1/T395XXU6CSL1 Agent 14.1.5.1059

Zebra TC57   Android 8.1.0   01-18-02.00-OG-U15-STD Agent 14.1.5.1059

Oneplus 6T Android 9 ONEPLUS A6013_45_190911 Agent 14.1.5.1059

SW
Simon Wraith
5 years ago

Hi Raymond

What's the best method to activate 'write system settings' for the agent?

See below the devices I've tied this on.

Samsung Galaxy Tab Active2   Android 9   T395XXU6CSL1/T395BTU6CSL1/T395XXU6CSL1 Agent 14.1.5.1059

Zebra TC57   Android 8.1.0   01-18-02.00-OG-U15-STD Agent 14.1.5.1059

Oneplus 6T Android 9 ONEPLUS A6013_45_190911 Agent 14.1.5.1059