Magisk-Modules-Alt-Repo

tree

1guide

tree for android

★9 stars
•System Utilities•by Magisk-Modules-Alt-Repo•Proprietary•Updated Jan 11, 2025
Platforms:
✓ Magisk

Overview

The standard GNU/Linux tree command is an indispensable terminal utility for inspecting directory structures, examining package layouts, and debugging complex filesystem permissions. Because Android’s default Toybox and Toolbox suites omit the tree binary, developers and system administrators are typically forced to use unwieldy find or ls -R pipelines.

Tree for Android provides a systemless Magisk package containing a pure Bash implementation designed to mimic the classic Linux tree command inside Android root shells.

Supported Flags & Options

The command accepts familiar standard parameters:

tree [OPTIONS] [DIRECTORY]
  • -a: Show all files (including hidden dotfiles).
  • -d: List directories only; omit individual files.
  • -L <depth>: Limit maximum display depth to specified number of directory levels (e.g., tree -L 2 /sdcard/).
  • -n: Turn off terminal ANSI color formatting.
  • -i: Force pure ASCII tree lines instead of extended Unicode box-drawing characters.

Example Usage

Inspect a root module directory:

su
tree -L 2 /data/adb/modules/tree

Outputs:

/data/adb/modules/tree
├── META-INF
│   └── com
├── module.prop
└── system
    └── bin
        └── tree

Installation

  1. Download tree-main.zip from GitHub releases.
  2. Flash the module in Magisk.
  3. Reboot your device to access tree in your terminal shell.