
BackgroundRestrictor
管理 RUN_IN_BACKGROUND 权限
Android 7.0 added a new permission called RUN_IN_BACKGROUND, which can restrict
background behavior of apps (blocking broadcast receivers, services, etc.).
However this permission is fully hidden and there's no way to activate it
besides using adb commands.
You can revoke RUN_IN_BACKGROUND permission on any app by executing following
command in the adb shell:
cmd appops set <package_name> RUN_IN_BACKGROUND ignore
To grant this permission back, one should execute this:
cmd appops set <package_name> RUN_IN_BACKGROUND allow
To check status of RUN_IN_BACKGROUND permission on any app, one can execute this
command:
cmd appops get <package_name> RUN_IN_BACKGROUND
<package_name> is obviously name of application package, be it
com.android.calculator2 or anything else.
By disabling RUN_IN_BACKGROUND, apps such as Hangouts or Facebook will
completely stop syncing in the background until you open them up. You can find
more information about these commands by reading this
article.
background behavior of apps (blocking broadcast receivers, services, etc.).
However this permission is fully hidden and there's no way to activate it
besides using adb commands.
You can revoke RUN_IN_BACKGROUND permission on any app by executing following
command in the adb shell:
cmd appops set <package_name> RUN_IN_BACKGROUND ignore
To grant this permission back, one should execute this:
cmd appops set <package_name> RUN_IN_BACKGROUND allow
To check status of RUN_IN_BACKGROUND permission on any app, one can execute this
command:
cmd appops get <package_name> RUN_IN_BACKGROUND
<package_name> is obviously name of application package, be it
com.android.calculator2 or anything else.
By disabling RUN_IN_BACKGROUND, apps such as Hangouts or Facebook will
completely stop syncing in the background until you open them up. You can find
more information about these commands by reading this
article.
版本
尽管下面提供了 APK 安装包的下载选项,但你应该注意,以这种方式安装将不会收到更新通知,这是一种不太安全的下载方式。 我们建议你安装使用 F-Droid 客户端。
下载 F-Droid-
该版本需要 Android 7.0 及以上版本。
此安装包由 F-Droid 构建并签名,且保证与此源代码 tarball 保持一致。