View Single Post
Old 12-29-2009, 04:27 PM   #7
kacir
Wizard
kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.kacir ought to be getting tired of karma fortunes by now.
 
kacir's Avatar
 
Posts: 2,765
Karma: 3093505
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
So. I used the terminal application to do some actual hacking ;-)

The first step was extracting the contents of the original configuration file.

I have started the terminal application and had a look around the filesystem.
There is interesting directory called /ebrmain/config
with configuration file extensions.cfg

So I have issued command
cp /ebrmain/config/ex* /mnt/ext2
to copy the extensions.cfg to the memory card.

Here are the contents of the default /ebrmain/config/extensions.cfg file
Code:
txt:@Text_file:1:fbreader.app:ICON_TXT
fb2:@FB2_file:1:fbreader.app:ICON_FB2
htm:@HTML_file:1:fbreader.app:ICON_HTM
html:@HTML_file:1:fbreader.app:ICON_HTM
php:@HTML_file:1:fbreader.app:ICON_HTM
cgi:@HTML_file:1:fbreader.app:ICON_HTM
asp:@HTML_file:1:fbreader.app:ICON_HTM
jsp:@HTML_file:1:fbreader.app:ICON_HTM
pl:@HTML_file:1:fbreader.app:ICON_HTM
chm:@Z_HTML_file:1:fbreader.app:ICON_CHM
rtf:@RTF_file:1:fbreader.app:ICON_RTF
doc:@DOC_file:1:fbreader.app:ICON_DOC
docx:@DOC_file:1:fbreader.app:ICON_DOC
docm:@DOC_file:1:fbreader.app:ICON_DOC
prc:@PRC_file:1:fbreader.app:ICON_PRC
pdb:@PRC_file:1:fbreader.app:ICON_PRC
mobi:@PRC_file:1:fbreader.app:ICON_PRC
tcr:@TCR_file:1:fbreader.app:ICON_TXT
pdf:@PDF_file:1:AdobeViewer.app,pdfviewer.app:ICON_PDF
djvu:@DJVU_file:1:djviewer.app:ICON_DJVU
djv:@DJVU_file:1:djviewer.app:ICON_DJVU
epub:@EPUB_file:1:AdobeViewer.app,fbreader.app:ICON_EPUB
jpg:@JPEG_image:2:jpegviewer.app:ICON_JPG
jpeg:@JPEG_image:2:jpegviewer.app:ICON_JPG
png:@PNG_image:2:jpegviewer.app:ICON_PNG
bmp:@BMP_image:2:jpegviewer.app:ICON_BMP
tif:@TIFF_image:2:jpegviewer.app:ICON_TIFF
tiff:@TIFF_image:2:jpegviewer.app:ICON_TIFF
mp3:@Music_file:3:play.app:ICON_MP3
wav:@Music_file:3:play.app:ICON_MP3
app:@APP_file:4:start.app:ICON_APP
There are several interesting things I have learned reading the file:

1. Name of the FBReader application is fbreader.app

2. Name of the Adobe pdf viewer application is AdobeViewer.app

3. Name of the pdfviewer application is pdfviewer.app

4. Name of the djviewer application is djviewer.app

5. Name of the audio player application is play.app

6. Name of the image viewing application is jpegviewer.app

7. The syntax for having several applications available for reading is pdf:@PDF_file:1:AdobeViewer.app,pdfviewer.app:ICON _PDF
If we change the line to the
pdf:@PDF_file:1:pdfviewer.app,AdobeViewer.app:ICON _PDF
we should get pdfviewer as a default application.

8. there are several other possibilities, for example we want to have SciFiFans version of FBRreader to open some files by default, and the original FBReeader other, we change, for example this line
txt:@Text_file:1:fbreader.app:ICON_TXT
to
txt:@Text_file:1:fbreader2.app,fbreader.app:ICON_T XT
and then we copy SciFiFans version to the [memory mounted when PB connected to PC]/system/bin under the name fbreader2.app


I will try this tomorrow.
I will have a look what type of file extensions.cfg (UNIX or DOS text file (cr or CR/LF end of line))
I *THINK* that if I put my tweaked extensions.cfg file to the user mountable /system/config I might get my configuration.
kacir is offline   Reply With Quote