Questions tagged [dexclassloader]

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.

See also

  1. http://developer.android.com/reference/dalvik/system/DexClassLoader.html
  2. http://developer.android.com/reference/dalvik/system/BaseDexClassLoader.html
73 questions
0
votes
0 answers

Android : Dynamic uninstalled apk loading

I am trying to build an app which allows users to install additional plugins for the app. I am building plugin modules as apk and trying to load those classes at run time using DexClassLoader. When i call a non activity class it works fine. When i…
0
votes
1 answer

Load external classes in Android

I'm trying to load dynamically external classes using DexClassLoader, like @Shlublu proposes here When I execute my application and the DexClassLoader object try to find the class, it throws a ClassNotFound exception. I have added read and write…
Angel C
  • 31
  • 4
0
votes
0 answers

Android IllegalAccessError in native method DexFile.defineClassNative

I got this exception in my project: No pending exception expected: java.lang.IllegalAccessError: com.mogujie.mgjpfbasesdk.fragment.PFBaseFragment 06-28 20:36:33.834 13192-13192/com.mogujie.uni A/art: art/runtime/thread.cc:1321] at java.lang.Class…
0
votes
1 answer

android DexClassLoader. I cannot get a method called

I am using DexClassLoader to load a jar file translated to DEX from Java jar, using the dx tool. The jar file is in: /storage/sdcard0/Download/br_applications/calculator.dx.jar I have permissions: My code is (+/-): String url_jar_path =…
0
votes
1 answer

Android Instrumentation Test Case

I would like to test an activity from an other apk, and this test extends ActivityInstrumentationTestCase2 (http://developer.android.com/reference/android/test/ActivityInstrumentationTestCase2.html) because I will need to get the Activity and…
vmagrez
  • 69
  • 2
  • 11
0
votes
1 answer

Using DexClassLoader in Android to load multple .APK files as plugins

I'm developing a framework/application in Android (5.0+) that needs to be able to install additional "plugins"/apps silently without user interaction. I started looking into the DALVIK/ART DexClassLoader to implement this functionality. At first it…
Schtibb
  • 151
  • 2
  • 8
0
votes
1 answer

NoSuchMethodException, despite it beeing there

I am working on an Application, which can work with external apks. For this i used the DexClassLoader , to load classes, from external apks into an classes-Array, and work with the classes like this: getFragment(){ for (Class cls : classes)…
PlatinTato
  • 378
  • 2
  • 19
0
votes
1 answer

DexClassloader run error on Android5.0

Before Android5.0,I use DexClassloader load plugin dynamiclly,code like this: DexClassLoader localDexClassLoader = new DexClassLoader(pluginSrcJarDir,cont.getDir("dex", 0).getAbsolutePath(), null,…
Yin22
  • 1
  • 1
0
votes
1 answer

Android Class Loader Error

I want to instance the ScreenX class in my jar file and try all of the solition on this site but it can not run. I have two file that; File folder = getDir("JarFile", MODE_PRIVATE); //and File file = new File(folder, "plugin.jar"); I tried…
0
votes
1 answer

Delphi xe5 JNI : ClassNotFoundException

I followed a tutorial provided on stackoverflow (http://www.pclviewer.com/android/androidJNI.html) to import a device specific library to handle a scanner (Honeywell 70e Black). the TJDexClassLoader does instantiate correctly (not nil...) but I…
Darkendorf
  • 463
  • 11
  • 28
0
votes
1 answer

android startactivity from jar by DexClassLoader

I put the jar file into the sd card, jar files have been processed by dx. In the jar inside a activity, how to start activity in the jar file?
0
votes
1 answer

how to use local resources in external non-Activity classes (plugins)?

I am trying to design a plugin system for my Activity. To do that I created new class called PluginClass, external to my project and into a different package, that I load with DEXClassLoader from my main app. I can call all the PluginClass methods…
Cristiano Zambon
  • 466
  • 5
  • 14
0
votes
1 answer

Android: Dynamic class loading to sand box

I want to load dynamic classes from not trusted source. I found this tutorial to load dynamic classes using DexClassLoader. How can I prevent loaded classes to hack in to my database or do any damage to my application? Is it possible?
Ilya Gazman
  • 31,250
  • 24
  • 137
  • 216
1 2 3 4
5