Skip to content

TCP IP Setup Guide

DP-Hridayan edited this page Nov 17, 2026 · 2 revisions

TCP/IP ADB Setup Guide

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.


Technical Overview

Understanding the architectural mechanism of TCP/IP mode:

  1. Daemon Binding: The Android system daemon (adbd) normally communicates over internal Unix domain sockets or a physical USB interface.
  2. TCP Socket Listener: When TCP mode is enabled, adbd binds to TCP port 5555.
  3. Local Loopback: aShellYou connects to 127.0.0.1:5555 internally on the device.
  4. Lifecycle and Persistence: Because Android resets system properties during boot for security, adbd reverts to USB-only mode when the device restarts. You must re-open port 5555 after each device reboot.

TCP/IP Mode vs. Wireless Debugging

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

System Prerequisites

Before configuring TCP/IP mode, ensure the following developer settings are toggled on:

  1. Developer Options: Go to Settings > About phone and tap Build number 7 times.
  2. USB Debugging: Go to Settings > System > Developer options and toggle USB debugging on.

If either setting is disabled when aShellYou attempts to connect, the application displays a prompt with a direct shortcut to open Android Developer Settings.


Methods to Enable TCP/IP Mode

Because opening port 5555 requires an initial privileged instruction, you can enable it using any of the four methods below.


Method 1: Automatic In-App Activation via Wireless Debugging (Android 11+)

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.

Step-by-Step Walkthrough

  1. Open aShellYou, swipe open the side drawer, expand the Local ADB mode card, and select TCP/IP.
  2. If port 5555 is not currently listening, aShellYou intercepts the connection and presents the TCP Mode Not Available dialog.
  3. Tap Use wireless debugging on the dialog.
  4. The application opens the on-device pairing interface and prompts you to open Android Developer Options.
  5. In your device's Settings > Developer options > Wireless debugging, tap Pair device with pairing code.
  6. Enter the 6-digit pairing code displayed by Android into the aShellYou notification.
  7. Upon successful handshake, aShellYou automatically transmits the internal instruction to open TCP port 5555.
  8. The Success confirmation dialog appears, confirming port 5555 is active.
  9. Tap Go to terminal. You can now use Local ADB in TCP/IP mode completely offline until the next device restart.
Step 1: Unavailable Prompt Step 2: Confirmation Dialog
TCP Mode Not Available TCP/IP Mode Enabled

Method 2: One-Time Workstation Setup via USB ADB

If your device is running Android 10 or older, or if you prefer using a computer:

  1. Connect your Android device to a computer using a USB cable.
  2. If prompted on your device, authorize the computer with Always allow from this computer.
  3. Open a terminal or command prompt on your computer and execute:
    adb tcpip 5555
  4. Confirm the command returns:
    restarting in TCP mode port: 5555
    
  5. Disconnect the USB cable from the device.
  6. Open aShellYou, select Local ADB > TCP/IP, and begin executing commands.

Method 3: Direct On-Device Activation via Root

If your device is rooted (Magisk, KernelSU, or APatch), you can open port 5555 directly in an elevated shell session without Wireless Debugging or a PC:

  1. Open aShellYou, expand the side drawer, and switch the execution mode to Root.
  2. Execute the following command in the terminal:
    setprop service.adb.tcp.port 5555 && stop adbd && start adbd
  3. Once the daemon restarts, expand the side drawer and switch the mode to TCP/IP.
  4. Subsequent commands execute via the loopback TCP interface.

Method 4: Direct Activation via Shizuku

If the Shizuku background service is already running on your device:

  1. In aShellYou, select Local ADB and switch the mode to Shizuku.
  2. Run the following command in the terminal:
    adb tcpip 5555
  3. Once the command completes, switch the Local ADB mode to TCP/IP.

Reboot Lifecycle and Maintenance

Because Android resets system properties during shutdown:

  • TCP port 5555 is automatically closed 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.

Troubleshooting Matrix

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.

Related Documentation

Clone this wiki locally