Implementation of dexguard
Asked Answered
A

2

1

i have put com.saikoa.dexguard.eclipse.adt_*.jar file in dropin folders of eclipse.And modified the Proguard-Project and Project-Properties Files in android Project.And i build the release version of .apk.The thing my apk is obfustcated,shrinked.but i also want my assets to be obfuscated.This is not happening.So,how to obfuscate the assets of your android project with the help of dexguard.

Antique answered 24/12, 2013 at 6:1 Comment(0)
W
2

DexGuard provides the option -encryptassetfiles to encrypt assets. It is documented in the DexGuard manual > Settings > -encryptassetfiles. The samples directory also contains a sample project that illustrates the feature.

Whipstitch answered 26/12, 2013 at 13:14 Comment(4)
Hi @eric, i have followed every steps written in dexguard ->manual_>settings>encryptassetfiles . i have run the sample directory also in release mode but still the assets files inside the asset folder is not encrypted. I don't know why this is happening ,can u tell me what am i doing wrong?Antique
In my assets folder , i have only one .txt files which contained the a single textAntique
i can easily get the assets content using apk toolAntique
@Antique If you contact support, we'll work it out.Whipstitch
A
2

I experienced this same problem and found the solution in the docs.

This means that your code must invoke the AsssetManager as follows: open("MyAssetFile").

If you are not loading your asset in that manner then Dexguard does not encrypt the asset.

For example, you must open your asset like this:

InputStream stream = context.getAssets().open("myAssetFile.html");

rather than

mWebView.loadUrl("file:///android_asset/myAssetFile.html");

You also need to ensure that you have set your dexguard config to encrypt your assets:

-encryptassetfiles assets/myAssetFile.html,assets/myOtherAssetFile.txt
Amongst answered 27/2, 2014 at 12:31 Comment(1)
Can you please elaborate on the usage? With an example maybe. Thanks !Hekate

© 2022 - 2025 — McMap. All rights reserved.