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 was wondering how Parallel Space app can duplicate and execute other apps without copying their APKs or running them under modified package names like other apps on Playstore do (e.g.: "com.whatever.name-of-duplicated-app").
After investigating…
After I upgraded to the 64-bit armeabi library and released the app to googleplay in bundle packaging, I encountered the following problems in googleplay crashes report page:
java.lang.RuntimeException:
at…
It seems that the Android application class loader allows to reflectively acquire a reference to the public static field of a package-private class even from a different package (than the one the aforementioned class is defined in), while Sun JDK…
I have succeeded in dynamically loading classes from a dex file in the following way
enter code here
File file = getDir("dex", 0);
DexClassLoader dexClassLoader = new DexClassLoader("/data/data/com.example.callerapp/files/test.dex",…
We have a large app that's always running into the dread method count limit. I've been asked to come up with a way to let it do much more, including supporting plugins. Looking for ways to unload code, I ran across JNI Tips which says
Classes are…
For a long-term student project, i'm trying to develop a modular application with plugins. Specifically, we would have:
A master application where we could search, update, delete and run the plugins. This master application would also store some…
I observe quite a few behaviors on Android (I am working on a multidex issue, so I use an emulator in 4.4.4) that leave me speechless about Android class loading:
On Android classes are not supposed to be resolved when being loaded by the class…
I put a .jar file containing .dex file to directory "/sdcard", then I try to load the class in the .jar file using DexClassLoader and PathClassLoader respectively. Both of them can load the class successfully. What are differences between them?
Here…
I observe a weird exception thrown on line:
viewPager = (ViewPager) view.findViewById(R.id.pager);
the exception looks as follows:
java.lang.ClassCastException: android.support.v4.view.ViewPager cannot be cast to…
I'm trying to implement a hot-fix mechanism in my android app. After googling for a while, here's what I've done:
I generated a dynamic.jar file with the classes that I want to patch. (I'm using eclipse and ADT)
Using dx --dex --output=patch.jar…
I'd like to be able to run code not installed as part of an application in memory. I assumed InMemoryDexClassLoader was created precisely for this, so I tried using it to execute a method in the same application (same class, even), but from memory.…
Intro: I'm trying to load code in run-time from a classes.dex that's inside a classes.jar. I've done a lot of research and spend a lot of time on this so I really need help.
Problem: When my jar contains a simple class it is loaded successfully.…
I use DexClassloader to load a dex file from /data/data/packagename/ just like:
private static synchronized Boolean injectAboveEqualApiLevel14(
String dexPath, String defaultDexOptPath, String nativeLibPath, String dummyClassName) {
…
Our application has three dexes in apk which was built by gradle with multidex feature.
After the application was installed,
Were the main dex and the second dex loaded by the same class loader?
How to check if the second( classes2.dex ) and the…
I'm trying to build a plugin-System, where DexClassLoader is fetching code from other installed apks containing fragments(my plugins), and showing them in my host. This is working quite nice.
I also like to make the plugins hotswappable, this means…