Skip to content

Local ADB Guide

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

Note

Local ADB executes shell commands directly on the host Android device where aShellYou is installed, requiring no external workstation or secondary mobile device.


Local ADB Setup and Usage Guide

aShellYou provides local command execution directly on the host Android device. Unlike remote connection modes such as USB OTG or Wireless Debugging to external hardware, Local ADB interacts directly with the local system environment.

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


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 in aShellYou:

  1. Open Local ADB:

    • Launch aShellYou and select Local ADB from the main dashboard.
  2. Open Navigation Drawer:

    • Swipe inward from the left screen edge or tap the navigation menu icon in the top toolbar.
  3. Locate Working Modes:

    • Find the Local ADB mode card directly below the connected device header card.
  4. Expand Options:

    • Tap the card header to expand the options list.
  5. Select Execution Tier:

    • Choose the execution tier suited to your task (Basic shell, Shizuku, Root, or TCP/IP).

Navigation Drawer Working Mode Selection Card
Local ADB Navigation Drawer Local ADB Working Modes
Swipe from left edge to open drawer Tap card header to reveal execution tiers

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 (u0_a...).
  • Capabilities: Reads non-sensitive public storage, inspects permitted running processes, and executes built-in Toybox shell utilities.
  • Limitations: Cannot access /data/data/ directories of other applications, cannot modify protected system settings, and cannot run privileged package manager commands (pm disable, pm uninstall).
  • Recommended Usage: Basic diagnostics, checking storage statistics, inspecting 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 Shizuku: Download and install the official Shizuku application from Google Play or GitHub.
    2. Start Service: Launch Shizuku and start the service via Wireless Debugging (Android 11+) or via a single workstation command.
    3. Authorize aShellYou: When prompted, tap Allow all the time in the Shizuku permission dialog.
  • 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 complete 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. Verify Root: Ensure your device is rooted using a modern root manager (Magisk, KernelSU, or APatch).
    2. Grant Superuser Access: 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 workstation command.
    • Developer Options and USB Debugging enabled in system settings.
  • Persistence: The TCP port closes automatically whenever the device restarts.

Tip

  • For 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 workstation.
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