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 03-30-2012, 09:26 PM   #1
vaniaspeedy
Connoisseur
vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.
 
Posts: 51
Karma: 9502
Join Date: Oct 2010
Location: California
Device: Kindle 3 WiFi, Kindle 4 Touch
Password protecting collections {idea}

--- edit ---
So, it seems like this idea has been done by ixtab, that wonderful coder. Here's a link for the patch.
http://www.mobileread.com/forums/sho...d.php?t=175512

The tweak protects individual books. More info and analysis about it here:
http://www.mobileread.com/forums/sho...0&postcount=89

--- original post ---
There's been an idea of password protecting collections originally brought up in this thread: http://www.mobileread.com/forums/sho...2024093#post21

Copy of the post in spoiler:
Spoiler:
Quote:
Originally Posted by kindleholic View Post
What about instead of "moving" the files from one folder to another "in-the-field" explore the possibility of having password protection for Collections, or for selected book?

I use it and my friends would like to borrow it to read specific books, lets say I open the book for them, so they would have to go back to Menu and browse for other Collections or Books, and if they want to open them, VOILA! password protection.

There are many reasons to implement a system of password protecting some books or documents, no need to use encryption for the file, just protect it from access on-the-go.

Let me know how possible is this. I am learning Linux, but I am far away to being able to write such application by myself. Still if there is anything that I can contribute, I am more than happy to do so.
This is a fantastic idea! This is more java than linux though, since on the linux end the most I can do is move files. The user end of the kindle is mostly java and html (see here), so this hack would involve creating some code that could intercept the action of opening a collection and prompt for a password. I know on the iOS platform "mobile substrate" is a prime example, however I'm not sure if anyone has created a similar tweak for the kindle.

I have a limited understanding of java, but I think this is very doable. The skeleton code would be like this:

Code:
Function.onClick() { //when someone clicks on a collection, do this
    passwordPrompt(); //prompt for a password
    openCollection(); //or do whatever it is the kinlde does on click

}//end Function.onClick

Function.passwordPrompt(){
// check if this is a protected collection
// if no then quit
// if yes continue
// prompt for password (using an html popup?)
// check if password is valid
 if (Valid)
   open collection // just use break
 else
   quit //with non-zero exit code
}//end passwordPrompt
*Note - this is dummy code, none of it actually works



Can someone post a hint or two on where to get started? I don't really want to decompile, edit, and compile the GUI. Is there a way to inject code, like how iOS uses mobile substrate? Any input appreciated. Thanks!

Last edited by vaniaspeedy; 05-26-2012 at 05:18 PM.
vaniaspeedy is offline   Reply With Quote
Old 03-31-2012, 08:51 AM   #2
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,903
Karma: 6677485
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
I'm afraid there is no way around at least the "decompiling" step, in order to even understand what is going on internally. If you're lucky, you may find ways to "inject" custom code without changing original classes, but it really depends on the implementation. And the implementation is almost guaranteed to be (at least slightly) different for the various devices...
ixtab is offline   Reply With Quote
Old 04-02-2012, 07:02 AM   #3
JustAMan
Groupie
JustAMan doesn't litterJustAMan doesn't litter
 
JustAMan's Avatar
 
Posts: 153
Karma: 113
Join Date: Jan 2012
Location: Russia
Device: Kindle Touch
Hmm, another idea might be using password-protected archives (maybe tar/gzip supports those?..) to pack books that you want to password-hide and unpack them when you want them to show? Still user error-prone (one might forget to "hide" his books, no password prompt on opening a book, etc.), but a way to start...
JustAMan is offline   Reply With Quote
Old 04-02-2012, 12:48 PM   #4
vaniaspeedy
Connoisseur
vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.
 
Posts: 51
Karma: 9502
Join Date: Oct 2010
Location: California
Device: Kindle 3 WiFi, Kindle 4 Touch
Quote:
Originally Posted by JustAMan View Post
Hmm, another idea might be using password-protected archives (maybe tar/gzip supports those?..) to pack books that you want to password-hide and unpack them when you want them to show? Still user error-prone (one might forget to "hide" his books, no password prompt on opening a book, etc.), but a way to start...
I still would need a way to inject code that could catch the user touching a specified field and create a password box. It seems like there are 3 main steps

1. figure out how to intercept the user's touch
2. create a dialog that receives and checks the password
3. some action that will make the books accessible after the password is entered

For 1, we could use the GUI launcher, but then might as well use the folder hider plug in instead.

Thoughts?
vaniaspeedy is offline   Reply With Quote
Old 04-02-2012, 01:11 PM   #5
hawhill
Wizard
hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.hawhill ought to be getting tired of karma fortunes by now.
 
hawhill's Avatar
 
Posts: 1,083
Karma: 2114647
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
If it's for single books, another option comes to my mind. You could implement another FUSE based layer filesystem that does encryption of data and on file access (e.g. first read) pop up a password interface.

That said, I'm using a FUSE interface to ZIP files on my K3. I never bothered to add in a user interface, though. I'm just mounting and unmounting with a launchpad keyboard shortcut. From a developer's standpoint, it is an esoteric solution: I used the Go language for that. In fact, I did not write a single bit of code, I just re-used an example which comes with go-fuse (https://github.com/hanwen/go-fuse), "zipfs". It would not be hard to extend this to some point and implement encryption support (maybe even ZIP's AES encryption). I would also add an external interface to provide a password that is stored for a given amount of time. Using that interface, a GUI launcher based solution could be implemented to ask for a password and pass it to the filesystem daemon.

But don't be too optimistic - this is still hard developer work. I just wanted to offer an example for a possible solution. If I have some free time, I might open another thread and go into detail how I use that "zipfs" in my workflow on a K3.
hawhill is offline   Reply With Quote
Old 04-05-2012, 01:47 PM   #6
vaniaspeedy
Connoisseur
vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.
 
Posts: 51
Karma: 9502
Join Date: Oct 2010
Location: California
Device: Kindle 3 WiFi, Kindle 4 Touch
Quote:
Originally Posted by hawhill View Post

But don't be too optimistic - this is still hard developer work. I just wanted to offer an example for a possible solution. If I have some free time, I might open another thread and go into detail how I use that "zipfs" in my workflow on a K3.
Agreed, it does seem like quite a major project. It would be great to see your work in this area, it would help a lot.
vaniaspeedy is offline   Reply With Quote
Old 05-12-2012, 02:14 PM   #7
vaniaspeedy
Connoisseur
vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.
 
Posts: 51
Karma: 9502
Join Date: Oct 2010
Location: California
Device: Kindle 3 WiFi, Kindle 4 Touch
Quote:
Originally Posted by ixtab View Post
I'm afraid there is no way around at least the "decompiling" step, in order to even understand what is going on internally. If you're lucky, you may find ways to "inject" custom code without changing original classes, but it really depends on the implementation. And the implementation is almost guaranteed to be (at least slightly) different for the various devices...
I recently stumbled upon your project of the jbpatch. Seems like now there IS a way to "inject" custom code, thanks to you. Am I correct in assuming that with the combination of your work and this idea success is near?

Last edited by vaniaspeedy; 05-12-2012 at 03:03 PM.
vaniaspeedy is offline   Reply With Quote
Old 05-26-2012, 05:18 PM   #8
vaniaspeedy
Connoisseur
vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.vaniaspeedy knows what is on the back of the AURYN.
 
Posts: 51
Karma: 9502
Join Date: Oct 2010
Location: California
Device: Kindle 3 WiFi, Kindle 4 Touch
So, it seems like this has been done by ixtab, that wonderful coder. Here's a link for the patch.
http://www.mobileread.com/forums/sho...d.php?t=175512

The tweak protects individual books. More info and analysis about it here:
http://www.mobileread.com/forums/sho...0&postcount=89
vaniaspeedy is offline   Reply With Quote
Reply

Tags
collections, gui, inject, mobilesubstrate, password

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Protecting a Kobo eReader at the gym? triffids Kobo Reader 7 10-28-2010 10:17 PM
protecting epub files from copying & printing cyberbaffled ePub 26 07-20-2010 06:46 AM
PRS-600 Advice: protecting the ereader edlauzon Sony Reader 1 07-18-2010 12:48 PM
Protecting the PRS-700 abermp Sony Reader 14 05-09-2009 12:51 AM


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


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