- 1 year ago
Use adb to find folders and files
Comment
1 / 1
You can use the adb shell
command in combination with various Linux shell commands to find folders and files on an Android device. Here are some examples:
- List all files and folders in the root directory:
bashadb shell ls /
- List all files and folders in a specific directory:
bashadb shell ls /path/to/directory
- Search for a specific file by name:
arduinoadb shell find / -name filename
- Search for all files with a specific extension:
arduinoadb shell find / -name '*.txt'
- Search for files modified in the last 24 hours:
arduinoadb shell find / -mtime -1
- Search for files modified between two specific dates:
arduinoadb shell find / -newermt "YYYY-MM-DD HH:MM:SS" ! -newermt "YYYY-MM-DD HH:MM:SS"
- Find the size of a file:
bashadb shell ls -l /path/to/file | awk '{print $5}'
Note that some of these commands may require root access on the device. Also, keep in mind that the adb shell
command executes Linux shell commands, so the syntax and behavior may differ from Windows shell commands.