Android Device Policy sync does not work until done manually

穿精又带淫゛_ 提交于 2020-06-27 08:49:09

问题


We have some android devices attached to Android Management API as fully managed work devices.

Now when we push out some changes to the device policy such as Factory Reset Disabled, Adjust Volume Button Disabled or any other such controls, the devices don't sync it immediately.

In fact we have to manually open up Android Device Policy and click on Sync for it actually get the changes.

This is really troublesome because at times the policy doesn't sync for hours together and the devices don't get the updates.

Also we load up the whole policy of the device for every control change because if not the other controls go back to null, can Patch or UpdateMask be used to avoid this?

Can someone please suggest me of what can be done to make sure the device gets the policy changes immediately ?


回答1:


I've run into the same issue, despite the documentation assuring that policy updates are applied to all devices that utilize the updated policy.

The best workaround I have found is to issue a REBOOT command to any device that I specifically want to update. While this usually leads to the device rebooting twice, it does immediately happen, and after the second reboot the device seems to pickup policy updates.




回答2:


Try with the settings: "appAutoUpdatePolicy": "ALWAYS",

"systemUpdate": { "type": "AUTOMATIC" }

I have my device update in a few seconds.



来源:https://stackoverflow.com/questions/57900783/android-device-policy-sync-does-not-work-until-done-manually

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!