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 05-15-2017, 03:03 PM   #1
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 641
Karma: 1700000
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Using the Experminental Browser for local files

I don't see any recent discussions about this, so I thought I'd bring it up again.

I was playing around in the Experimental Browser on my PW3, and found I was able to open HTML files on the local folders.

I was not able to follow relative links in the file, but absolute links did work
Code:
<a href="#Chapter21">Doesn't work</a>
Code:
<a href="/mnt/us/LesMiserables.html">Does work</a>
If there have been any recent discussions about this, feel free to point me at them, otherwise I can provide some more information about some interesting things I was able to do with this.
coplate is offline   Reply With Quote
Old 05-15-2017, 03:10 PM   #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: 18210807
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Rename the file extension to: .txt
Then you can open it in the book reader (the book reader does html also).
knc1 is offline   Reply With Quote
Advert
Old 05-15-2017, 03:39 PM   #3
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 641
Karma: 1700000
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
To clarify, I am looking to start a discussion about useful things that we can do inside of the browser, not in the reading programs.

I have found some things that I think would be useful for developers, and wanted to know if we had an existing thread about it.

I know there was an ancient thread about using NPAPI ( Netscape plugin API ), to run LIPC commands from the browser, but that has been removed form more recent firmware.
coplate is offline   Reply With Quote
Old 05-15-2017, 06:18 PM   #4
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: 18210807
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by coplate View Post
To clarify, I am looking to start a discussion about useful things that we can do inside of the browser, not in the reading programs.

I have found some things that I think would be useful for developers, and wanted to know if we had an existing thread about it.

I know there was an ancient thread about using NPAPI ( Netscape plugin API ), to run LIPC commands from the browser, but that has been removed form more recent firmware.
Thanks for the clarification.

But now you know the browser is not the only thing that will display html on the Kindle.

The NPAPI was pulled because of the security threat that it posed to the system.
That was the one responsible for CERT notice on the Kindles.
(I posted a link to that fairly recently in response to some other question here.)

But knowing how to open a document in the browser would be nice to document (you might want to start a Wiki page on the subject).
IIRC, the last time anything on that was posted here was about 5.3.x or 5.4.x firmware version.

And maybe a comparison between the current firmware's browser implementation and our build of Skipstone (which is also getting fairly old by now).
There are users here that only use Skipstone (on K5, IIRC).
So there are users here that would be interested if Lab126 has closed the feature gap any over the last couple of years.

Last edited by knc1; 05-15-2017 at 06:23 PM.
knc1 is offline   Reply With Quote
Old 05-16-2017, 11:53 AM   #5
theol0403
Enthusiast
theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!theol0403 is faster than a rolling 'o,' stronger than silent 'e,' and leaps capital 'T' in a single bound!
 
Posts: 37
Karma: 50278
Join Date: Feb 2017
Device: Kindle PW3
note

Just In case you didnt know, file:///mnt/us/ on the browser lets you navigate your file contents.
theol0403 is offline   Reply With Quote
Advert
Old 05-16-2017, 12:31 PM   #6
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 641
Karma: 1700000
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Yeah, I'll put it in the thread, because it doesn't look like it's out there yet:

if you put an html document in the root folder, you can navigate to it at
file:///mnt/us/index.html.

If you put a link to the system root in that document, you can get there, and it will list the directories.
Code:
<a href="/">FS Root</a>
If you click that link, the title bar of the browser changes to "OMG!", and you can follow the directory path, without errors.

Not all folders are available though, for example "/usr/bin" is not available, but "/usr/java/lib/fonts" is, which isn't too useful.

I have not yet tried putting in an href to one of the folders that doesn't shop up on the list, if anyone wants to try.

one problem, is that you cannot use the back button, because that correctly triggers the protections, same as if you had tried to put /etc into the address bar manually.

I wonder if Javascript and a frame could be used to take care of that issue.
coplate is offline   Reply With Quote
Old 05-16-2017, 02:02 PM   #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: 18210807
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
It might very well only be showing you what is in the chroot.
(Which isn't complete.)

Find something you can do that causes the Kindle to reboot to 'diags' -
IIRC. we can jailbreak 'diags'.

and/or

Try viewing the previous "universal" (poison file name) jailbreak in the browser, see if they fixed the browser when they 'fixed' the poison file name method.

That is, this one:
https://www.mobileread.com/forums/sh...d.php?t=186645

Last edited by knc1; 05-16-2017 at 02:18 PM.
knc1 is offline   Reply With Quote
Old 05-16-2017, 06:03 PM   #8
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 641
Karma: 1700000
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
I know that I cannot use filenames like that in the search shortcuts, lipc-set throws an error on all the fun characters like
Code:
$, (, ', " etc.
I wouldn't expect a web browser to pass the url as an argument to system, like I'm sure the update does/did, but I can try it when I get home, to try to see things.

But there is some different behavior from typing an address in, vs clicking al ink to the same path that I will play with.

Last edited by coplate; 05-16-2017 at 06:06 PM.
coplate is offline   Reply With Quote
Old 05-16-2017, 06:46 PM   #9
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: 18210807
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by coplate View Post
I know that I cannot use filenames like that in the search shortcuts, lipc-set throws an error on all the fun characters like
Code:
$, (, ', " etc.
I wouldn't expect a web browser to pass the url as an argument to system, like I'm sure the update does/did, but I can try it when I get home, to try to see things.

But there is some different behavior from typing an address in, vs clicking al ink to the same path that I will play with.
The inspiration came from the post above about putting a plain html file in the top of visible storage to hold links the person is interested in.

That caused me to think that the browser had not been checked if it is subject to "poison URLs".
Very old school way to subvert a *nix system, but still worth checking.

= = = =

There are people here that would like to see nested collections brought back (Kindles used to support nested collections).

It would be a rather straight foreward processing problem to copy the directory structure under /documents into a html page.

Find and look into the interior of my "cpu report" - that is the one with script generated html that the reader likes.
All of the grouping html functions seem to be working in the reader.

I never opened it with the browser - but I suppose you could (might have to rename the filename extension).

Last edited by knc1; 05-16-2017 at 06:52 PM.
knc1 is offline   Reply With Quote
Old 05-16-2017, 09:01 PM   #10
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 641
Karma: 1700000
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Hmm. I'm not sure I can think of anything useful to do, maybe I'm misunderstanding the what you main by "poison url".

From what you linked, the update was named with the shell script included in it, withthe hope that the script that runs that would execute in a shell, yeah?

I'm not sure what to try to use that in the browser.

I have tried this, and it did open a regular file with that name
Code:
<a href="./index$(date).html?var=$(date)">CLICK ME</a> <br />
coplate is offline   Reply With Quote
Old 05-16-2017, 09:08 PM   #11
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: 18210807
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
That is interesting.
If I understand you correctly (the variables do de-reference) we can execute 'date' with the browser.
That is a step in the right direction.

Now if we can execute idme (with arguments) the Kindle can be forced to reboot to 'diags' - which we should be able to jailbreak.

= = = =

Yes, if a program on a *nix (POSIX compliant - which the Kindle OS is) opens that with:
Code:
#include <stdlib.h>
int system(const char *command)
With that funky looking filename, the system shell will execute the filename as an in-line script.

Been there since K&R days.

Amazon no longer uses the 'system' call to open a file before they sanitize the filename.*
(Which is how they 'fixed' our prior universal jailbreak.)

* Somebody @Lab126 finally RTFM (man system).

(and these are the people (Amazon) that run Linux on the world's 18th largest super computer - IIRC the last time I checked)

Last edited by knc1; 05-16-2017 at 09:25 PM.
knc1 is offline   Reply With Quote
Old 05-16-2017, 09:19 PM   #12
coplate
Guru
coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.coplate ought to be getting tired of karma fortunes by now.
 
Posts: 641
Karma: 1700000
Join Date: Jun 2009
Device: prs-505, Kindle Keyboard 3g, PW3
Quote:
Originally Posted by knc1 View Post
That is interesting.
If I understand you correctly (the variables do de-reference) we can execute 'date' with the browser.

No, I meant to say it opens the file named 'index$(date).html', and not the file named 'index2017....'.
coplate is offline   Reply With Quote
Old 05-16-2017, 09:20 PM   #13
ash2017
Member
ash2017 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2017
Device: Kindle Paperwhite
Is it possible to make an ebook(azw3/mobi) linking all other books? So that, when I click a link, it will open that book.
ash2017 is offline   Reply With Quote
Old 05-16-2017, 09:28 PM   #14
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: 18210807
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by ash2017 View Post
Is it possible to make an ebook(azw3/mobi) linking all other books? So that, when I click a link, it will open that book.
That functionality is provided by KPVbooklet (a part of the KOreader project).

Note that 8th. generation Kindles are suppose to have azw3 active content disabled (but they don't in Germany).
But that is the reason we have to provide a booklet version of KUAL for those devices outside of Germany.
knc1 is offline   Reply With Quote
Old 05-16-2017, 09:37 PM   #15
ash2017
Member
ash2017 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: May 2017
Device: Kindle Paperwhite
Thanks knc1 for the reply. In my case, it is not jail broken and firmware version is 5.8.9 :-(
Any other way to make a catalog like this?
My device is paperwhite 7th generation.
ash2017 is offline   Reply With Quote
Reply

Tags
browser, html

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Local html in browser? mm5 iRiver Story 2 02-16-2012 07:43 PM
local html file with K3 browser Reeeder Kindle Developer's Corner 0 08-28-2011 06:41 AM
PRS-950 Can PRS-950 web browser view local HTML files? roc Sony Reader 3 04-02-2011 11:58 AM
Browser doesn't load local HTML files? kenjennings enTourage Archive 1 02-19-2011 10:52 AM
Kindle Browser and local files slm Amazon Kindle 2 06-03-2008 09:29 PM


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


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