Skip to content

Local ADB Guide

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

Local ADB Setup and Usage Guide

aShellYou provides local command execution directly on the host Android device where the application is installed. Unlike remote connection modes (USB OTG or Wireless Debugging to external hardware), Local ADB executes commands directly on the host system without requiring an external workstation or secondary mobile device.

To support various device environments, rooting frameworks, and privilege levels, aShellYou provides four distinct local execution tiers.


Architecture and Execution Tiers

The following table summarizes the execution tiers available in Local ADB:

Mode Privilege Level Prerequisites Offline Capable Lifecycle & Persistence Typical Use Cases
Basic Shell Application sandbox UID (u0_a...) None Yes Persistent across reboots Standard POSIX commands (ls, ps, cat, df) within application read constraints.
Shizuku Android Debug Bridge system UID (shell, UID 2000) Shizuku service active Yes Service resets on reboot Package management (pm grant, pm disable), system property queries, system permission configuration (appops). Recommended for unrooted devices.
Root Superuser UID (root, UID 0) Rooted device (Magisk, KernelSU, APatch) Yes Persistent across reboots Unrestricted filesystem operations, kernel parameter tuning, partition management, deep system modifications.
TCP/IP Android Debug Bridge system UID (shell, UID 2000) Android 11+; port 5555 opened Yes (once opened) Port closes on reboot Full ADB system shell without requiring background third-party applications like Shizuku.

Accessing and Configuring Working Modes

To switch between working modes:

  1. Open aShellYou and select Local ADB from the main menu.
  2. From the terminal screen, swipe inward from the left screen edge or tap the navigation menu icon in the top app bar to reveal the side drawer.
  3. Locate the Local ADB mode card directly below the connected device header card.
  4. Tap the card header to expand the options list.
  5. Select the execution mode suited to your task (Basic shell, Shizuku, Root, or TCP/IP).
Side Drawer Menu Mode Selection Card
Local ADB Navigation Drawer Local ADB Working Modes

The selected mode applies immediately to all subsequent terminal commands.


Working Mode Specifications

1. Basic Shell

Basic Shell executes commands within the isolated Android sandbox assigned to the aShellYou application process.

  • Privilege Level: Standard unprivileged application process.
  • Capabilities: Can read non-sensitive public storage, inspect running processes permitted by SELinux, and execute built-in Toybox shell commands.
  • Limitations: Cannot access /data/data/ directories of other packages, cannot modify system properties, and cannot run privileged package manager commands (pm disable, pm uninstall).
  • Recommended Usage: Basic diagnostics, checking filesystem storage stats, viewing non-sensitive system files, or executing self-contained scripts.

Note

Attempting to execute commands requiring system or root privileges in Basic Shell results in a Permission denied error (exit code 13).


2. Shizuku Mode

Shizuku utilizes an Android system service started via ADB or root to grant third-party applications elevated shell UID permissions through a Binder IPC (Inter-Process Communication) interface.

  • Privilege Level: Android Debug Bridge system permissions (shell, UID 2000).
  • Setup Process:
    1. Install the official Shizuku application from Google Play or GitHub.
    2. Launch Shizuku and initiate the service via Wireless Debugging (Android 11+) or via a single workstation ADB command.
    3. When prompted in aShellYou, authorize access to the Shizuku service.
  • Persistence: The Shizuku service runs in memory and terminates when the Android device reboots. You must restart the Shizuku service after each system reboot.

Tip

For step-by-step instructions on initializing Shizuku without root access, refer to the Shizuku Setup Guide.


3. Root Mode

Root Mode executes commands by spawning an interactive or non-interactive su binary shell session.

  • Privilege Level: Unrestricted superuser access (UID 0).
  • Setup Process:
    1. Ensure your device is rooted using a modern root solution (Magisk, KernelSU, or APatch).
    2. When aShellYou requests superuser access, select Grant or Always Allow in your root manager prompt.
  • Persistence: Root authorization persists across system reboots according to your root manager configuration.

Caution

Root execution bypasses all Android sandbox and permission restrictions. Verify commands thoroughly before execution to prevent system instability or data corruption.


4. TCP/IP Mode

Local TCP/IP Mode establishes an internal loopback network connection (127.0.0.1:5555) to the device's local Android Debug Bridge daemon (adbd).

  • Privilege Level: Android Debug Bridge system permissions (shell, UID 2000).
  • Key Advantages:
    • Full system shell access without requiring a third-party background service like Shizuku.
    • Works completely offline: Once port 5555 is opened, neither an active Wi-Fi network nor a physical USB connection is required.
  • Requirements:
    • Android 11+ (for on-device activation via Wireless Debugging) or any Android version via a one-time PC command.
    • Developer Options and USB Debugging enabled.
  • Persistence: The TCP port closes automatically whenever the device restarts.

Tip

For complete step-by-step instructions covering all methods to open and configure port 5555, refer to the dedicated TCP/IP Setup Guide.


Troubleshooting Matrix

Issue / Error Probable Cause Corrective Action
Permission denied (Exit code 13) Current command requires shell or root UID, but Basic shell is active. Switch mode to Shizuku, TCP/IP, or Root.
TCP Mode Not Available dialog appears System property service.adb.tcp.port is unset (port 5555 closed). Follow the TCP/IP Setup Guide to open port 5555 via Wireless Debugging or PC.
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 following the TCP/IP Setup Guide.
Shizuku service is not running The Shizuku background process terminated or was cleared by battery management. Open the Shizuku app, restart the service, and return to aShellYou.
USB Debugging Off prompt Android Developer Settings has USB Debugging toggled off. Tap the action button on the dialog to open Android Developer Options and toggle USB debugging on.

Clone this wiki locally