ANT build for Android Proguard obfuscation

前端 未结 4 2063
日久生厌
日久生厌 2020-12-08 11:54

Can anyone share with sample/simple obfuscation ANT task for Android? Provided that I do have complete APK and I need just pass *class hru Proguard and then prepare *.dex to

4条回答
  •  星月不相逢
    2020-12-08 12:27

    The proGuard obfuscation process needs .class files so you can't launch an Ant before IDE build (.java) or after (.dex packed).

    Have a look on this post where it's explained how add the proGuard step in your global Ant build:

    http://www.androidengineer.com/2010/07/optimizing-obfuscating-and-shrinking.html

    If you really want to use the IDEA build, you can try the following.

    • After the IDEA build unpack the apk with apktool.
    • Convert the .dex files to .class with dex2jar
    • Run proGuard as the previous post show you

    Sorry that I don't attach you the links of apktool and dexjar but as I'm newbie I can't post more than one hyperlink.

提交回复
热议问题