Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flexjson and Dexguard/Proguard

I am having issues using dexguard when it comes to flexjson library. I keep getting the following error when trying to deserialize using JSONDeserializer.

 **09-15 20:46:10.271 10901-11552/** **A/art: sart/runtime/class_linker.cc:3430] Check failed: klass->IsProxyClass()** 

Does anyone have the proper rules for flexjson to work properly after obfuscation in android release apks?

Something similar to gson lib.

like image 928
joseporto Avatar asked Sep 16 '16 00:09

joseporto


2 Answers

Chances are that this is on a Samsung device -- a few device models and Android versions have problems with some UTF-8 encoded unicode characters. You should try updating DexGuard to the latest version. Otherwise, you can also try working around it by using a simple obfuscation dictionary:

-classobfuscationdictionary empty.txt

where empty.txt is an empty file.

like image 128
Eric Lafortune Avatar answered Sep 20 '22 13:09

Eric Lafortune


We've had the same issue on a few Samsung devices (Galaxy J1 and J5 on Android 5.1.1). The application just wouldn't start.

There is no information about the issue in Crashlytics nor in Google Play. Eventually we've had contact with GuardSquare who told us to update to the fresh DexGuard 8.0.06. This version includes a new dictionary which solves the ANR on these devices.

Using the line below as Eric mentioned works as well. Although this will only use ASCII chars as a collegae of him mentioned. I've just asked if there is any downside on using this. Cause it might avoid future issues.

-classobfuscationdictionary empty.txt
like image 43
Ben Groot Avatar answered Sep 20 '22 13:09

Ben Groot