friddle friddle - 1 year ago 93
Android Question

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

I meet the problem. 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


So I just want to know which is the best way to travel the

please forgive my poor English. I just a chinese student. I try my best.


Answer Source

I might be wrong but "find -name __" works fine for me. (Maybe it's just my phone.) If you just want to list all files, you can try

adb shell ls -R /

You probably need the root permission though.

Edit: As other answers suggest, use ls with grep like this:

adb shell ls -Ral yourDirectory | grep -i yourString


adb shell ls -Ral / | grep -i myfile

-i is for ignore-case. and / is the root directory.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download