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
1
vote
0 answers

Does DexClassloader still work in Android 9 Pie?

I've been using DexClassloader to load classes at runtime in Android 5.1 Lollipop, and I seem to recall there's some problem with it in Android 9 Pie... But I can't find any mention of it now. Perhaps there's no problem and it still works? Maybe I'm…
hyperpallium
  • 571
  • 5
  • 18
1
vote
0 answers

Android load activity of other apk and start the activty

I have a simple android apk which has one activity and other classes with simple UI(two button, one text layout), I generated that as a apk and now I want to load that using dex class loader in a new android app and starts the activity of the apk…
scoder
  • 2,451
  • 4
  • 30
  • 70
1
vote
0 answers

Android - DexClassLoader or not?

there. Like more peoples, I need to customize my android app behaviour using "something" external like plugin. My idea is to download some APK file (not jar) and dinamically load a class from it to do some operation. I'm searching over the web but…
1
vote
0 answers

The Dalvik classloader (probably) pranking me

I have the following code in Android 4: import org.bouncycastle.jce.exception.ExtCertificateEncodingException; .... public void method(){ try { throw new ExtCertificateEncodingException(); } catch(ExtCertificateEncodingException e){ …
J. Doe
  • 11
  • 1
1
vote
0 answers

Unable to run Drools Android serialized-kbase example in Android N devices

I have been able to run the drools serialized-kbase example (https://github.com/kiegroup/droolsjbpm-integration/tree/6.5.0.Final/drools-examples-android/serialized-kbase) in devices with API level 21. But for all newer devices I am getting the…
1
vote
0 answers

How to get the full path to an APK installed in an Android device

I have an app test.aknahs.com.dexapptest called Dex App Test. How can I get the path to the APK on install from a class test.aknahs.com.dexapptest.TestAPKCall, How can I get the path to the APK of the app Dex App Test on install from a class…
Program-Me-Rev
  • 6,184
  • 18
  • 58
  • 142
1
vote
0 answers

How to publish external apk plugin (jar) to Google Play Store?

I'm going to create an Android application (apk) which uploads and execute additional jar-packaged dex bytecode runtime via DexClassLoader. According to Google Play's policy…
Sergey
  • 218
  • 2
  • 8
1
vote
1 answer

Starting an Activity using DexClassLoader

My requirement is to start an Activity which is present in an aar file inside your asset folder or may be in SDCard. But I am getting below exception: 01-05 21:06:18.717 3150-3150/com.example.nayakc2.dynamicloading W/System.err:…
Chandra Sekhar
  • 18,914
  • 16
  • 84
  • 125
1
vote
1 answer

Using of Dex class loader

I want to use dex class loader in my application and I read developer.google guide and some question about it there but still, I can't find it out how to use dex class loader . I really appreciate it if anybody explains an example here. Thank…
Ehsan
  • 2,676
  • 6
  • 29
  • 56
1
vote
3 answers

Android - dynamically load class into memory

DexClassLoader is great but works only by loading the compiled class as dex/jar file from the internal/external storage. How can I load class directly into memory, without writing anything to the card first? I am aware of the Java-Runtime-Compiler…
Vladimir
  • 1,045
  • 1
  • 11
  • 23
1
vote
1 answer

Why java.lang.NoSuchMethodError when dynamically load a dex jar?

There is a interface IA class in APK file. I create a jar containing IA's implementation MA. The jar has a Global class and B class. The jar is loaded dynamically with Dexclassloader from data directory. interface IA { test(); } class Global { …
Victor Choy
  • 4,006
  • 28
  • 35
1
vote
1 answer

Unable to load class using DexClassLoader, URLClassLoader or PathClassLoader

I'm trying to load a class file from a server and instatiante it using different class loaders, but without success. I tried DexClassLoader, URLClassLoader and PathClassLoader. Whatever I do, the only thing I get is a ClassNotFoundException from…
user1155504
  • 71
  • 2
  • 5
1
vote
2 answers

Android | DexClassLoader, ClassNotFound exception

So i'm trying to load a class that i wrote from my application, but im receiving ClassNotFound exception. class: public class myclass{ public String doSomething() { return "Hello from myclass"; } } I than creates a jar file…
bailando bailando
  • 2,121
  • 2
  • 13
  • 17
1
vote
0 answers

Questions regarding the DexClassLoader

Around 2 days ago, i found out about the DexClassLoader Library by Android. As a rather mediocre programmer i have a few questions regarding this library/class/tool. The questions i have mainly focus on this Documentation: It states, that it loads…
PlatinTato
  • 378
  • 2
  • 19
1
vote
1 answer

How to cast loaded class from external apk into interface class

//Interface class -> packaged to myinterface.jar package com.example.my_interface; import com.example.my_interface.point; pubic abstract class MyInterface{ publib Object obj; public abstract Point newPoint(Point p); } //--- and other…