0

I have an app that I don't want to have network access. It does work when I put the phone in plane mode, but simply blocking it with AFWall causes it to hang, probably waiting for network replies. It seems to check, if the device has an internet connection and switch to an offline mode based on that.

Is there a way to not only block the network access, but also fake the device's connection status for specific apps? Solutions needing root or Xposed are fine with me.

3
  • 1
    Not sure, but Xprivacy might be able to deal with it. AFAIK it fakes "network not available" instead of denying access to network, or at least can do that.
    – Izzy
    Commented Nov 17, 2016 at 11:19
  • @Izzy I just tested XPrivacy and it works as expected. I additionally blocked network access with AFWall to make sure it does not try to connect even with faked status and the app used its offline mode. If you post it as an answer I'll accept it.
    – crater2150
    Commented Nov 17, 2016 at 11:41
  • Thanks for the feedback! Made it an answer then with additional details. You might wish to mark that answer "accepted" to show it worked for you. Enjoy!
    – Izzy
    Commented Nov 17, 2016 at 12:08

1 Answer 1

1

You can use Xprivacy for that. In case you don't know, this is an XPosed module (available from the XPosed repo) dealing with privacy related permissions; details can be found in its XDA Thread). Instead of simply blocking access to the internet, Xprivacy fakes its inavailablity. To be on the safe side, you additionally can block internet access for that app using a firewall like AFWall+ – cannot hurt.

Side-effect: You can block/fake a lot more – e.g. your location, device IDs and other things. This can be done by defining a fixed value, or even in "random mode" – having Xprivacy either randomize data on boot, or even on each access.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .