View Single Post
Old 10-03-2011, 09:12 PM   #15
thomass
Wizard
thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.thomass ought to be getting tired of karma fortunes by now.
 
Posts: 1,642
Karma: 1915537
Join Date: Mar 2011
Location: Türkiye
Device: Kindle 5.3.7
Quote:
Originally Posted by PoP View Post
@tsinghoo Thanks. Your VNC client is a great Kindlet implementation. It would be so nice if you could share the java sources.
I particularly liked 1) the virtual keyboard 2) using CTRL to toggle moving cursor or mouse pointer 3) supporting passwords at login.




@fau, @thomass
After unpacking the install bin, I manualy installed the Kindlet, since I wanted to see which files were modified in the file system.

In a SSH session,

1) I Merged tsinghoo.keystore to my /var/local/java/keystore/developer.keystore
For convenience, I have attached my own keystore Attachment 77314 which contains dev keys for all developers of this forum to date (except for vanhoa, the chinese chess developer, which I don't know the keystore password).

2) I updated /opt/amazon/ebook/security/external.policy granting to
"*:80-" the following additional SocketPermissions.
Spoiler:

/*
Kindlet permissions
*/
keystore "kindlet.keystore", "JKS";

// Permissions all Kindlets should have
grant signedBy "Kindlet" {
permission java.net.SocketPermission "*:80-", "accept, connect, listen, resolve";

permission java.util.PropertyPermission "java.home", "read";
permission java.util.PropertyPermission "runtime_exec", "read";
permission java.util.PropertyPermission "kindlet.home", "read";

/* Standard Java properties. This list only covers properties that do not unnecessarily leak
* information. user.dir, user.home and user.name are explicitly not permitted.
* See http://java.sun.com/javame/reference...getProperties()
*/
// Information about the version of Java the application is running on
permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";
permission java.util.PropertyPermission "java.verbose", "read";

// For code that behaves differently under Windows. The version of Linux is already available
// externally due to open source licenses.
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "os.version", "read";

// File, path and line separators
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";
};

// Permissions needed by Kindlets that can use the network
grant signedBy "KindletNetworkSupport" {
// Network access by Kindlets must be controlled
permission com.amazon.kindle.kindlet.internal.net.security.Ne tworkAccessPermission "createConnection";
};

// Permissions needed by the Java framework &/or Kindlets that have a UI
grant signedBy "KindletInteractionSupport" {
/* Required by Component#frameBufferSync */
permission java.util.PropertyPermission "awt_fb_enable", "read";

/* E-ink framebuffer specific properties. */
permission java.util.PropertyPermission "fiona_fb_flag", "read";
permission java.util.PropertyPermission "fiona_fb_command", "read";

permission java.util.PropertyPermission "fiona_partial_update_upper_x", "read";
permission java.util.PropertyPermission "fiona_partial_update_lower_x", "read";
permission java.util.PropertyPermission "fiona_partial_update_upper_y", "read";
permission java.util.PropertyPermission "fiona_partial_update_lower_y", "read";

permission java.util.PropertyPermission "fiona_screen_effect", "read";

/* The event queue that Kindlet has access to is in its own AppContext. */
permission java.awt.AWTPermission "accessEventQueue";

/* Properties provided by the PBP. See
* http://java.sun.com/javame/reference...roperties.html
*/
permission java.util.PropertyPermission "java.awt.AlphaComposite.SRC_OVER_.isRestricte d", "read";
permission java.util.PropertyPermission "java.awt.Graphics2D.setStroke.BasicStroke.isRestr icted", "read";
permission java.util.PropertyPermission "java.awt.event.MouseEvent.isRestricted", "read";
permission java.util.PropertyPermission "java.awt.event.MouseEvent.supportLevel", "read";
permission java.util.PropertyPermission "java.awt.event.KeyEvent.isRestricted", "read";
permission java.util.PropertyPermission "java.awt.event.KeyEvent.supportMask", "read";
permission java.util.PropertyPermission "java.awt.Component.setCursor.isRestricted", "read";
/* The optional permissions for java.awt.Frame are not granted since Frame is not whitelisted. */


};

// Permissions needed by 3rd party libs provided with the SDK
grant codeBase "file:///opt/amazon/ebook/sdk/lib/-" {
permission java.util.PropertyPermission "org.w3c.dom.DOMImplementationSourceList", "read";
};


3) And I copied the KindleVNC.azw2 Kindlet to my documents directory.

Thus backing up your developer.keystore and your java external.policy prior to installing the bin is all you need to manualy uninstall the application later. Keeping the updated keystore and policy will not hurt and you can simply just delete the KindleVNC.azw2 to uninstall.
Thanks for the info about uninstall info and keystore file. It is good to have a safe way for uninstall in case we need. I think your keystore file should be included into the hack list thread also.
thomass is offline   Reply With Quote