Android: find databases

Some terminal commands to find sqlite database files in an android file system.

There are multiple ways to find specific files, like sqlite databases. I had to search for sqlite files in an android file system dump. First I tried to find all occurences by using the mime type, but this is not supported by Mac OSX's find-command directly.

So I had to use the file command and filter the result set using grep:

find . -type f -print0 | xargs -0 file | grep SQLite

Another option is to use Androids file structure to get all databases. This is possible because every app has a own database folder in /data/data/:

find data/data -iname databases 2> /dev/null