Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an adb command similar to "locate" or "grep" that would help me find a file on my Android device?

I'm curious about adb specifically, not a search app.

EDIT: "find" has been suggested, but on my ICS device:

hydrangea@turnsole:~$ adb shell find / -name *maps*
/system/bin/sh: find: not found

On my Gingerbread device it works, though. (Except I haven't rooted that device so it lacks permission.)

hydrangea@turnsole:~$ adb shell find / -name *maps*
find: permission denied
share|improve this question
Busybox will provide grep but not locate (AFAIK). – eldarerathis Feb 29 '12 at 22:40
find is available on stock devices I believe too. – Ryan Conrad Feb 29 '12 at 22:52
On ICS at least it tells me "find: not found". :( – Hydrangea Feb 29 '12 at 23:53

The find command works well in adb shell. The syntax is find /path -name file_name. For searching read only areas you will need root. If the find command is not available on your particular device, you might need to install BusyBox (search the Market.)

For example,
adb shell find / -name *maps*
will find all files that contain word "maps" across the entire file system.

share|improve this answer
If this command spams you with /somedir/: Permission denied append 2>/dev/null to the command to mute error messages. – onik Mar 1 '12 at 12:38
find -> /system/bin/sh: find: not found — out of luck. How do I install find onto a borked device which manufacturer decided to not include find into firmware? – Sarge Borsch Jan 18 at 7:42

"find" is a command line application which might be normally installed as: 1. a binary executable (most desktop machines) or 2. something small doing many things where one of them is "find" or 3. might be not available as phone manufacturers don't like users to have too much control over their phones

Most likely you have one branded (ex. samsung) ICS device - manufacturers want to have more control on the device than owner does. Gain root there, then install busybox. Device is most likely something called "/system/bin/toolbox" - you could execute "/system/bin/toolbox find" but it is likely to return "no such tool" since manufacturer intentionally removed it from the device.

It is however possible that your device has the feature within its bundled toolbox - but just not "symlinked"... if "/system/bin/toolbox find" would execute the feature then you might use "ln /system/bin/find toolbox" command (I might have messed the order of params). Before executing "ln ..." you must remount device in read-write mode (either by using "adb root" or "su;mount -o remount,rw /system"

share|improve this answer

find utility come with BusyBox or another 3rd parts.

To use native capabilities try (ls -R on android, grep on PC):

adb shell ls -lR / | grep 'REGEX'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.