Open Atrate opened 4 years ago
But doesn't this mean that it needs to run a service all the time?
Can't an app be woken up by a broadcast without having a persistent bg service?
So, I will provide an option in the settings which will be disabled by default. It will block trackers only if it's enabled.
Detecting new package installation is not heard but detecting the package itself is a bit difficult. So, what I'll do is fetch all the packages and sort it using the date installed updated and only apply the blocking in the last one.
Can't an app be woken up by a broadcast without having a persistent bg service?
Unfortunately, no. After API 26, most of the system broadcasts has been hidden (I can detect package uninstalls though as it's not yet hidden). So, a background service is required. The alternative is to mark the last app launch time and find the newly installed/updated apps between that time and apply the action, which I think is better than running persistent services.
Related to #61
Now that AM can install APKs directly from file managers, this feature could be implemented more easily, at least only for apps installed through AM.
The alternative is to mark the last app launch time and find the newly installed/updated apps between that time and apply the action, which I think is better than running persistent services.
Since AM is going to have a firewall function, running an installation watchdog could be coupled with the FW service.
Now that AM can install APKs directly from file managers, this feature could be implemented more easily, at least only for apps installed through AM.
Yes, this could be possible.
Since AM is going to have a firewall function, running an installation watchdog could be coupled with the FW service.
Firewall won't use any service for root users, at least, for now. I do not intend to make it a complicated firewall system like AFWall+ or Netguard. It will have the basic internet blocking features, import/export (like any other rules) and, probably, hosts blocking and will be available throughout the app as batch ops and routine ops (the ecosystem is already very complicated in the backend). I may also add logging capabilities in future. Most users should be satisfied with only these features. Besides, merging root/no-root firewall is going to be a difficult job.
Since App Manager uses server-client mechanism and server (which doesn't have any impact on battery) runs in the background all the time, this can be achieved more easily (since it's only specific to root users) in the following way:
Now that AM can install APKs directly from file managers, this feature could be implemented more easily, at least only for apps installed through AM.
This feature has been implemented in fb691608.
I looked and poked around but could not find anything on this aspect - can arbitrary components also be added to auto revoke on install (eg I want to automatically disable anything with the word "lytic" or "metric" in it), and other permissions like network; defaulting anything new to POLICY_REJECT_ALL
Related to: #28, #35, #39
AppManager could utilize the
android.intent.action.PACKAGE_ADDED
broadcast receiver to automatically disable tracker components in apps the moment they are installed.