6

I want create firewall app for Android that when an app wants to connect to internet shows app's name and let the user block it for permanent or block it temporarily or allow it and when that app wants to receive data from network shows app name and user can allow or deny it.

I viewed this question: create firewall, but it doesn't cover my needs.

Any suggestion to detect which apps have access to network and / or receive data from it?

Thanks!

Community
  • 1
  • 1
Troy
  • 101
  • 1
  • 8
  • 1
    I think Commonsware has already answered your question which states it is not possible to monitor any other app for security reason – Jibran Khan Apr 25 '15 at 10:53

2 Answers2

7

This is quite possible, and has been done before.
See these applications/implementations:

Depending on implementation it may require your device to be rooted.

Universal, non-ROOT, way is to create custom VPN service and track connections using NFLOG/ULOG kernel-userspace module.

See other QAs for reference:

Marek Sebera
  • 39,650
  • 37
  • 158
  • 244
  • I viewed this question http://stackoverflow.com/questions/17766405/android-vpnservice-to-capture-packets-wont-capture-packets and this page http://developer.android.com/reference/android/net/VpnService.html. Now I want to know when use vpnsevice class has my above question result or no? – Troy Apr 26 '15 at 15:46
0

Non-Root firewall can also be create using VPNService and a few C code to handle tcp/udp. NetGuard is a good example:

https://github.com/M66B/NetGuard

thundertrick
  • 1,634
  • 1
  • 17
  • 22