Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 06-09-2012, 07:50 AM   #1
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Kindle & RAR

Good afternoon!!

I would like to use rar and unrar commands from the Kindle's shell.
As I'm a noob, I don't know what to do...
I know Kindles don't have rar and unrar in /bin, so what to do?

I tried to download RAR, then I added rar and unrar to /bin.
But I didn't manage to make it work (obviously!!).

Any help?

Thanks to everyone!
silver18 is offline   Reply With Quote
Old 06-09-2012, 08:06 AM   #2
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
Quote:
Originally Posted by silver18 View Post
Good afternoon!!

I would like to use rar and unrar commands from the Kindle's shell.
As I'm a noob, I don't know what to do...
I know Kindles don't have rar and unrar in /bin, so what to do?

I tried to download RAR, then I added rar and unrar to /bin.
But I didn't manage to make it work (obviously!!).

Any help?

Thanks to everyone!
Well, rar and unrar are (no pun intended) rarely used on *nix systems, primarily due to the license of rar file format.
But...
Yes, there are *nix system programs that can handle that format.
Finding pre-compiled binaries for ARMv7 (if your talking about your KT) may take a bit of searching...
For instance, Debian does not build it for armel:
http://packages.debian.org/search?su...s&keywords=rar
Although you can follow links from that page to the source files and give compiling it yourself a try.

unrar is a bit easier, Debian builds it:
http://packages.debian.org/sid/unrar
(scroll down page)

let me guess, your next question will be: "How do I open a Debian *.deb package file?"
Answer: ar
not unrar, or rar, just: ar (your man ar command or google search will tell you).

Last edited by knc1; 06-09-2012 at 08:16 AM.
knc1 is offline   Reply With Quote
Old 06-09-2012, 08:09 AM   #3
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Perhaps you could explain what you want to do with it - people may be able to suggest alternatives.
HarryT is offline   Reply With Quote
Old 06-09-2012, 08:52 AM   #4
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Well, I'm trying to support CBZs and CBRs files for my ImageGallery.
CBZs are easy: I can rename to zip then unzip and everything is fine...
CBRs could be renamed to rar, but then I don't know what to do...

I need only unrar, but I really can't understand Debian, ARMv7 and so on...(Kindle is my first non-windows experience!)
silver18 is offline   Reply With Quote
Old 06-09-2012, 09:02 AM   #5
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
Quote:
Originally Posted by silver18 View Post
Well, I'm trying to support CBZs and CBRs files for my ImageGallery.
CBZs are easy: I can rename to zip then unzip and everything is fine...
CBRs could be renamed to rar, but then I don't know what to do...

I need only unrar, but I really can't understand Debian, ARMv7 and so on...(Kindle is my first non-windows experience!)
Jumping into the deep end of the pool is one way of learning to swim.
Plus, there is a nice guide to de-bricking your KT available for when things go wrong.

I am a non-Windows user myself, I wouldn't admit I have a windows license in public, even if I did.
So I can't help you with directions on how to do this under Win-Anything.

Now if you happened to have a "Linux LiveCD" handy, of the type that lets you save your work (or to write to your windows file system)...

Read this:
https://www.linux.com/learn/tutorial...linux-live-cds

And then pick their #1 choice to burn to CD, take two asprin, call me when done.

Last edited by knc1; 06-09-2012 at 09:11 AM.
knc1 is offline   Reply With Quote
Old 06-09-2012, 09:57 AM   #6
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
How to extract any ARM binary from Debian archive

rar isn't available for armel/armhf Linux. It's proprietary archiver with closed source and developer didn't compiled it for discussed [KT] platform.

However, unrar utility is provided with sources, so it could be found in compiled form for armel/armhf Linux. As knc1 said, you can extract it from appropriate Debian package.

Debian archive could be searched for needed package at http://http://www.debian.org/distrib/packages. Or by shortcut: http://packages.debian.org/<package name>.

So, go to http://packages.debian.org/unrar. As you will see, there is unrar package and it's available for armel (and, starting from Wheezy, for armhf) architecture. Look for most recent version, then press on nearby link, which is looking like: sid (unstable) (choice of sid is just example) and you'll land on package page. At the end of page, there is list of links to this package compiled for various architectures. Click on armhf armel link (thanks to baf for pointing to advantages of armhf over armel; but stock Kindle libraries aren't compiled with armhf ABI, so for dynamically linked binaries one should use armel-specific variant), and you'll land on page with direct links to package on archive mirrors. Click on any of them and you'll download the package.

.deb package is an ar archive containing compressed tar archives (more info). So if you're ok with using of ar and tar utilities, you can unpack downloaded .deb, then unpack data.tar.gz, and you'll find unrar-nonfree binary at the path usr/bin. Otherwise, try to look for online services which could unpack ar/tar (or, maybe, deb).

Last edited by eureka; 11-24-2012 at 08:47 AM. Reason: armel is "better" than armhf
eureka is offline   Reply With Quote
Old 06-09-2012, 09:59 AM   #7
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
Quote:
Originally Posted by silver18 View Post
Well, I'm trying to support CBZs and CBRs files for my ImageGallery.
CBZs are easy: I can rename to zip then unzip and everything is fine...
CBRs could be renamed to rar, but then I don't know what to do...

I need only unrar, but I really can't understand Debian, ARMv7 and so on...(Kindle is my first non-windows experience!)
Not a problem, other people here do and you don't have to get very deep into Linux to do what you state above...

So after following my post above...

You want to extract an rar named *.CBR and create an *.CBZ from the contents. Should be a piece of cake.

What about the password(s)?
If the *.CBR (a.k.a: *.rar) is password protected, do you want the same password protection on the *.CBZ (a.k.a: *.zip)?

Please correct me if I misunderstood something about those file format relationships.

Another (advanced) thought to keep in mind...
There is a filesystem driver for Linux that lets it open a *.zip as a filesystem.
I.E: You don't have to extract a file from the *.zip to read it, the *.zip just looks like a directory (folder).
Not sure if the Kindle has that filesystem driver installed or even included, but it is a thought to keep in mind.
knc1 is offline   Reply With Quote
Old 06-09-2012, 10:15 AM   #8
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by eureka View Post
rar isn't available for armel Linux. It's proprietary archiver with closed source and developer didn't compiled it for discussed [KT] platform.

However, unrar utility is provided with sources, so it could be found in compiled form for armel Linux. As knc1 said, you can extract it from appropriate Debian package.

Debian archive could be searched for needed package at http://http://www.debian.org/distrib/packages. Or by shortcut: http://packages.debian.org/<package name>.

So, go to http://packages.debian.org/unrar. As you will see, there is unrar package and it's available for armel architecture. Look for most recent version, then press on nearby link, which is looking like: sid (unstable) and you'll land on package page. At the end of page, there is list of links to this package compiled for various architectures. Click on armel link, and you'll land on page with direct links to package on archive mirrors. Click on any of them and you'll download the package.

.deb package is an ar archive containing compressed tar archives (more info). So if you're ok with using of ar and tar utilities, you can unpack downloaded .deb, then unpack data.tar.gz, and you'll find unrar-nonfree binary at the path usr/bin. Otherwise, try to look for online services which could unpack ar/tar (or, maybe, deb).
Ok, I unpacked deb file and now I have usr/bin/unrar-nonfree. Should I place it (only unrar-nonfree) in Kindle /usr/bin?

Why you said to use "sid (unstable)" and not "squeeze (stable)" version?

Thanks a lot!!

Quote:
Originally Posted by knc1 View Post
Not a problem, other people here do and you don't have to get very deep into Linux to do what you state above...

So after following my post above...

You want to extract an rar named *.CBR and create an *.CBZ from the contents. Should be a piece of cake.

What about the password(s)?
If the *.CBR (a.k.a: *.rar) is password protected, do you want the same password protection on the *.CBZ (a.k.a: *.zip)?

Please correct me if I misunderstood something about those file format relationships.

Another (advanced) thought to keep in mind...
There is a filesystem driver for Linux that lets it open a *.zip as a filesystem.
I.E: You don't have to extract a file from the *.zip to read it, the *.zip just looks like a directory (folder).
Not sure if the Kindle has that filesystem driver installed or even included, but it is a thought to keep in mind.
I didn't managed to explain myself!!
I need to unpack CBZ and CBR files in order to read what's in them (images) with ImageGallery.
I managed to do this with CBZ as Kindle already has unzip command.
I'm trying now to do the same with CBR, that's why I need unrar!

If what I've done so far (download the package and place it in /usr/bin) provides me a feasible way of unpacking rars, then I have all I need!!

Last thing is: how can I make users have unrar in their Kindles?
Should I copy it during the installation of ImageGallery?
Is it safe?
What about future firmware updates?
silver18 is offline   Reply With Quote
Old 06-09-2012, 10:29 AM   #9
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by silver18 View Post
Ok, I unpacked deb file and now I have usr/bin/unrar-nonfree. Should I place it (only unrar-nonfree) in Kindle /usr/bin?

Why you said to use "sid (unstable)" and not "squeeze (stable)" version?

Thanks a lot!!
You could place it (the binary unrar-nonfree) anywhere with any name. It doesn't matter.

Stable in squeeze (stable) isn't [just] about of quality of binary. It's mostly about of quality of whole Debian distribution (i.e. big set of Debian packages and infrastructure). As you're just downloading one package for it's executable binary, you should primarily look at program stableness, not at the whole Debian distribution stableness, so the main difference will be in program version. Unrar in sid has more recent version than unrar in squeeze, so I've said to download from sid archive.
eureka is offline   Reply With Quote
Old 06-09-2012, 10:33 AM   #10
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
Quote:
Originally Posted by eureka View Post
At the end of page, there is list of links to this package compiled for various architectures. Click on armel link
You can also choose armhf package, which makes use of hardware floating point architecture (VFPv3) provided by cortex a8 cpu.
baf is offline   Reply With Quote
Old 06-09-2012, 10:35 AM   #11
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by baf View Post
You can also choose armhf package, which makes use of hardware floating point architecture (VFPv3) provided by cortex a8 cpu.
Good point. Thanks!
eureka is offline   Reply With Quote
Old 06-09-2012, 10:40 AM   #12
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Ok, got it!
So, let's suppose I place unrar-nonfree in /mnt/us/.
I have my shell open and a rar file (example.rar) in /mnt/us....
How do I unrar it?
I ask this because it read it should be something like "unrar e example.rar", but it doesn't work!
silver18 is offline   Reply With Quote
Old 06-09-2012, 10:40 AM   #13
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
Quote:
Originally Posted by baf View Post
You can also choose armhf package, which makes use of hardware floating point architecture (VFPv3) provided by cortex a8 cpu.
Which would limit the use of the image gallery to the KT.
The other kindles (ARMv6) only have VFP.
knc1 is offline   Reply With Quote
Old 06-09-2012, 10:47 AM   #14
eureka
but forgot what it's like
eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.eureka ought to be getting tired of karma fortunes by now.
 
Posts: 741
Karma: 2345678
Join Date: Dec 2011
Location: north (by northwest)
Device: Kindle Touch
Quote:
Originally Posted by silver18 View Post
Ok, got it!
So, let's suppose I place unrar-nonfree in /mnt/us/.
I have my shell open and a rar file (example.rar) in /mnt/us....
How do I unrar it?
I ask this because it read it should be something like "unrar e example.rar", but it doesn't work!
Use the absolute path:
Code:
/mnt/us/unrar e /mnt/us/example.rar
eureka is offline   Reply With Quote
Old 06-09-2012, 10:51 AM   #15
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
Quote:
Originally Posted by silver18 View Post
I didn't managed to explain myself!!
I need to unpack CBZ and CBR files in order to read what's in them (images) with ImageGallery.
I managed to do this with CBZ as Kindle already has unzip command.
But unzip'ing the file takes time and file space.
If your Kindle supports FUSE ( and I think it does), then you just have to mount the *.zip file like any other filesystem device:
http://code.google.com/p/fuse-zip/
Once you have that installed on your Kindle.
Your application program will never know the difference between a *.zip file and the for-real filesystem on /mnt/us.

Note: with only 256Mbyte of ram and no swap file enabled, you will not be able to __write__ large *.zip files, but you should be able to read them.

Last edited by knc1; 06-09-2012 at 10:54 AM.
knc1 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
RAR CONVERSON TO EPUB buddy Calibre 4 03-09-2012 08:42 PM
convert rar to epub chipa Introduce Yourself 4 03-04-2012 04:32 PM
Adding .rar 'format' as rar. Iocane Calibre 3 12-08-2011 09:48 AM
RAR extension postrof General Discussions 4 01-16-2011 10:08 PM
funky rar hogleg HanLin eBook 6 12-10-2007 02:41 AM


All times are GMT -4. The time now is 11:18 PM.


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