Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 05-12-2013, 10:09 PM   #1
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Post FILE. Program to identify a file's format by scanning binary data for known patterns.

Program to identify a file's format by scanning binary data
for known patterns.

ftp://ftp.astron.com/pub/file/

built for all kindles AFAIK

Expects to live in /mnt/us/extensions/file

Called like:
Code:
[root@kindle root]# /mnt/us/extensions/file/file 
Usage: file.bin [-bchikLlNnprsvz0] [--apple] [--mime-encoding] [--mime-type]
            [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
       file.bin -C [-m magicfiles]
       file.bin [--help]


(Thanks matan for pointing out the errors)
Attached Files
File Type: zip file.zip (213.9 KB, 354 views)

Last edited by twobob; 05-14-2013 at 09:14 AM.
twobob is offline   Reply With Quote
Old 05-13-2013, 11:03 AM   #2
Matan
Enthusiast
Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'Matan can spell AND pronounce 'liseuse.'
 
Posts: 42
Karma: 39432
Join Date: May 2011
Device: none
This binary is linked dynamically to libmagic.so, which is not available (by default) at least on Kindle keyboard.

Furthermore, this program (through libmagic) uses an external file which includes the information on how to recognize files, therefore you need to include this file in your archive (and probably modify libmagic to look for it by default under /mnt/us if you want the file to be installable without remounting the root filesystem).
Matan is offline   Reply With Quote
Advert
Old 05-13-2013, 11:34 AM   #3
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Right!
It is easy to miss those dynamically loaded libraries in the build of an application.
(It should have been a dependency in BuildRoot - gotta send them a note)

@TwoBob: Why not make the file and libmagic.so our first occupant of */extensions/system ?
https://bitbucket.org/twobob/kual-system

Gotta introduce that at some point.

Last edited by knc1; 05-13-2013 at 11:37 AM.
knc1 is offline   Reply With Quote
Old 05-13-2013, 12:59 PM   #4
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by Matan View Post
This binary is linked dynamically to libmagic.so, which is not available (by default) at least on Kindle keyboard.

Furthermore, this program (through libmagic) uses an external file which includes the information on how to recognize files, therefore you need to include this file in your archive (and probably modify libmagic to look for it by default under /mnt/us if you want the file to be installable without remounting the root filesystem).
Right. Fixed that up.

Quote:
Originally Posted by knc1 View Post
Right!
...
@TwoBob: Why not make the file and libmagic.so our first occupant of */extensions/system ?
https://bitbucket.org/twobob/kual-system

Gotta introduce that at some point.
A decent plan for sure. I'll have to rebuild the libmagic.so at some point then.
I got around it by using strace to check what locations it DOES check for magic.mgc in and ~/.magic was one of them...



All errors fixed up now.

Last edited by twobob; 05-14-2013 at 09:15 AM.
twobob is offline   Reply With Quote
Reply

Tags
file, kindles, launcher add-ons


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Book Extras .be file vs. X-Ray file format Doitsu Kindle Formats 0 04-22-2012 07:07 AM
IOError: cannot identify image file RobFreundlich Recipes 4 03-28-2012 02:25 PM
Meta data file for reader? KNI Library Management 2 12-21-2011 01:37 PM
Opus Updating EPUB file won't change publisher data on file listing spaze Bookeen 1 03-08-2011 01:34 AM


All times are GMT -4. The time now is 02:35 PM.


MobileRead.com is a privately owned, operated and funded community.