tree by rhythmcache adds a tree command to Android, which prints a folder and its contents as a tree. It isn't a compiled binary. It's a Bash script that imitates the Linux tree command.
Supported options
The README says it's slower than the real tree and that many of the original options are missing. These are the ones it supports:
| Option | What it does |
|---|---|
-a | Shows hidden files |
-n | Turns off color |
-d | Shows directories only |
-L | Limits the depth of the tree |
-i | Uses ASCII |
For example:
tree -L 2 /storage/emulated/0Installing
The script needs Bash. The installer looks for /system/bin/bash, and if it isn't there it tries to download a Bash binary for your CPU, so stay online during installation. Flash the zip in your root manager and reboot. The script is installed at /system/bin/tree.