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 07-23-2014, 04:28 PM   #1
Ricky23289
Member
Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.
 
Posts: 13
Karma: 9668
Join Date: Dec 2013
Device: Kindle touch
Post Kindle Kindlet Jailbreak (KKJB) - Template project and HOWTO

Hi there,

first of all: I'd like to call it KKJB as "Kindle Jailbreak" and "Kindlet jailbreak" looks too much the same.

This project is based on the source code of KUAL and ixtab's KKJB.

If you simply use the template, read the following
Spoiler:

Todos for using the Project:
- Copy the folder AllPermissionKindletTemplate to your Workspace
- Rename to whatever the name of your new project should be
- import your kindle libraries to the project
- edit the entries in build.properties
-> at least: set the "product.mainclass"-value to a valid one that points to your class
-> decide which signing method you want to use
- extend your main class from com.mobileread.KKJBConnector.KKJBConnector


The things I've struggled with most:(don't get the same problems)
Spoiler:

- the KKJB jar (jailbreak.jar) must be in your project and included in your libraries list
- the three java files (kindletJailbreakAlternative, LauncherKindletJailbreak,OutputObject) must be in your project and referrable from other source files
- All the class-files, that are contained in the KKJB jar must be in your final azw2 file with the structure com/mobileread/ixtab/*.class otherwise you will get a "no main class found"-error


Complete walk-through for binding the KKJB in your Project. Just take the pieces out, that you need
Spoiler:

- create a new project
- (add the kindle-jars to the project)
- create a "libs" folder in your project
- Add the KKJB-jar to the "libs" folder (simply drag&drop it into the project)
- now you can go to project properties -> build path -> libraries -> add jar
and add the KKJB jar
- create a new file "build.xml" in your project (we're going to build our file using ant)
the file should have a content like this (edit the file with your data)
Spoiler:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<project name="xxPROJECTNAMExx.makejar" default="makejar" basedir=".">	
  <property file="build.properties"/>

		<target name ="makejar" description="xxDESCRIPTIONxx">			
			<jar jarfile="xxOUTPUTNAMExx.azw2" includes="*.class" basedir="bin">
			    <manifest>
			    	<attribute name="Implementation-Vendor" value="${sign.aliases}"/>
			    	<attribute name="Extension-List" value="SDK"/>
			    	
			      <attribute name="Implementation-Title" value="${product.filename}"/>
			      <attribute name="SDK-Specification-Version" value="${product.kdk-version}"/>
			      <attribute name="Implementation-Version" value="${product.version}"/>
			      <attribute name="Toolbar-Mode" value="persistent"/>
			      <attribute name="SDK-Extension-Name" value="com.amazon.kindle.kindlet"/>
			      <attribute name="Main-Class" value="${product.mainclass}"/>
			    </manifest>  	
				
				<!-- this includes the KKJB jailbreak (NECESSARY!)-->
				<zipfileset src="libs/jailbreak.jar">
					<include name="**/*.class"/>
				</zipfileset>
				
				<!-- actual program files -->
				<fileset dir="${build.dir}">
					<include name="**/*.class"/>
				</fileset>
			</jar>	
			
			<!--
			 *********************************
			 **** signing the output file ****
			 *********************************
			-->
			 
			<!-- !!!! Use these commands instead, if it works for you !!! -->
			<!--
			<signjar jar="${file}" keystore="${sign.keystore.file}" storepass="${sign.keystore.password}" alias="dk${sign.aliases}"/>
			<signjar jar="${file}" keystore="${sign.keystore.file}" storepass="${sign.keystore.password}" alias="di${sign.aliases}"/>
			<signjar jar="${file}" keystore="${sign.keystore.file}" storepass="${sign.keystore.password}" alias="dn${sign.aliases}"/>
			-->
			<!-- signing jars the exec way, as ant is fucking to stupid to accept my classpath -.-"""" --> 
			
			<exec executable="${sign.jarsigner.path}">
				<arg value="-keystore"/>
				<arg value="${sign.keystore.path}/${sign.keystore.file}"/>
				<arg value="-storepass"/>
				<arg value="${sign.keystore.password}"/>
				<arg value="${file}"/>
				<arg value="dk${sign.aliases}"/>
			</exec>
			<exec executable="${sign.jarsigner.path}">
				<arg value="-keystore"/>
				<arg value="${sign.keystore.path}/${sign.keystore.file}"/>
				<arg value="-storepass"/>
				<arg value="${sign.keystore.password}"/>
				<arg value="${file}"/>
				<arg value="di${sign.aliases}"/>
			</exec>
			<exec executable="${sign.jarsigner.path}">
				<arg value="-keystore"/>
				<arg value="${sign.keystore.path}/${sign.keystore.file}"/>
				<arg value="-storepass"/>
				<arg value="${sign.keystore.password}"/>
				<arg value="${file}"/>
				<arg value="dn${sign.aliases}"/>
			</exec>
			
			
	</target>
</project>

! Make sure that the KKJB-jar is located in the "libs" folder. If not, change the location of the KKJB or edit the entry in the build.xml (at the position "this includes the KKJB jailbreak")
! the build.xml file will also sign the output for you, if you provide a proper path (see next point)

- create a "file build.properties" in your project
- the file should have a structure as follows (edit the content with your data)
Spoiler:

Code:
# do not change these values for compatibility among kindlets
sign.keystore.file=developer.keystore  
sign.keystore.password=password
sign.aliases=test

# the following two are only for using the command-line way to sign your files
sign.jarsigner.path=PATH_TO_JARSIGNER/jarsigner.exe
sign.keystore.path=PATH_TO_DEVELOPER.KEYSTORE

# this Version should point to the Version you're using
product.kdk-version=2.1
product.filename=xxNAME_OF_THE_OUTPUT_FILExx
product.extension=azw2
product.name=xxNAME_THAT_WILL_BE_DISPLAYED_ON_KINDLExx
product.version=1.0


product.vendor=xxPROBABLY_YOUR_NAMExx 
# change the following to match your class
product.mainclass=com.mobileread.KKJBTemplate
#product.image=KindleLauncher.jpg
build.dir=bin
#build.classpath.jdk14=/opt/j2sdk1.4.2_19/jre/lib


- create a new package com.mobileread.ixtab
- copy the following files in there:
Spoiler:

- kindletJailbreakAlternative.java
- LauncherKindlet.Jailbreak.java
- OutputObject.java


at least from here, you should look into the files included in this post. If you mostly know what to do, you can follow the steps on here
- create a new class, that extends SuicidalKindlet in the package com.mobileread.KKJBConnector
- you also need to import the KKJB classes with
Spoiler:

import ixtab.jailbreak.Jailbreak;
import ixtab.jailbreak.SuicidalKindlet;
import com.mobileread.ixtab.LauncherKindletJailbreak;

- create the following method (this is important!):
Spoiler:

Code:
protected Jailbreak instantiateJailbreak() {
		return new LauncherKindletJailbreak();
	}
- if LauncherKindletJailbreak could not be found:
it's declared in "LauncherKindletJailbreak.java". Make sure it is included in your project and imported in the file

- create a method "onstart" that looks at least like this
Spoiler:

Add a boolean variable to the class called "started" (initial value = false)
Code:
public void onStart() 
	{
		// apparently this method gets called various times
		if (started) {
			return;
		}
		super.onStart();
		started = true;
		
		/*** 
			your Code might come here
		***/

	}


- create an onCreateMethod:
Spoiler:

Code:
private KindletContext context;
public void onCreate(KindletContext context)
	{
		super.onCreate(context);		
		this.context = context;		
	}



Where do I find the KKJB?
Spoiler:

ixtab provided a home for it:
https://bitbucket.org/ixtab/kindletjailbreak


Please let me know, if there a any issues with the project. I hope I've removed all the my-computer-specific-stuff.
And it would be nice, if this is helpful for anybody
Attached Files
File Type: zip AllPermissionKindletTemplate.zip (23.7 KB, 17 views)

Last edited by Ricky23289; 08-12-2014 at 05:33 AM. Reason: Forgot to add the project
Ricky23289 is offline   Reply With Quote
Old 07-24-2014, 09:10 AM   #2
knc1
Helpdesk Junkie
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: 7,002
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
Quote:
Originally Posted by Ricky23289 View Post
Hi there,

first of all: I'd like to call it KKJB as "Kindle Jailbreak" and "Kinklet jailbreak" looks too much the same.

- - - -
Spoil sport!
There goes our #1 "Did user read the directions carefully?" test.

Seriously,
Thanks for the post, it may help others re-use the existing work.

Last edited by knc1; 07-24-2014 at 09:17 AM.
knc1 is offline   Reply With Quote
 
Advertisement
Old 07-28-2014, 07:14 PM   #3
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 8,354
Karma: 14774587
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
I think the difference between "kindle" and "kinklet" is very noticeable.

How exactly does this test work? How do people fail it?
eschwartz is offline   Reply With Quote
Old 07-28-2014, 08:25 PM   #4
knc1
Helpdesk Junkie
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: 7,002
Karma: 6359394
Join Date: Feb 2012
Device: Too many.
But work it does.
It took 4 days for anyone to notice.
knc1 is offline   Reply With Quote
Old 07-28-2014, 08:31 PM   #5
eschwartz
Irrational Optimist
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 8,354
Karma: 14774587
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by knc1 View Post
But work it does.
It took 4 days for anyone to notice.
Yes, and for 4 days I have only been checking my subscriptions. (I've been limited to my Kindle Touch browser on account of traveling.) Now that I went through the backlog, I noticed this first thing.
eschwartz is offline   Reply With Quote
Old 08-12-2014, 05:34 AM   #6
Ricky23289
Member
Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.Ricky23289 knows what is on the back of the AURYN.
 
Posts: 13
Karma: 9668
Join Date: Dec 2013
Device: Kindle touch
ok, so now I also added the project, that I forgot in the first place ^_^;
Ricky23289 is offline   Reply With Quote
Reply

Tags
kindletjailbreak, permission denied, permissiondenied

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindlet "Kindlet Jailbreak" needs a new name! ixtab Kindle Developer's Corner 20 02-14-2014 04:28 PM
Kindlet Jailbreak Required CyKoDeLiC Kindle Developer's Corner 3 08-02-2013 05:30 AM
Kindlet Jailbreak File tmf2 Kindle Developer's Corner 8 01-10-2013 04:51 PM
Tools Kindlet Jailbreak help Firedb Kindle Developer's Corner 1 06-10-2012 05:47 AM
Kindlet Jailbreak route66 Amazon Kindle 7 06-02-2012 08:09 AM


All times are GMT -4. The time now is 08:30 AM.


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