Intercept network call from Android Java/JNI
Asked Answered
E

1

7

Hi i wish to intercept any network activity happening in android device. Say for example browser is opening http connection to some website or api.

If this is not possible then at least i wish to intercept browser url android say firefox chrome or opera.

So whenever user opens any url in browser i need to get call. I already know about providing an intent filter to activity and intercept. But this all happens if request goes to intent resolver which in browser case will not happen.

Similar question was opened here intercepting internet calls android but there was not any response on this.

If anyone has any solution or have similar requirement lets discuss.

Other resource https://gist.github.com/madeye/2297083 Proxy is also one solution but i have no clue about implementing it.

Ellerd answered 8/10, 2016 at 13:37 Comment(1)
Do you know about the burp-suite? There's an API for it, which is called burp extender.Anselm
B
1

you need to use something like vpn or proxy to do that. there is a link from google and an full project at the links below :

sample: https://android.googlesource.com/platform/development/+/master/samples/ToyVpn/src/com/example/android/toyvpn/ToyVpnService.java

full working project: https://github.com/hexene/LocalVPN

Bifarious answered 17/10, 2016 at 13:16 Comment(2)
request will go through local proxy, is there way other than proxy?Ellerd
Yes it is but you need to have the root access in your android device. Then you can do lotsa of things with linux commands since android is linux base. Thisbis the only way to intercept all network traffic without being a root user .Bifarious

© 2022 - 2024 — McMap. All rights reserved.