Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
samveen
Old
(Last edited by samveen; 3rd May 2012 at 12:59 PM.) Reason: Display sig
#1  
Junior Member - OP
Thanks Meter 5
Posts: 15
Join Date: Apr 2012
Lightbulb [Tool]File(1) command for Android (ver 5.11)

After wandering around looking for an android build of the file command, I finally went ahead and compiled it myself.

The attached package contains the file binary (v5.11), the libmagic.so shared library, the associated magic files and the build specific files that I needed (over and above the source) to build it. The paths of the files are relative to '/'.

Refs:
source: file website (www_darwinsys_com/file/)
compiling: Native Vim on Android (gdr_geekhood_net/gdrwpl/vim-android.php)

Note: Add the location of libmagic.so to LD_LIBRARY_PATH to get rid of the "CANNOT LINK EXECUTABLE" error. (I use /data/local/lib)
Attached Files
File Type: gz file-5.11-arm-android_8.tar.gz - [Click for QR Code] (238.2 KB, 140 views)
Utilities for Android: GNU make 3.82, GNU grep 2.12, GNU diffutils 2.8, file 5.11

Current: Nexus S GT-I9020T (Stock 4.1.2 unrooted), Toshiba AC100 (2.2 by silver-alx)
Old: Huawei U8150 (Stock 2.2 rooted)
The Following 2 Users Say Thank You to samveen For This Useful Post: [ Click to Expand ]
 
samveen
Old
(Last edited by samveen; 3rd May 2012 at 01:01 PM.)
#2  
Junior Member - OP
Thanks Meter 5
Posts: 15
Join Date: Apr 2012
Compiled a dynamically linked library and associated binary instead of the monolithic binary built earlier.
Utilities for Android: GNU make 3.82, GNU grep 2.12, GNU diffutils 2.8, file 5.11

Current: Nexus S GT-I9020T (Stock 4.1.2 unrooted), Toshiba AC100 (2.2 by silver-alx)
Old: Huawei U8150 (Stock 2.2 rooted)
The Following User Says Thank You to samveen For This Useful Post: [ Click to Expand ]
 
royale1223
Old
#3  
royale1223's Avatar
Senior Member
Thanks Meter 477
Posts: 358
Join Date: Oct 2011
Location: Calicut

 
DONATE TO ME
Quote:
Originally Posted by samveen View Post
After wandering around looking for an android build of the file command, I finally went ahead and compiled it myself.

The attached package contains the file binary (v5.11), the libmagic.so shared library, the associated magic files and the build specific files that I needed (over and above the source) to build it. The paths of the files are relative to '/'.

Refs:
source: file website (www_darwinsys_com/file/)
compiling: Native Vim on Android (gdr_geekhood_net/gdrwpl/vim-android.php)

Note: Add the location of libmagic.so to LD_LIBRARY_PATH to get rid of the "CANNOT LINK EXECUTABLE" error. (I use /data/local/lib)
I followed your instructions and it works perfectly.

Code:
$ echo $LD_LIBRARY_PATH
/data/local/lib:/data/local/lib:/data/local/lib:/system/lib:/vendor/lib
$ file
Usage: file [-bchikLlNnprsvz0] [--apple] [--mime-encoding] [--mime-type]
            [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
       file -C [-m magicfiles]
       file [--help]
$ getprop  | grep device
[ro.cm.device]: [jordan]
[ro.product.device]: [umts_jordan]
I have been looking for this for a while. Man!! This post needs some serious attention. Great work.

Sent from my MB525 usiIng XDA
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...