Files & Transfer Android 1.0+ Risk: READ_ONLY

List Directory Contents

Lists files and directories with permissions, owner, size, and modification timestamps.

Command Syntax

adb shell ls
Generic Syntax: ls [-a] [-l] [-h] [-R] [-d] [-t] [<path>]

Options & Parameters

Flag Description
-l Long listing format.
-a Show hidden files starting with dot.
-h Human-readable file sizes (K, M, G).
-R Recursively list subdirectories.

Real-World Usage Examples

List sdcard contents in long format with sizes in MB/KB
Outputs directory table.
adb shell ls -lah /sdcard/
Output:
drwxrwx--x 38 root sdcard_rw 4.0K 2026-08-20 10:14 .
drwxr-x--x  4 root root      4.0K 2026-08-19 14:02 ..
drwxrwx--x  3 root sdcard_rw 4.0K 2026-08-22 09:30 DCIM
drwxrwx--x  8 root sdcard_rw 4.0K 2026-08-25 11:45 Download
drwxrwx--x  2 root sdcard_rw 4.0K 2026-08-19 18:20 Pictures