![]() |
#1 |
Enthusiast
![]() Posts: 27
Karma: 12
Join Date: Jan 2016
Device: KT2
|
File I/O permissions
Hi, I'm developing a kindlet and I would like to access the Kindle root file system. When I try to read a file I get a Java I/O persmission error in the "crash.log" file. I thought it was due to the fact that the cvm doesn't have root permissions so I try to access the user storage ("/mnt/us") but I got the same crash. Is it possible to access the file system from within a kindlet?
I read about a patch for root permissions when I started looking for informations about kindlet but I can't find it anymore. |
![]() |
![]() |
![]() |
#2 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
It changed its name, it is included as part of the MKK package.
Check NiLuJe's snapshot thread for the most recent build. Check our Wiki for extensive directions. Check the "Where Do I Start" sticky thread to find the Wiki page and other content on the subject. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 27
Karma: 12
Join Date: Jan 2016
Device: KT2
|
![]()
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!") ); } 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. |
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 27
Karma: 12
Join Date: Jan 2016
Device: KT2
|
Thank you! That's very clear, I got it working ^^
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
|
![]() |
![]() |
![]() |
#7 |
Enthusiast
![]() Posts: 27
Karma: 12
Join Date: Jan 2016
Device: KT2
|
I meant to say that the MKK package it's the patch I was talking about, but I didn't know it's name so i didn't know I had it installed. I meant "thank you for pointing me that", sorry for any misunderstanding
|
![]() |
![]() |
![]() |
#8 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Yeah, you need the "project-side" Kindlet Jailbreak lib added to your projects to be able to use it
![]() |
![]() |
![]() |
![]() |
#9 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Not a problem here, encol was able to guess what the O.P. needed.
A good thing too, I had forgotten that link / write-up. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
No permissions to run | johnnyd2 | Devices | 0 | 04-09-2013 11:22 PM |
PRS-T1 Fixing Permissions? | Holtor | Sony Reader Dev Corner | 3 | 05-03-2012 02:39 AM |
Permissions in epub... | markjoseph | ePub | 1 | 12-29-2010 09:32 AM |
file permissions question | troymc | Calibre | 4 | 09-05-2009 12:38 PM |
eBook Library Error: Permissions. | Icarusbop | Sony Reader | 1 | 01-02-2008 09:33 AM |