Ceri666 / java-ide-droid

Automatically exported from code.google.com/p/java-ide-droid
0 stars 0 forks source link

SecurityException due to invocation of setSecurityManager on Gingerbread/Honeycomb. #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Attempting to run the DX or ApkBuilder ends with a SecuirtyException in the 
(on-screen log) on the Gingerbread and Honeycomb devices I've tried.  It seems 
to work fine on Froyo.

I tried five devices...  

The failure occurred on a Droid3 (stock, 2.3.4), Nexus One (stock, 2.3.4) and 
Xoom (stock, 3.1).  

It did not occur on a Galaxy Tab (stock, 2.2) and a Droid2 (rooted, Fision 
2.5.7, Android 2.2.1).

It appears that even invoking setSecurityManager throws a SecurityException in 
all cases on later versions of Android: 
http://developer.android.com/reference/java/lang/System.html#setSecurityManager%
28java.lang.SecurityManager%29

Not sure what can be done about the underlying problem (i.e., DX/ApkBuilder 
invoking System.exit()) other than modifying them not to.

Original issue reported on code.google.com by tlieb...@gmail.com on 31 Jul 2011 at 11:51

GoogleCodeExporter commented 9 years ago
Thank you for doing such a complete test!

It seems that Google removed the support for SecurityManager starting with 
Android 2.3:
http://developer.android.com/reference/java/lang/System.html#setSecurityManager%
28java.lang.SecurityManager%29 : "Throws SecurityException always"

http://developer.android.com/reference/java/lang/System.html#getSecurityManager%
28%29 : "Android does not use SecurityManager."

I agree, we probably have to modify DX/ApkBuilder to not call System.exit()

Tom

Original comment by tom.ar...@gmail.com on 9 Aug 2011 at 6:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The problem is fixed in release 0.7.3 which I'll soon upload to SVN and the 
download area. I'll post an announcement in the Support Group, once this is 
done.

I have modified dx and sdklib, now called dx_ta.jar and sdklib_ta.jar
Now, they do not call System.exit() anymore. The main() method now returns a 
result code which can be used to check the status.

@tlieb... : Please test release 0.7.3 on all your devices and tell me, whether 
JavaIDEdroid now works.

Tom

Original comment by tom.ar...@gmail.com on 12 Aug 2011 at 6:57

GoogleCodeExporter commented 9 years ago
Sorry for the delay in response, have been tremendously busy with other Android 
projects.  Was able to compile and install Hello Android application entirely 
on Droid3.  

Original comment by tlieb...@gmail.com on 1 Sep 2011 at 10:27