How does "Restrict raw data" apply in android stack?

Does anyone know where in the Android stack the "Restrict raw data" setting is set and how it is applied? (For example, apps in the background are not allowed to use the phone data network while running in the background - WIFI is not affected.)

Thank you so much,

Dawg

+3


source to share


1 answer


Android uses iptables rules, as in any linux window, to restrict access to data to specific users (each user-loaded Android application runs under its own unique user ID).

If you want to remove a restriction for your application, you can remove this rule from the root shell.

iptables -F penalty_box -j REJECT

      

or on newer devices as shown below:



iptables -F bw_penalty_box -j REJECT

      

However, upon restart, Android will reapply the rule to iptables automatically. To prevent this from happening, you need to remove <uid-policy ...>

from " /data/system/netpolicy.xml ". Global Limits Background data parameters can be removed by setting the " limitBackgroundData strong>" attribute to "false" on the <policy-list ...>

node.

Along with the changes to netpolicy.xml, you must reboot for your changes to take effect.

Note. Any of these operations may be required to run as root .

0


source







All Articles