33

It's simple. In the terminal (requires root), or in adb shell (does not require root), issue the command settings put global captive_portal_detection_enabled 0 and reboot. It should be disabled. The existing state can also be verified via the command settings get global captive_portal_detection_enabled A response of "null" indicates the global key value ...


28

You won't be able to achieve success through the native mechanism of Android. Cody Toombs at Android Police has very well pointed this out in the article: Android M Will Never Ask Users For Permission To Use The Internet, And That's Probably Okay. In the section Normal and Dangerous Permissions of the document Permissions Overview, Google has noted: ...


27

Unfortunately, there is no way to change the IP address range for the builtin tethering support, even in CyanogenMod. The Wi-Fi hotspot IP is hardcoded in android.net.wifi.WifiStateMachine.startTethering(); the USB tethering IP is hardcoded in com.android.server.connectivity.Tethering. However, if your phone is rooted, you can try using third-party apps for ...


25

You could use NetGuard (see my list of Internet Firewalls for other alternatives), which works without root and lets you block internet access for apps selectively (WiFi or mobile data, and even always or only if screen is off). It's from the dev of XPrivacy, so it has to be good ;) NetGuard (source: Google Play; click images for larger variants) ...


24

I was able to see which app had an open port using standard linux knowledge. Install terminal emulator or do an adb shell and execute the following: shell@android:/ $ cat /proc/net/tcp sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode 0: 0100007F:1C23 00000000:...


21

The Android builtin wifi tethering is designed to use 192.168.43.1/24 as the server, with netd handling the tethering, using dnsmasq. First DNS range is 192.168.42.1-254 and and 2nd DNS range is 192.168.43.1-254. Netd is not easy to change. It requires a socket to communicate with it, and that socket is taken when android starts tethering. But going through ...


20

At first, I thought this was most likely an instance of Android cloud to device messaging, but it can't be: WhatsApp doesn't declare the necessary permissions, and it works in Eclair (Android 2.1), while cloud to device messaging (and its replacement, Google Cloud Messaging) require at least Froyo (Android 2.2). However, it is most likely some sort of push ...


19

There are some more possibilities -- but all of them I know of require a rooted device. Using the Reverse Tether App First, there's an App named Reverse Tether available for free on the Play Store (it's a limited trial, which restricts the time you can be connected -- but at least you can test this way whether your device is fully supported; the full ...


19

OS Monitor lists network connections by app: OS Monitor and Connection Tracker listing connections (source: Google Play; click image to enlarge) As you can see, OS Monitor lists up all connections, and lists the corresponding app "owning" this connection along. This should enable you to see all servers your suspicious app connects to. There are other ...


13

ifconfig and ip Android 7 adb shell ifconfig adb shell ip address show ifconfig was an annoying implementation that did not show all versions by default on earlier versions as explained below, but now it works fine. netcfg Android 5.1.1 This tool was removed in later Android, and ifconfig was made more decent and shows all interfaces by default, thus ...


13

Based on avirk's hint, I found a way. First press the code *#0011# GSM example: GSM900: IDLE T: 10, B: 10 Rx Pwr: -94, Rx ual: - Rx Lev: 21, Tx Lev: 0- Speech VER: AMR EFR FR VOC: AdaptiveRate TS: 0 Temp: 68 Batt: 71 LNA: 0 Service: Available It is obvious that it's using 900MHz band, from the "GSM900". UMTS WCDMA example: WCDMA: Idle Rx CH: 10612, R: -...


13

In the Android M Developer Preview for Shamu (Nexus 6), and possibly other builds of this OS, the captive_portal_server global is used by the OS regardless of the state of captive_portal_detection_enabled in order to determine health of a WiFi network. For WiFi networks, it will not only draw an exclamation mark on the strength icon, it will blacklist that ...


12

Configuring captive portal behaviour captive_portal_detection_enabled (<= Android 7.1.1) works as described in question body captive_portal_mode (>= Android 7.1.2) works as described in question body Setting captive portal URL(s) captive_portal_server (<= Android 6.0.1) The server that holds a generate_204 page, used to internally craft a URL ...


11

According to Steve Kondik, this is essentially old code that is leftover from older versions of CyanogenMod: This was only here for apps that were statically linked against uclibc in old CM versions. It can likely just be removed. However, he also goes on to note: Also, this file is NOT written when connecting to a network as /system is readonly. The ...


11

Any android device Cyanogenmod provides you with an option to build your own Cyanogen-build and integrated kernel building. With this you can compile an compatible kernel for your phone with desirable features. Here's a post that walks you through the process. R̲e̲qu̲i̲r̲e̲m̲e̲n̲t̲s̲: Linux machine USB cable familiarity with basic commands For Nexus 5 ...


10

You can try dialing *#*#4636#*#* and then going to "Phone Information". That will show details about the network like cell tower ID and network type. As you can see from the below screenshot, it shows "EDGE" mode :- Also, this may only work on stock Android builds.


10

I have been using Packet Capture app, which for me is simpler than setting-up "wireshark" on Android. The app is free, doesn't require root access, but may request to install user certificate to decrypt SSL connection (it's using MITM technique, as mentioned on its app page; you don't need to install it if you don't want to know the content of SSL ...


9

The easiest way is using a tool like e.g. OS Monitor, which shows you (amongst others) also a lot of network details: OS Monitor showing network interface details (source: Google Play; click image to enlarge) As the screenshot shows, this app reveals for each network interface: interface name¹ IPv4 IP address assigned (if 0.0.0.0, this interface is ...


9

If you have a working SSH server running on Android device, you can connect to it on local/private network without any issues (after proper authentication setup obviously). Same may hold true for public network (internet) if your phone has a true public IP address (I don't think that happens on earth). However, when you need to cross networks i.e. traversing ...


8

Opening ADB on an unsecured connection is a major security risk. On an unrooted phone, it gives access to your entire filesystem. On a rooted phone, it gives access to your entire filesystem with write permissions. The connection isn't encrypted and there is no password or key exchange to access ADB. It's just a bad idea. Beyond that, your carrier may ...


8

I am certainly sure that WhatsApp does NOT open any listening ports. most ISPs block incoming requests, that would not work. WhatsApp has a service. Basically that means that technically you never quit WhatsApp. So, the way you receive messages while you're "not running" WhatsApp is the exact same way you receive them when you're running it. The client, ...


7

just type netcfg it will lists the interface, and work on any terminal emulator. running on the phone itself, or remotely via adb.


7

Either your phone silently drops pings, or the router it's behind, either your wifi router, or the 3G network's router that NATs your phone drops them.


7

A good application to do that is the Samba Filesharing. It shares your sdcard, making it easy to transfer files from/to your phone. Settings After installing the application from Google Play, open it and fill a password by touching the password menu. The default username is SDCARD and the default Workgroup is WORKGROUP. You can leave it that way or change it ...


7

On some devices which do support WiFi-Direct, the corresponding binaries come pre-installed (e.g. the wpa_cli command; see also How can I install wpa_cli on my rooted device?). If you have those ready, you can use them on your Android device as you would do on a Linux machine (find a closer description e.g. in the blog post How To : Use wpa_cli To Connect To ...


7

When the data indicator is orange (on Kit kat ; grey on older versions), this means that the device is unable to receive a response from GCM (Google Cloud Messaging, the framework that handles push notifications). This traffic is sent through ports 5228, 5229, and 5230. If the AP is blocking or interfering with traffic on those ports, push notifications won'...


7

There's a way to retrieve your device's hostname, but you'll have to meet one requirement, which is to have a Terminal Emulator installed on your device. Once you have one, just open an instance of the emulator and issue the following command, followed by Enter: getprop net.hostname Your phone will then answer with its hostname.


7

@res/xml/network_security_config means that the file containing the network security configuration is included as file into the APK. If you open the APK file using a ZIP tool you will find the file in the path /res/xml/network_security_config.xml. If you use a decompiler like Jadx you can open the item /Resources/res/xml/network_security_config to see the ...


6

This sounds exactly like this, down to ping working but not the browser. His eventual solution is quoted below: Stupid question, but are you editing the file on the handset or just pushing the file that you posted here? The one you posted is in dos format, so it has extra linefeed characters at the end of the line that could confuse a linux system. ...


Only top voted, non community-wiki answers of a minimum length are eligible