[
https://issues.apache.org/jira/browse/FELIX-3854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13595343#comment-13595343
]
Robin Henniges commented on FELIX-3854:
---------------------------------------
Ok i tested it:
android:targetSdkVersion="14"
android:minSdkVersion="14"
I'm using WRITE_EXTERNAL_STORAGE (should be implicit READ rights). --> FAILED
I also added READ_EXTERNAL_STORAGE for testing. --> FAILED
03-07 01:04:40.617: W/System.err(30098): Caused by:
java.lang.UnsupportedOperationException: can't load this type of class file
03-07 01:04:40.617: W/System.err(30098): at
java.lang.VMClassLoader.defineClass(Native Method)
03-07 01:04:40.617: W/System.err(30098): at
java.lang.ClassLoader.defineClass(ClassLoader.java:292)
03-07 01:04:40.617: W/System.err(30098): at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2228)
03-07 01:04:40.617: W/System.err(30098): at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1472)
also tested it with
android:targetSdkVersion="17"
android:minSdkVersion="17" --> FAILED
(API 17 = Android 4.2)
At the end i tested it again with my copy function to be sure - and it worked.
It's not working without copying.
Maybe someone else should run the same test.
> Problem running Felix in Android 4.1 ad 4.2 (JB)
> ------------------------------------------------
>
> Key: FELIX-3854
> URL: https://issues.apache.org/jira/browse/FELIX-3854
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-4.0.3
> Environment: Once Felix is running in the smartphone (Samsung Galaxy
> Nexus with Android 4.2), the problem arises when a new bundle is being
> installed (considering that the felix cache directory has been placed in the
> external sd card by using the property org.osgi.framework.storage).
> Reporter: Rafael Bachiller
> Assignee: Karl Pauls
> Priority: Minor
> Labels: Android, Bean, Jelly, patch
>
> During the installation process, Felix places the .jar in the cache and then
> obtains the dex file that is inside the jar file in order to put the dex file
> in the cache directory. Then, Felix executes it.
> In the new versions of Android, this process fails because the system does
> not allow any program to place and execute any dex file in the sd card. The
> code line that illustrate the problem is in the file
> felix/framework/src/main/java/org/apache/felix/frameworBundleWiringImp.java
> (line 2271).
> In my modest opinion, there are two possible solutions:
> a) For these newer versions of Android, it is not possible to place the cache
> in the external sd card. For this solution no changes are needed in Felix,
> but it creates a new limitation for running in the Android devices (the cache
> can only be placed in the internal memory at runtime).
> b) Create a new parameter (e.g. felix.cache.dexfiles) that can be applied to
> Android systems that indicates to Felix where to place the dex files. Thus,
> Felix is not going to store in the same place the .jar files and the .dex
> files (avoiding to waste the internal memory). For this solution, it is
> necessary to create the parameter in Felix and to modify the line that has
> been indicated before.
> Thank you very much in advance.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira