[android] How to list all the files in android phone by using adb shell?

I just try to write a bash shell for my Android Phone.
When I want list all the files in my Android Phone. I found that the Android shell terminal doesn't support find command.
So I just want to know which is the best way to travel the sdcard files?

This question is related to android adb

The answer is


This command will show also if the file is hidden adb shell ls -laR | grep filename


Open cmd type adb shell then press enter. Type ls to view files list.


Some Android phones contain Busybox. Was hard to find.

To see if busybox was around:

ls -lR / | grep busybox

If you know it's around. You need some read/write space. Try you flash drive, /sdcard

cd /sdcard
ls -lR / >lsoutput.txt

upload to your computer. Upload the file. Get some text editor. Search for busybox. Will see what directory the file was found in.

busybox find /sdcard -iname 'python*'

to make busybox easier to access, you could:

cd /sdcard
ln -s /where/ever/busybox/is  busybox
/sdcard/busybox find /sdcard -iname 'python*'

Or any other place you want. R


just to add the full command:

adb shell ls -R | grep filename

this is actually a pretty fast lookup on Android