How to develop an android app that retrieves all the browsing information using VPN api?

209 Views Asked by At

Note: The app that I am trying to build will go into production. This is not for just practicing

I am trying to develop an app that needs to retrieve the websites visited by the user on an android device. Additionally, I want to retrieve the content of the website and specifically ad content to find the ads seen by the user.

I tried to get the ad content seen by the user using Accessibility. But the accessibility API is not returning the ad content seen in the browser. Even tracking the browsing history didn't work all the time.(I tried retrieving the browsing history from the value of the browser address bar using Accessibility API).

I know that all these can be done by using our own custom browser and making it default in the user's phone using Device administrator privilege.

But I want to try intercepting the request using VPN API. I used VPN API to connect to a proxy server(I have set up the proxy using mitm proxy tool. I even tried with http-toolkit which provides its own android app) which intercepts & decrypts all the browser requests by installing a root CA certificate in the user certificate store. Just a DNS interception doesn't work for me as I also want to get the request and response body.

But I want to know if it is possible to decrypt and see the data of an HTTPS request & response body locally in the android device itself. If it's possible I want to know some technical bits of it.

I am also looking for any solutions other than those mentioned in this question

0

There are 0 best solutions below