3

At my company we develop a application that take control of wifi tethering, creating a hotspot with a custom ssid and passkey, allowing a IP Camera to connect and transfer data.

It works well until Android 7.1, but now in 8 apparently we can't tethering with custom ssid.

One solution that I thought was to only disable the update to 8, but how to do it?

My app locks the tablet (no buttons, no access to settings or home launcher, etc), but the update comes in a popup, allowing my client to click the update button.

Some ideas:

  • Lie the battery percentage

  • Block the address of the update server

  • Close the popup programatically

-Any other? I tried all the ideas, but without root I cant't find any solution.

ps: Sadly the tablets can't have root

  • 3
    Use a `VPNService` (set to "always on") to disallow certain apps (including system ones) from accessing the internet... – SushiHangover Nov 07 '18 at 20:17
  • @SushiHangover I searched how to implement VPNService in Xamarin, and there are many others with the same question that have not been answered. Do you know how to do this, or maybe some piece of code/example? Thanks – Matheus Stumpf Nov 08 '18 at 16:09
  • More specific on this part: "Create a tunnel to the remote server and negotiate the network parameters for the VPN connection." – Matheus Stumpf Nov 08 '18 at 18:03
  • You do not have to actually create the tunnel, in a VPNService you can either "allow" a group of apps (via their package name) or "disallow" them from your VPN, so what you do is you "allow" all the apps you wish to "block" from the Internet and then just drain the tun socket and do not forward them anywhere. The other apps are allowed by the OS to use the normal networking stack. I've done this multiple times for clients, so much so, that I have added a simple version of it to the Play Store, an "App Blocking" VPN – SushiHangover Nov 08 '18 at 18:27
  • 1
    Check this answer here, see it it helps: https://stackoverflow.com/questions/50456088/xamarin-android-vpnservice-is-blocking-all-apps/50458826#50458826 – SushiHangover Nov 08 '18 at 18:46
  • 1
    worked like a charm. Thanks! – Matheus Stumpf Nov 08 '18 at 20:09
  • Just an FYI, I highly recommend draining packets (bytes) sent to the `FileInputStream` via its Read method, you do not have to do anything with those bytes, just perform a continuous blocking Read() loop on a background thread. (Blocking is enable via the VPN builder (`.SetBlocking(true)`) – SushiHangover Nov 08 '18 at 20:19

0 Answers0