6

I would like to prevent anyone decompiling my .apk file from viewing some of the strings in the strings.xml file.

Will obfuscating my code using ProGuard obfuscate or hide the strings.xml file and prevent people from seeing the original strings.

10
  • 1
    You cannot prevent anyone from viewing anything in your app. Obfuscating only makes it harder - but not by much. It is only a really small hurdle for anyone who knows what they are doing or has enough motivation to do it anyway. If you want to hide some information in your app and prevent anyone from accessing it unless by using your app then you are on the wrong path. Hiding anything in your client code is impossible. Commented Oct 16, 2015 at 6:08
  • What you can do is: obfuscate the strings yourself before putting them in the strings.xml file. Then de-obfuscate them in code. Commented Oct 16, 2015 at 8:05
  • @FrankN.Stein that does not work either. Doing something like this just makes your code more complicated for basically no added benefit. Never ever obfuscate code yourself, that is just a terrible idea. Commented Oct 16, 2015 at 14:40
  • Well, how can I tell you, @XaverKapeller... It works, for me! Commented Oct 16, 2015 at 15:56
  • @FrankN.Stein I am not doubting that it works. I am just saying that implementing something like this has no point whatsoever. Commented Oct 16, 2015 at 18:24

1 Answer 1

2

Proguard will not obfuscate strings. It basically performs minimization on the java. If you want strings to be obfuscated several options are available. Here are a couple

Stringer: https://jfxstore.com/stringer/

DexGuard: https://www.guardsquare.com/dexguard

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.