Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A1AA0934F for ; Wed, 6 Mar 2013 20:44:18 +0000 (UTC) Received: (qmail 5552 invoked by uid 500); 6 Mar 2013 20:44:16 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 5495 invoked by uid 500); 6 Mar 2013 20:44:16 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 5405 invoked by uid 99); 6 Mar 2013 20:44:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 20:44:16 +0000 Date: Wed, 6 Mar 2013 20:44:16 +0000 (UTC) From: "Rafael Bachiller (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (FELIX-3854) Problem running Felix in Android 4.1 ad 4.2 (JB) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FELIX-3854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13595079#comment-13595079 ] Rafael Bachiller edited comment on FELIX-3854 at 3/6/13 8:43 PM: ----------------------------------------------------------------- Hi Robin, Great !! As far as i know it is not necessary to place the bundles inside dexOutputDir as it is only a cache directory that is directly managed by Apache Felix. For example, i place the OSGi bundles in the SD card and execute the install OSGi command. Then, Apache Felix gets the .jar file, places it inside the dexOutputDir and, finally, load the .dex file that had been included inside the .jar file. In relation with the restriction in JB, this is the official link where it is explained: http://developer.android.com/reference/dalvik/system/DexClassLoader.html was (Author: rbs): Hi Robin, Great !! As far as i know it is not necessary to place the bundles inside dexOutputDir as it is only a cache directory that directly manages Apache Felix. For example, i place the OSGi bundles in the SD card and execute the install OSGi command. Then, Apache Felix gets the .jar file, places it inside the dexOutputDir and, finally, load the .dex file that had been included inside the .jar file. In relation with the restriction in JB, this is the official link where it is explained: http://developer.android.com/reference/dalvik/system/DexClassLoader.html > 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