30
votes
Accepted
In Android 6, how to deny an app permission to access the network?
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 ...
26
votes
In Android 6, how to deny an app permission to access the network?
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 ...

Izzy♦
- 90.8k
18
votes
How to connect to Android through SSH over 3G/4G public IP?
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 ...
14
votes
How to port-forward internet using Android Hotspot to PC?
In most cases you won't be able to make inbound connection when using Mobile Data because of CGNAT and firewalls at ISP level, as explained by acejavelin in comment. To know the problem in detail and ...
13
votes
How can I see what IP address my android phone has?
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 ...
13
votes
Accepted
Captive Portal parameters
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 ...
11
votes
Listen which URLs an app tries to connect
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 ...
10
votes
How to set up reverse tethering over USB?
I know this is an even later answer, but it is worth mentioning it.
No rooting needed!
No app installation needed!* Which is not even possible if you do not have some other internet connection.
...
10
votes
Accepted
How to view network traffic requested by a specific app?
If you have rooted phone, go for nethogs (for live monitoring) or iptables (to get statistics) commandline tools. Using VPN or Android stats based apps is the only possible non-root solution. Or refer ...
10
votes
Accepted
How to make Ethernet work on Android over OTG?
There is a long list of Ethernet related questions but none has a comprehensive answer covering all aspects. I'm generalizing your question in order to share my knowledge on this.
This is what you ...
10
votes
Accepted
How do I generate a PKCS12 CA certificate for use with Packet Capture?
I had some issues with this after the Android 11 update. Android 11 no longer allows you to add certificates from any app other than the settings app, so you will have to generate and set the ...
9
votes
Why Android phones do not have firewalls?
Most consumer firewalls block incoming connections only and allow all outgoing traffic. This is to make configuration easier; you enumerate what services you are running and want to allow, but you do ...
8
votes
How to mount NFS on Android with correct permissions?
I would like to map uid=neo(1000)->root(0) and guid=neo(1000)->sdcard_r(1028) where neo:neo is the user on the server and root:sdcard_r is the user on the phone.
Files ownership root:sdcard_r (0:1028)...
8
votes
Accepted
How to change the default hotspot DHCP IP address range on Android?
NOTE: Root is required.
Default DHCP IP address range is hard-coded (1), you can't change it without rebuilding ROM with modified source code. Or use a little hack.
When you switch on tethering, ...
7
votes
In Android 6, how to deny an app permission to access the network?
There are some really cool apps that can do it without rooting. Here are two examples:
LostNet Firewall Free:
(Click image to enlarge)
Mobiwol: NoRoot Firewall
(Click image to enlarge)
7
votes
Accepted
How to kill dhcpcd?
A way to dynamically get the PID of the dhcp process, and kill it altogether, would be to run:
su
var=$(ps | grep dhcp)
kill $(echo -n $var | cut -d " " -f 0)
Specifically:
line 1 asks for root ...
7
votes
Accepted
Android Manifest File weird location Tags
@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 ...
6
votes
Accepted
What is my phone's hostname/network name?
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 ...
6
votes
How do I disable the Mobile Hotspot feature?
I managed to solve this without deleting hostapd file (with this method you can easily reactivate hotspot functionality renaming hostapd back to its original name).
Root your phone
Open up adb ...
6
votes
Accepted
Why is Android refusing to resolve DNS records pointing to internal IP addresses?
We recently encountered this issue, and we narrowed it to occurring ONLY on devices running Android v5 and newer. Android v4 and all other OS's have no issue.
With that tidbit, we determined that ...
6
votes
Accepted
How to send all internet traffic to a SOCKS5 proxy server in local network?
The link you have provided is not setting up SOCKS but a transparent proxy i.e. it takes TCP/UDP traffic and SOCKSify it before sending through shadowsocks tunnel. But you need to make your traffic ...
5
votes
How configure the DHCP settings of WIFI Tethering (Hotspot) on Android?
It appears some manufacturers and versions of Android now DO allow for the changing of the IP subnet range for the DHCP server through the UI when using the WiFi hotspot feature. Here's where to find ...
5
votes
Accepted
Network usage : How to monitor by time
I don't think there is a technical difficulty in gathering such information. Lack of such apps is likely because of lack of demand. For an average user, it is not the time that is important but the ...
5
votes
How to set static IP on command line or adb shell?
You can try using ip command.
How it compares to ifconfig
Edit:
To set up an IP address you can use:
ip address add 192.168.0.77 dev eth0
or the long form
ip addr add 192.168.0.77/24 ...
5
votes
How to assign Mobile Data's public IP to host connected on hotspot?
Let's say rmnet_data1 is your Mobile Data interface (on Qualcomm devices) and wlan0 is WiFi interface. When you switch on Mobile Data, your ISP assigns rmnet_data1 an IP address, possibly dynamic and ...
4
votes
How can I view detailed information on a WiFi connection on an Android device?
From most (all?) Android handsets you can dial *#*#4636#*#* which will display a wifi menu with lots of detailed information regarding the wireless status.
4
votes
In Android 6, how to deny an app permission to access the network?
If you have root access you could also use:
AFWall+ - there seem to be some issues with Android M, so you should check this first "...tested with Android version 4.xx - 5.
XPrivacy - requires the ...
4
votes
In Android 6, how to deny an app permission to access the network?
Preamble
It may be late, but I wish to add my own take on your question, for completeness' sake. This answer is a surefire way to block internet access to an application. The downsides? It doesn't ...
4
votes
Accepted
Can Android be used in IPv6-only networks? What level of IPv4 faking is necessary?
So after some more testing, using an especially made Brouter using a Raspberry Pi Zero W, I now know from my tests that Android 5.x, 6.0/6.1, and 7.0 in fact do support IPv6-only networks. However, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
networking × 578wi-fi × 178
internet × 39
dns × 36
wifi-hotspot × 33
mobile-network × 29
vpn × 28
applications × 26
connection-issues × 22
security × 20
usb × 19
tethering × 17
firewall × 17
adb × 16
linux × 15
shell × 14
router × 14
root-access × 13
wifi-tethering × 13
dhcp × 13
settings × 12
ssh × 12
proxy × 12
usb-tethering × 11
lan × 11