Android dalvik.system.DexClassLoader class loader loads classes from .jar and .apk files containing a classes.dex entry. This class can allow code execution not installed as part of an Android application.
dalvik.system.DexClassLoader was added in API level 3.
I had a jar file that contains code and resources (ResourceBundle).
I've created a simple project in android studio with that jar, compiled it, extracted the .apk and copied the classes.dex to a second project. Also copied the resources from the…
I am developing a application which automatically load class from external dex from external apk file (external apk file is stored in internal storage of application). The external apk file have class using com.google.gson.
The source code of the…
I'm doing some testing with DexClassLoader, to see if it's possible to "update" my app with new functionality. Currently I've got this method for testing, which works with testClass and running the test() method.. What I would like to know, is how…
I'm working on an android app and I'm trying to plugin-like feature which would allow loading additional dex files to extend app functionality. I've figured out how to load additional dex files extending PathClassLoader with few small changes to…
I am attempting to find a class loader that works for optimized dex files (odex files). I looked through all the android documentation and found the following class…
I am loading the dex file from an APK dynamically using DexClassLoader and the APK contains native libraries also packaged in the following paths,
library.apk
├── classes.dex
├── lib
├── armeabi-v7a
├──…
I want to add .jar dynamically. So I make a demo. But I don't know how to new the DexClassLoader. I don't know how to add the first params.
final File optimizedDexOutputPath = new File("" + File.pathSeparator + "test.jar");
//PackageManager pm =…
I am trying to produce a simple android application that can load a DEX file from the SD card at run-time.
The application has two activites. The first activity is a simple screen that has a button. When the button is pressed, the second activity…
I'm trying to load classes from external JAR file placed on sdcard. Many people used DexClassLoader successfuly.
My steps:
1) Create classes.dex file from jar file:
dx --dex --output=classes.dex file.jar
2) Add generated classes.dex file to jar
3)…
i would like to use the ApplicationWrapepr approach to use multidex in my application like described here https://plus.google.com/104023661970539138053/posts/YTMf8ADTcFg
I used the --minimal-main-dex option along with a keep file like…
I have two separate ClassLoaders, one have loaded the package private interface A:
package com.example;
interface A {}
And I have another class loader created from a dex file containing class B:
package com.example;
class B implements A {
…
I am trying to build an Android application which uses the XMLBeans library.
The library tries to look up .class-files via
ClassLoader cl = SchemaDocument.class.getClassLoader();
URL resource = cl.getResource("xyz.class");
It seems this does not…
Android's developer documentation requires listing the permissions needed for an app in the AndroidManifest.xml file. My question relates to the situation when I want provide an updated feature to the app, not via app store update, but via…
I am trying to learn dynamically loading classes (.dex/.jar) in Android. I assembled the basic ideas from tutorials and Stack Overflow questions (tutorial, this, and this), but I am failing to fulfill my purpose of dynamically loading class files…