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 04-24-2014, 04:57 AM   #1
Ricky23289
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();
When I'm running checkPermission I get an
Code:
access denied(java.net.SocketPermission 192.168.15.245:1337-10010 connect,listen,accept,resolve)
error.

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?
  Reply With Quote
Old 04-24-2014, 09:20 AM   #2
knc1
Going Viral
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: 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?
knc1 is offline   Reply With Quote
Old 05-10-2014, 03:42 AM   #3
Ricky23289
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
  Reply With Quote
Old 05-10-2014, 08:46 AM   #4
knc1
Going Viral
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: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by Ricky23289 View Post
It didn't work to install the new MKK and start my program again.
- - - -
That was my only idea, that the Kindlet sandbox was the source of the problem.

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 . . . .
knc1 is offline   Reply With Quote
Old 05-10-2014, 05:12 PM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
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.
NiLuJe is offline   Reply With Quote
Old 07-11-2014, 09:44 AM   #6
Ricky23289
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:
  • getting ixtab's kindle jailbreak
  • getting the KUAL sources
  • taking a close look how the jailbreak was used
  • applying it to me
  • tadaaa

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
  Reply With Quote
Old 07-11-2014, 12:02 PM   #7
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
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? .
NiLuJe is offline   Reply With Quote
Reply

Tags
access denied, network

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 05:35 AM.


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