04-24-2014, 04:57 AM | #1 |
Nameless Being
|
Access denied on serversocket.accept
Hi,
I'm trying to create a Server on the kindle, but I'm always getting a java.net.SocketPermission Exception. This is my code Code:
int listenPort = 1337; SocketPermission socketPermission = new SocketPermission("192.168.15.245:1337-10010", "listen,connect,accept"); SecurityManager securityManager = System.getSecurityManager(); securityManager.checkPermission(socketPermission); ServerSocket socketServer = new ServerSocket(listenPort); print("Waiting for connection...\n"); Socket connectedSocket = socketServer.accept(); Code:
access denied(java.net.SocketPermission 192.168.15.245:1337-10010 connect,listen,accept,resolve) If I'm leving out the checkPermission, I will get an access denied when the clients tries to connect to the server. I signed my kindlet with dn. Just created a new keystore and checked everything yesterday again. Any suggestions? |
04-24-2014, 09:20 AM | #2 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Kindlets run inside of a sandbox.
Have you tried installing the Kindlet "Jailbreak" (newly re-named MKK: https://www.mobileread.com/forums/sho...d.php?t=233932 )? What where the results? |
05-10-2014, 03:42 AM | #3 |
Nameless Being
|
didn't work
It didn't work to install the new MKK and start my program again. But I started it without the KUAL. Maybe you ment starting it through KUAL might solve the problem?
ot: Was a little bit disturbed by the weekly exams. That took much time until I actually could test it regards |
05-10-2014, 08:46 AM | #4 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
You might have to use the MKK **and** do a "set permission" call to allow the socket connection(s). I am not sure, out of my depth on this subject. Maybe someone else . . . . |
|
05-10-2014, 05:12 PM | #5 |
BLAM!
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
Check the full Kindlet JB project linked in the first post of the MKK thread, there's a back-end to integrate in your Kindlet to make use of it.
And you can then check any and all of our Kindlets to see how it was used . Last edited by NiLuJe; 05-10-2014 at 05:15 PM. |
07-11-2014, 09:44 AM | #6 |
Nameless Being
|
@NiLuJe
I guess you where the one who helped me in IRC as well. I finally found time to go on with the project and get through all the hints in this post. Unfortunately "kindle JB" and "kindlet JB" looks pretty much the same, so I was constantly on the wrong track. solution:
If anybody else runs into similar problems: As soon as I cleaned up my code and got through all left problems, I'm going to write a small tutorial about how to get unrestricted access greets |
07-11-2014, 12:02 PM | #7 |
BLAM!
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@Ricky23289: Yup .
Yeah, I think the most recent Kindlet 'tutorial' we have is, like, over 2 years old? . |
Tags |
access denied, network |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre: Access Denied | Celsus_ | Devices | 4 | 07-25-2018 04:54 PM |
"Access denied" to downloaded news - Windows Error message 5 | SunFuLai | Recipes | 14 | 12-02-2011 02:20 AM |
Troubleshooting "Access denied" when connected to computer. Virus. | Dr. Drib | Amazon Kindle | 16 | 08-23-2010 05:54 PM |