Skip to content
This repository was archived by the owner on Jan 12, 2019. It is now read-only.
This repository was archived by the owner on Jan 12, 2019. It is now read-only.

DexGuard removes native libraries (.so files) #134

@jukka828

Description

@jukka828

General information

  • SDK/Library version: 5.5.1
  • Android Version and Device: Happens with all devices

Issue description

When using DexGuard for obfuscating our application which uses the card.io library, all card.io native libraries (.so files) get removed from the final apk. DexGuard is a commercial extension of ProGuard. It removes all native libraries that it thinks are not used, unlike ProGuard which doesn't touch the native libraries.

The reason why DexGuard removes them for card.io is that in the CardScanner.java the native libraries are loaded differently than what DexGuard requires. They say in their documentation "... you should make sure that your code loads each native library with System.loadLibrary("mycode"), with the name specified as a string literal or constant.". But in CardScanner.java the libraries are loaded with a String variable inside the method "loadLibrary(String libraryName)". That's why DexGuard doesn't find the link between the native libraries and the Java code.

I wrote a fix for this locally and the native libraries are working with it in our application, but I haven't tried with ProGuard. I can send a patch file if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions