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 ...


22

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 ...


10

On Android Device: Make sure USB Debugging is enabled in Developer Options. Set adb port prop: If rooted: Open a terminal emulator (like termux) and run the following commands: su setprop service.adb.tcp.port 5555 If not rooted: Connect your device to PC using usb and run on PC terminal/cmd: adb tcpip 5555 You can disconnect after this and continue on ...


10

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 how it can be worked around see How to connect to Android through SSH over 3G/4G public IP? However if you can reach your phone from internet, extending this ...


8

There is a rather hidden feature, that will let you achieve this: This option is found under Settings > Data usage (Wireless and Networks). Tap on the three dots in the top right corner, and press "Mobile Hotspots." (In android 4.3) In later versions of android the similar option is "Network restrictions" > Metered connections Next you'll see a list ...


7

In Android 4.2 and later, you can tell Android which Wi-Fi networks are mobile hotspots. In the device Settings, go to the Data usage page, then open the overflow menu (the three dots in the top-right) and click Mobile hotspots. It shows a list of Wi-Fi networks known to the device: tick any that are mobile hotspots. Then, when you're on a network that's ...


6

Android uses dnsmasq as its DHCP/DNS server (up to Pie). So create the configuration file /etc/dnsmasq.conf with option dhcp-host=<MAC>,<IP> (1). Root is required to place this file. Since /etc is a symlink to /system/etc, /system partition needs to be mounted R/W. Make sure you don't break dm-verity if enabled on your device. Set permissions: ...


5

Take a look at Network Discovery1 -- it lists all devices within the same network, together with some details on them, as e.g. IP, MAC address, available services: Network Discovery (source: Google Play; click images for larger variants) Other port scanners will do as well. 1: This app is no longer available on Play Store.


5

As of version 1.2.5, tethering has been included in AFWall+, you should only need to enable (Tethering) - DHCP+DNS services


5

I know this is an old post, but thought I would provide an update. 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 WiFi hotspot feature. Here's where to find it on an HTC One M8 running Android 6.0. YMMV. From the Mobile Hotspot screen, click the 3 ...


5

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 connection Enter these commands: su cd system cd bin mount -o rw,remount /system mv hostapd inactive_hostapd mount -o ro,remount /system Reboot your phone and you'...


5

After a lot of digging the clue came from Wi-Fi Direct. The concept explained Wi-Fi direct is a wireless standard that allows creation of a connection between any two devices without a wireless access point (or going through a router). Wi-Fi direct uses a Wi-Fi protected setup (WPS) protocol when connecting two devices. Additional protocols have ...


5

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, what happens (at least): hostapd - the daemon which manages access points - is started. Network interfaces are set up, IP address is added to Wi-Fi interface (...


4

I had the same problem with wifi tethering after I installed Droidwall. Though the wifi connection was successful but I got no internet access. I got it working simply by adding the DNS in my laptop. Hope, it works for you or anyone facing the same problem. Change/Add DNS 4.2.2.2 and 8.8.8.8 in your PC/Laptop. That's it.


4

Basically it is possible to control/watch over every data transferred by just analyzing the traffic. To do so you could use something like Wireshark, but then a lot of Internet traffic today is encrypted, which would make it impossible to gain anything from it. To access the data of connected devices would require certain other tools and would very likely ...


4

Note: Adding / removing IP address requires root access. METHOD 1: Before Android Pie, tethering IP (192.168.43.1) was hard-coded (1, 2). But now it's randomized on each session(3). You can use Android's builtin ip command to set an additional fixed IP address (within same subnet obviously): ~# ip address add 192.168.43.100/24 dev wlan0 * Replace add ...


3

Maybe this is too late for some of you but this is a solution for Android 4.2: Basically you need TUN module since the standard configuration does not include it: Google Play - TUN.ko installer Bluetooth thethering - fix solution


3

Erase this file (with root): system/bin/hostapd


2

Enable adb over USB in settings of your Android device. With this, you can already use most of the apps from Market. In terminal in Android device, type setprop service.adb.tcp.port 5555 Most programs from Market do only second. For first, they need root (like ADB over Wifi Widget).


2

I am not sure which version you're running, here is my advice. The cause you're probably blocked, is due Android's firewall and strong Se-Linux policy. Since you have a full root access, you can get a shell with ADB, and check that. Type su - and it will get you into root. I am using TerminalEmulator, but you can use native one, if it is shipped with OS. ...


2

Following @Shadow's suggestion I've googled a bit more...turns out that Android >= 4.1.2 prevents you from using tethering if you are served by a virtual operator (as I am). This is a nice post http://albertomilone.com/wordpress/?p=581 explains pretty well the situation and propose a solution based on iptables. EDIT Looks like this problem is solved with ...


2

Default DHCP IP address range is hard-coded, so you can't change it without rebuilding ROM with modified source code. Or use a little hack. Replace /system/bin/dnsmasq (the DHCP/DNS server up to Android 9) with a custom shell script which replaces old subnet with new one before executing actual dnsmasq binary. For detailed steps see How to change the ...


2

Performing actions whenever a certain Blutooth device is in reach and paired (and reverting them when it gets out of reach) can be done e.g. with tasker (see the tasker tag-wiki for details on the app): Condition: BT Connected (parameter: name or address of the device) Task: WiFi (parameter: On) Exit-Task: (optional; Tasker should revert automatically to ...


2

Maybe I am not understanding correctly, but you could set your phone as a Mobile Hotspot and configure a wireless router as a bridge between your existing network and the hotspot. In this scenario, all devices on your network would be using the wifi signal of the router and only the router would need to be configured to reconnect to the hotspot.


2

If you have the Settings > Wireless and networks > More > Tethering and portable hotspot menu item (which is present from Android 2.2 onwards, so I assume you do, since your phone ships with 4.2), you do not have to root your device to turn on tethering. Just use that menu and WiFi tethering will work. Those apps are for phones with earlier ...


2

I need to turn off my mobile signal WITHOUT using airplane (because I'm using Wifi Hotspot and Wifi ADB). You can configure your device to not stop Wi-Fi (Hotspot includes) when activating Airplane mode. (Note: I tested the solution in Android 4.2.1, 4.4.2, 5.0.2 and 5.1.1.) The radios that are supposed to be turned off when Airplane mode gets enabled ...


2

To access the hotspot settings you have to keep (tap-hold) your finger on the same field Portable Wi-Fi hotspot for a few seconds, then release the finger. Unless there's a menu icon (three dots) on the top right corner, in which case you can access the settings by tapping on the menu icon and choosing Configure. Generally speaking, in most apps you can ...


2

In addition to the other answers, I'd like to add that you can alternatively remove the execution permission from that file: su mount -o rw,remount /system chmod 0644 /system/bin/hostapd This approach looks more Unix-styled. To restore it, do the same commands again, but use 0755 instead of 0644 (i.e. put the execute permission back).


2

Nougat update for OnePlus 3 and 3t is extremely fresh (I managed to upgrade it only using a VPN to Canada). This must be one of the features which still needs to be polished. The checkbox is missing to keep the hotspot running even if noone is connected for more than 5 minutes. Until OnePlus releases a new minor update to fix this, workaround can be either ...


2

Workaround when you are (like me) dependent on the Wifi hotspot: Create a script with Automate which automatically reactivates the hotspot:


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