Many Android users have a single Wi‑Fi network but need to extend its reach to a nearby room, a garden, or a second device that only supports Wi‑Fi. While the built‑in hotspot feature can share mobile data, it cannot rebroadcast an existing Wi‑Fi connection. This tutorial shows how to turn an Android phone into a true Wi‑Fi repeater – a device that receives a Wi‑Fi signal and re‑emits it on a different SSID – using only free tools from the Play Store and the command line. No root access is required, but the method does rely on Termux, hostapd, and dnsmasq, all of which run in user space.
adb backup or your preferred method never hurts.pkg update && pkg upgrade -y
pkg install -y git wget proot-distro iproute2 iputils nano
Explanation: iproute2 provides the ip command for interface configuration, while iputils gives us ping for testing connectivity.Both hostapd (the Access Point daemon) and dnsmasq (a lightweight DHCP/DNS server) are not available in the default Termux repository, but they can be compiled from source or installed via a pre‑built package repository. The simplest approach is to use the termux-apt-repo community repo.
pkg install -y root-repo
Note: This repo does not require root; it merely provides extra binaries.
pkg install -y hostapd dnsmasq
which hostapd
echo $?
which dnsmasq
Both commands should output a path like /data/data/com.termux/files/usr/bin/hostapd.The phone must first act as a normal Wi‑Fi client to the upstream network you want to repeat.
wlan0) and its IP address:
ip addr show wlan0
You should see an inet line like 192.168.1.45/24.Android’s Wi‑Fi chipset can create a virtual interface for the AP while keeping the client interface active. We will ask hostapd to create this virtual interface.
nano ~/hostapd.conf
Paste the following (replace MyRepeater and yourpassword with your desired SSID and passphrase):
interface=wlan0
driver=nl80211
ssid=MyRepeater
hw_mode=g
channel=6
wmm_enabled=1
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=yourpassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
Why these settings? driver=nl80211 works with most modern chipsets. hw_mode=g limits to 2.4 GHz, which is universally supported. Adjust channel if the upstream network uses the same channel to avoid interference.
hostapd ~/hostapd.conf -B
The -B flag daemonises the process. If you see Failed to start driver nl80211, your device likely does not support simultaneous client+AP mode.
ip link show wlan0
You should see state UP and a new AP flag.
Clients that connect to the repeater need IP addresses and a way to resolve DNS. dnsmasq handles both.
nano ~/dnsmasq.conf
Paste the following (the dhcp-range uses a separate subnet to avoid clashes with the upstream network):
interface=wlan0 # Listen only on the AP interface
dhcp-range=192.168.50.10,192.168.50.100,12h
dhcp-option=3,192.168.50.1 # Default gateway for clients
dhcp-option=6,8.8.8.8,8.8.4.4 # Google DNS as fallback
bind-interfaces
dhcp-option=3 gateway:
ip addr add 192.168.50.1/24 dev wlan0
Why? The repeater acts as a router for the downstream devices, so it needs its own address on that subnet.
dnsmasq -C ~/dnsmasq.conf -d &
The -d flag runs it in the foreground; the trailing & puts it in the background.
netstat -tulnp | grep dnsmasq
You should see a line with 0.0.0.0:53 bound to the dnsmasq process.
Now the phone must forward packets from the AP subnet (192.168.50.0/24) to the upstream Wi‑Fi interface (e.g., 192.168.1.0/24).
sysctl -w net.ipv4.ip_forward=1
iptables so that traffic appears to come from the phone’s upstream IP:
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
Note: The -o wlan0 flag refers to the *client* side of the same physical interface. On devices where the virtual AP appears as wlan0 as well, the rule still works because NAT is applied to packets leaving the interface.
iptables -A FORWARD -i wlan0 -o wlan0 -j ACCEPT
iptables -A FORWARD -i wlan0 -o wlan0 -m state --state ESTABLISHED,RELATED -j ACCEPT
termux-wake-lock or a third‑party app; this tutorial covers a one‑session setup.
MyRepeater).192.168.50.x range.ping -c 4 8.8.8.8
You should see replies. Then, on the downstream device, ping the same address to verify end‑to‑end connectivity.
Some OEM skins (e.g., Samsung One UI) expose a “Wi‑Fi sharing” toggle that automatically creates a repeater without any command‑line work. If you find that option in Settings → Connections → Wi‑Fi → Wi‑Fi sharing, you can skip the entire Termux procedure. However, the built‑in feature often lacks fine‑grained control over DHCP range and may not work on all devices, which is why the Termux method remains valuable.
iw list | grep \*\*\* (if iw is installed) and look for “valid interface combinations”. If you only see “#interfaces=1”, the hardware cannot act as a repeater.hostapd.conf channel. If the upstream network uses the same channel, change channel=6 to a free channel (1‑11). Overlapping channels can cause the AP to be hidden.pkill hostapd && hostapd ~/hostapd.conf -B.iptables -t nat -L -n -v. Look for a rule with MASQUERADE targeting wlan0.cat /proc/sys/net/ipv4/ip_forward should output 1.8.8.8.8 or 1.1.1.1. Mis‑configured dhcp-option=6 in dnsmasq.conf is a frequent cause.wlan1). Edit hostapd.conf and replace interface=wlan0 with the correct interface name, which you can discover via ip link.nl80211, the hardware cannot be used for AP mode without root-level driver patches – in that case, the method is not viable on that device.sleep 7200 && pkill hostapd && pkill dnsmasq && ip link set wlan0 down
~/.termux/boot that restarts hostapd, dnsmasq, and iptables on boot.termux-wake-lock
This keeps the CPU awake while the screen is off.
wpa=2 with a strong passphrase. An open repeater exposes any nearby device to your upstream network, which can be a security risk.pkill hostapd
pkill dnsmasq
ip addr del 192.168.50.1/24 dev wlan0
iptables -t nat -D POSTROUTING -o wlan0 -j MASQUERADE
sysctl -w net.ipv4.ip_forward=0
termux-wake-unlock
By following the steps above, you have turned an ordinary Android phone into a functional Wi‑Fi repeater without rooting. The solution leverages Termux’s Linux‑like environment, hostapd for the access point, dnsmasq for DHCP/DNS, and standard iptables NAT to bridge traffic. While the method requires a device that supports concurrent client and AP modes, it offers fine‑grained control over channels, security, and DHCP ranges—features not available in the stock hotspot.
Keep the troubleshooting section handy, especially the checks for driver support and NAT configuration. With a little practice, you can adapt the same workflow to create a captive‑portal hotspot, a guest network, or even a small offline LAN for local file sharing.









