Skip to content

TCP IP Setup Guide

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

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 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. Enable Developer Options:

    • Go to Settings > About phone.
    • Tap on Build number 7 times to enable Developer Options.
  2. Enable USB Debugging:

    • Go to Settings > System > Developer options (or Settings > Additional settings > Developer options).
    • Toggle on USB debugging.

Tip

  • If USB Debugging is disabled when aShellYou attempts to connect, the application displays a shortcut prompt to open Android Developer Settings directly.

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.

  1. Select TCP/IP Mode:

    • Open aShellYou, swipe open the side drawer, and select TCP/IP under the Local ADB mode card.
  2. Trigger Wireless Setup:

    • When the TCP Mode Not Available dialog appears, tap Use wireless debugging.
  3. Navigate to Wireless Debugging:

    • Follow the on-screen prompt to open Settings > Developer options > Wireless debugging.
    • Toggle on Wireless debugging and tap the menu title to open the settings view.
  4. Pair with Pairing Code:

    • Tap Pair device with pairing code. A 6-digit code dialog will appear on screen.
  5. 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.
  6. 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
TCP Mode Not Available Dialog TCP/IP Mode Enabled Dialog
Port 5555 closed prompt offering wireless setup Port 5555 opened and verified successfully

Method 2: One-Time Workstation Setup via USB ADB

If your device runs Android 10 or older, or if you prefer using a workstation:

  1. Connect to Computer:

    • Connect your Android device to a computer using a USB cable.
  2. Authorize Computer:

    • When prompted on your device, check Always allow from this computer and tap Allow.
  3. Execute ADB Command:

    • Open a terminal on your computer and execute:
      adb tcpip 5555
  4. Verify Output:

    • Confirm the terminal responds with:
      restarting in TCP mode port: 5555
      
  5. Disconnect Cable:

    • Disconnect the USB cable. Launch 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), open port 5555 directly in an elevated shell session without Wireless Debugging or a PC:

  1. Switch to Root Mode:

    • Open aShellYou, expand the side drawer, and switch the execution mode to Root.
  2. Execute Daemon Command:

    • Run the following command in the terminal:
      setprop service.adb.tcp.port 5555 && stop adbd && start adbd
  3. Switch to TCP/IP:

    • Once the command finishes, expand the side drawer and select TCP/IP. Subsequent commands execute through the loopback TCP interface.

Method 4: Direct Activation via Shizuku

If the Shizuku service is already active on your device:

  1. Switch to Shizuku Mode:

    • In aShellYou, expand the side drawer and select Shizuku.
  2. Run TCP Command:

    • Execute the following command in the terminal:
      adb tcpip 5555
  3. Switch to TCP/IP:

    • Once completed, switch the mode to TCP/IP to operate independently of Shizuku.

Reboot Lifecycle and Maintenance

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.

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