Internet blocking
If you want to specifically block access to the Internet for selected applications, and your device is embedded, then DroidWall is one of the options (use the blacklist mode). By the way, in the latest versions of the Google Play application, you will notice that the Internet permission will not even be indicated when installing the application - Google decided that it should not be shown there.
Custom rom
Custom ROMs, such as Cyanogen 7.x, have built-in permission management. After you enable the corresponding function in Settings → Cyanogenmod Settings, you can disable the necessary permissions by simply tapping the resolution on the system details screen. Cyanogenmod 9 and later no longer has this feature, because when the Cyanogenmod team considered adding permission to ICS, Google sent them an email, threatening to deny access to Google Play for devices running Cyanogenmod, in case The function is saved in versions of Android 4.x.
AppOps
Starting with version 4.3, Android contains App Ops - a limited built-in permission management system that is not accessible from the main user interface, but can be activated by calling an intent with the android.settings.APP_OPS_SETTINGS action. There is an AppOps Starter app in the gaming market that will begin its intention. If you use Nova launcher, you can create a shortcut for AppOps using Add> Shortcut> Actions> Settings> Application Operations (summary). You can also create a launcher yourself from the source code .
Disabling certain actions
Elixir2 can selectively disable actions and broadcast receivers, so in many cases it can disable certain advertising actions that their package names can easily recognize.
Modifying APK Files
You can also try changing the apk file itself to remove permissions that you don’t need, such as ApkTool (it’s very difficult and will not work if the developer takes security seriously).
PDroid
Another option for PDroid is that it requires fixing or recompiling your ROM. When you have a ROM created with the PDroid code, you can use the pDroid app on Google Play to customize each app as you like.
xPosed Framework
Another alternative that only requires a root, but not specialized ROM, is the Xposed Framework - a library that integrates itself into the Android system process and which provides an API for other applications (the so-called Xposed modules) to do the craziest things possible. At the implementation level, it allows modules to intercept any call to the Android API, change its parameters and attach hooks. Description is available on the XDA Developer Forum . After installing the framework, there are several modules that you can install, which will give you full control over the permissions of any application, including feeding fake or random data for a device ID, contacts, locations, country, etc. Look, for example, in modules such as xPrivacy, AppSettings or AndroidTuner - they all allow you to change permissions or ask for confirmation upon access. There are also modules for controlling broadcast receivers and trigger elements. I successfully run it on several devices with very good results, but subsequently discovered that the battery consumption increased significantly, not being sure whether this was due to the structure itself or certain modules.