View Single Post
Old 06-04-2016, 06:21 AM   #3
sguerrini97
Enthusiast
sguerrini97 began at the beginning.
 
Posts: 27
Karma: 12
Join Date: Jan 2016
Device: KT2
Thumbs up

Yep that's what I was talking about
So it turned out MKK is already installed on my Kindle. I tried importing ixtab's KindletJailbreak into my project, I can call the "isAvailable()" method in Jailbreak class with success, same for the "requestPermission()" method.

But I can't access file system.. This is the full crash log:

Edit: rewritten code:
Checks in Main.java:
Code:
if (jailbreak.isAvailable())
{
	if (((TestsJailbreak)jailbreak).requestPermissions())
	{
		pane.add( new JLabel("JB requestPermissions OK!") );
		File directory = new File("/tmp");
		File[] listOfFiles = directory.listFiles();

		for( int i=0; i<listOfFiles.length; i++ )
		{
			pane.add( new JLabel( listOfFiles[i].getName() ) );
		}
	}
	else
	{
		pane.add( new JLabel("JB requestPermissions FAILED!") );
	}
}
else
{
	pane.add( new JLabel("JB not available!") );
}
crash.log:
Code:
[04/06/16 12:39] Tests (v. 1)

java.security.AccessControlException: access denied (java.io.FilePermission /tmp read)
	at java.security.AccessControlContext.checkPermission(Compiled Method)(Unknown Source)
	at java.security.AccessController.checkPermission(Compiled Method)(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Compiled Method)(Unknown Source)
	at java.lang.SecurityManager.checkRead(Compiled Method)(Unknown Source)
	at java.io.File.list(Compiled Method)(Unknown Source)
	at java.io.File.listFiles(Compiled Method)(Unknown Source)
	at local.samu.tests.Main.initUi(Main.java:40)
	at local.samu.tests.Main.onCreate(Main.java:25)
	at ixtab.jailbreak.SuicidalKindlet.create(SuicidalKindlet.java:86)
	at ixtab.jailbreak.SuicidalKindlet.create(SuicidalKindlet.java:83)
	at com.amazon.kindle.kindlet.internal.lifecycle.m.call(cgf:1632)
	at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(Compiled Method)(FutureTask.java:178)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(Compiled Method)(ThreadPoolExecutor.java:1029)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:547)
	at java.lang.Thread.run(Compiled Method)(Unknown Source)
	at java.lang.Thread.startup(Compiled Method)(Unknown Source)

Last edited by sguerrini97; 06-04-2016 at 06:40 AM.
sguerrini97 is offline   Reply With Quote