lundi 13 septembre 2021

Issues running obfuscated DEX modules - AbstractMethodError

I'm developing an Android application based on a main APK installed on the mobile device, and some android modules that are compiled to a .dex file. These files are loaded at runtime by the main application and the classes inside the .dex files are instantiated via Dynamic Dex Loading.

I'm facing some issues related to proguard, as even if I use the @Keep annotation on exposed methods in the modules and the main APK and I tell to proguard to keep interfaces methods, when I call one of the methods implemented in a module i get:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.android.myproject, PID: 13893
java.lang.AbstractMethodError: abstract method "z.a com.android.myproject.MyClass.mymethod()"
    at com.android.myproject.MainService.H(:784)
    at com.android.myproject.MainService.M(:258)
    at com.android.myproject.MainService.a0(:198)
    at com.android.myproject.MainService.U(:148)
    at com.android.myproject.MainService.C(:133)
    at com.android.myproject.MainService.onServiceConnected(:90)...

If i try to debug, and i place a breakpoint right on the method call, using the "Evaluate Expression" tool in Android Studio I'm able to call the method with success, but if I let it execute on its own it crashes with the previous exception.

Can someone help me please? Thank you very much





Aucun commentaire:

Enregistrer un commentaire