Repository navigation
TCP IP Setup Guide
Note
TCP/IP mode establishes an internal loopback socket (127.0.0.1:5555) to the device's native ADB daemon, providing complete offline system shell access without background services like Shizuku.
TCP/IP Mode allows aShellYou to establish a direct local socket connection to the Android Debug Bridge daemon (adbd) running on the device over the standard loopback address (127.0.0.1:5555).
This setup grants elevated Android Debug Bridge system permissions (shell, UID 2000) directly on the host device. Once enabled, TCP/IP mode operates completely offline without requiring an active Wi-Fi connection, external hardware, or background services like Shizuku.
Understanding the architectural mechanism of TCP/IP mode:
-
Daemon Binding: The Android system daemon (
adbd) normally communicates over internal Unix domain sockets or a physical USB interface. -
TCP Socket Listener: When TCP mode is enabled,
adbdbinds to TCP port5555. -
Local Loopback: aShellYou connects to
127.0.0.1:5555internally on the device. -
Lifecycle and Persistence: Because Android resets system properties during boot for security,
adbdreverts to USB-only mode when the device restarts. You must re-open port 5555 after each device reboot.
| Feature | Local TCP/IP Mode | Wireless Debugging |
|---|---|---|
| Port Configuration | Fixed port (5555) |
Dynamic port assigned on every connection |
| Network Requirement | Offline capable (no Wi-Fi or data required once enabled) | Requires active Wi-Fi connection |
| Target Scope | Host device executing commands on itself | Host device or secondary device over local subnet |
| Persistence | Active until device reboot | Active while Wi-Fi remains connected |
Before configuring TCP/IP mode, ensure the following developer settings are toggled on:
-
Enable Developer Options:
- Go to
Settings > About phone. - Tap on
Build number7 times to enable Developer Options.
- Go to
-
Enable USB Debugging:
- Go to
Settings > System > Developer options(orSettings > Additional settings > Developer options). - Toggle on
USB debugging.
- Go to
Tip
- If USB Debugging is disabled when aShellYou attempts to connect, the application displays a shortcut prompt to open Android Developer Settings directly.
Because opening port 5555 requires an initial privileged instruction, you can enable it using any of the four methods below.
This is the recommended method for unrooted devices running Android 11 or higher. It configures port 5555 directly on the device without requiring a computer or cables.
-
Select TCP/IP Mode:
- Open aShellYou, swipe open the side drawer, and select TCP/IP under the Local ADB mode card.
-
Trigger Wireless Setup:
- When the TCP Mode Not Available dialog appears, tap Use wireless debugging.
-
Navigate to Wireless Debugging:
- Follow the on-screen prompt to open
Settings > Developer options > Wireless debugging. - Toggle on
Wireless debuggingand tap the menu title to open the settings view.
- Follow the on-screen prompt to open
-
Pair with Pairing Code:
- Tap Pair device with pairing code. A 6-digit code dialog will appear on screen.
-
Enter Code in Notification:
- Pull down the Android notification shade, locate the aShellYou pairing banner, type the 6-digit code, and tap the send icon.
-
Confirm Port Activation:
- Upon pairing completion, aShellYou automatically transmits the command to open port 5555 and presents the Success dialog.
- Tap Go to terminal to begin using offline TCP/IP mode.
| Connection Intercept Dialog | Activation Confirmation Dialog |
|---|---|
![]() |
![]() |
| Port 5555 closed prompt offering wireless setup | Port 5555 opened and verified successfully |
If your device runs Android 10 or older, or if you prefer using a workstation:
-
Connect to Computer:
- Connect your Android device to a computer using a USB cable.
-
Authorize Computer:
- When prompted on your device, check Always allow from this computer and tap Allow.
-
Execute ADB Command:
- Open a terminal on your computer and execute:
adb tcpip 5555
- Open a terminal on your computer and execute:
-
Verify Output:
- Confirm the terminal responds with:
restarting in TCP mode port: 5555
- Confirm the terminal responds with:
-
Disconnect Cable:
- Disconnect the USB cable. Launch aShellYou, select Local ADB > TCP/IP, and begin executing commands.
If your device is rooted (Magisk, KernelSU, or APatch), open port 5555 directly in an elevated shell session without Wireless Debugging or a PC:
-
Switch to Root Mode:
- Open aShellYou, expand the side drawer, and switch the execution mode to Root.
-
Execute Daemon Command:
- Run the following command in the terminal:
setprop service.adb.tcp.port 5555 && stop adbd && start adbd
- Run the following command in the terminal:
-
Switch to TCP/IP:
- Once the command finishes, expand the side drawer and select TCP/IP. Subsequent commands execute through the loopback TCP interface.
If the Shizuku service is already active on your device:
-
Switch to Shizuku Mode:
- In aShellYou, expand the side drawer and select Shizuku.
-
Run TCP Command:
- Execute the following command in the terminal:
adb tcpip 5555
- Execute the following command in the terminal:
-
Switch to TCP/IP:
- Once completed, switch the mode to TCP/IP to operate independently of Shizuku.
Because Android resets system properties during shutdown:
- TCP port 5555 automatically closes whenever your device powers off or reboots.
- When you launch aShellYou after a reboot and select TCP/IP mode, the TCP Mode Not Available dialog will appear.
- Simply tap Use wireless debugging to re-open port 5555 directly on the device in seconds.
| Issue / Error | Probable Cause | Corrective Action |
|---|---|---|
TCP Mode Not Available dialog appears |
System property service.adb.tcp.port is unset (port 5555 closed). |
Tap Use wireless debugging to activate in-app, or run adb tcpip 5555 from a computer. |
Connection refused (111) on 127.0.0.1:5555
|
The adbd service terminated or reverted to USB mode following a device reboot. |
Re-enable port 5555 using Method 1 (Wireless Debugging) or Method 2 (PC USB). |
USB Debugging Off dialog appears |
Android Developer Options has USB Debugging toggled off. | Tap the action button on the dialog to open Developer Options and toggle USB debugging on. |
| Wireless pairing notification does not appear | Notification permissions are disabled for aShellYou on Android 13+. | Go to Settings > Apps > aShellYou > Notifications and enable notifications. |
adb tcpip 5555 fails on PC with device unauthorized
|
Device has not accepted the computer's RSA key fingerprint. | Unlock the phone screen, disconnect and reconnect the USB cable, and tap Allow on the prompt. |
If you run into any issues or want to ask questions, feel free to:
- Join our Telegram Community
- Open an Issue on GitHub
- Local ADB Guide
- TCP/IP Setup Guide
- Wireless Debugging Setup
- OTG ADB Setup Guide
- Fastboot over OTG Guide
- USB Debugging Setup

