Device-Owner now disables the Backup service

喜夏-厌秋 提交于 2019-12-05 17:35:23
RRiVEN

Because this is a top Google search for device owner and backup

Starting with Android O you can enable it using the DevicePolicyManager

setBackupServiceEnabled (ComponentName admin, Boolean enabled)

https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html

You can check if enables with isBackupServiceEnabled

Or set it

Pablo Carbajal

I got the same problem, furthermore adb backup would not run because the connection was denied (I assume because the backup service is down). Just as reference, this is one of the errors I saw in the logcat:

W/main(22253): type=1400 audit(0.0:106): avc: denied { ioctl } for path="socket:[76146]" dev="sockfs" ino=76146 ioctlcmd=7704 scontext=u:r:shell:s0tcontext=u:r:adbd:s0 tclass=unix_stream_socket permissive=0

Although I still haven't figured out how to restart the backup service (and I believe there is a way), I found a very helpful alternative to adb backup for accessing the data: https://stackoverflow.com/a/30265804/3317381

I have physical access to the devices running my app so this solution works well in my case. I hope this helps to at least recover your data under a development environment.

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