[APP] findutils 4.2.33 (updatedb / locate) for Android

Search This thread

viulian

Inactive Recognized Developer
Apr 6, 2011
419
411
hex.ro
Introduction

As I like to stay connected via Putty to my Android phone, from time to time I missed the functionality of updatedb / locate that I so got used to within Linux environment.

I've decided to cross compile the findutils package (I couldn't get the latest version 4.4.2, but an older before, 4.2.33).

Screenshot

You can see the updatedb command followed by some locate commands.

updatedb_locate.png


Installation

Busybox is required.

1. Copy the archive onto your /sdcard/ folder.
2. mount your /system folder as read-write
3. cd /system/
4. tar xf /sdcard/findutils-4.2.33.tar.gz

It is mandatory that you are inside /system/ folder when you extract the archive.

Then you have to create the database (using updatedb script). It will take a bit of time - but not too much.

Then you can use the locate command giving any part of a file name that you can remember, you can also use wildcards!

Observations

1. No integration with cron / etc. If you know your updatedb database is out of date, rebuild it using "updatedb"
2. Busybox comes with a /system/xbin/find command. The trouble with it is that it doesn't support the fstype argument, and thus, updatedb cannot prune some standard file system type paths. However, the bundled package here comes with its own find utility which unpacks into /system/bin/find.
3. Busybox is required for sort / sed, but updatedb script is patched to use the /system/bin/find (its own find executable) instead of the default busybox one.
4. My phone did not have an /etc/mtab file (list of mounts which mount is supposed to update whenever something happens). Thus, there is a line in the updatedb script which recreates that file on each updatedb invocation (mount > /etc/mtab). If you phone / tablet has it, please modify updatedb script and remove the mount command.

Download

Use it at your own risk!

findutils-4.2.33.tar.gz
 

h1ghb1rd

Member
Feb 19, 2010
28
0
This is great! Thanks for your work! :)
I hope that there will be a file manager for android which uses updatedb/locate to index/search files in the future, that would be sooooo awesome!
 

viulian

Inactive Recognized Developer
Apr 6, 2011
419
411
hex.ro
:) Don't know about other software that searches - but it would be nice too.

Maybe I can create something, but I'm sure there are others more integrated - such as looking in SMSes or in mails too, etc.
 

yelkarama

Senior Member
May 17, 2012
85
23
Gatineau
When I run updatedb, I get these errors:

/system/bin/find: /preload: Value too large for defined data type
/system/bin/find: /storage/sdcard0: Value too large for defined data type
/system/bin/find: /system: Value too large for defined data type
/system/bin/find: /data: Value too large for defined data type
 

waiters

Senior Member
Nov 9, 2011
967
201
This doesn't work. Might have worked a couple years ago before 4.x Android...

Use something like es file Explorer

Sent from my SAMSUNG-SGH-I747 using XDA Premium 4 mobile app
 

RobPitt

Senior Member
Dec 21, 2012
136
19
38
Brighton
www.robpitt.me.uk
I will rebuild it in the weekend :) I think back in the days the file systems were only 32bit, and now a lot of phones have 64bit file systems ...

Thanks for your efforts, I guessed it needed a rebuild from a google, but given how long ago you posted this I didn't think it would happen. Looking forward to the update!

Sent from my GT-N7100 using Tapatalk
 

Top Liked Posts

  • There are no posts matching your filters.
  • 8
    Introduction

    As I like to stay connected via Putty to my Android phone, from time to time I missed the functionality of updatedb / locate that I so got used to within Linux environment.

    I've decided to cross compile the findutils package (I couldn't get the latest version 4.4.2, but an older before, 4.2.33).

    Screenshot

    You can see the updatedb command followed by some locate commands.

    updatedb_locate.png


    Installation

    Busybox is required.

    1. Copy the archive onto your /sdcard/ folder.
    2. mount your /system folder as read-write
    3. cd /system/
    4. tar xf /sdcard/findutils-4.2.33.tar.gz

    It is mandatory that you are inside /system/ folder when you extract the archive.

    Then you have to create the database (using updatedb script). It will take a bit of time - but not too much.

    Then you can use the locate command giving any part of a file name that you can remember, you can also use wildcards!

    Observations

    1. No integration with cron / etc. If you know your updatedb database is out of date, rebuild it using "updatedb"
    2. Busybox comes with a /system/xbin/find command. The trouble with it is that it doesn't support the fstype argument, and thus, updatedb cannot prune some standard file system type paths. However, the bundled package here comes with its own find utility which unpacks into /system/bin/find.
    3. Busybox is required for sort / sed, but updatedb script is patched to use the /system/bin/find (its own find executable) instead of the default busybox one.
    4. My phone did not have an /etc/mtab file (list of mounts which mount is supposed to update whenever something happens). Thus, there is a line in the updatedb script which recreates that file on each updatedb invocation (mount > /etc/mtab). If you phone / tablet has it, please modify updatedb script and remove the mount command.

    Download

    Use it at your own risk!

    findutils-4.2.33.tar.gz
    1
    I will rebuild it in the weekend :) I think back in the days the file systems were only 32bit, and now a lot of phones have 64bit file systems ...