Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to save private string values in android apk?

Tags:

android

I know i can save strings in res/values/strings.xml but if someone disassembles the dex file or the apk file then he will be able to see HARDCODED strings or res/values/strings.xml strings.

Is there a way to store strings that wont be read if disassembled?

like image 546
gerfmarquez Avatar asked Mar 12 '26 13:03

gerfmarquez


1 Answers

Briefly - no.


If you can decrypt/extract any string from your apk, potentially anyone with enough knowledge may look through your code and re-cosntruct the algorithm you use to extract those strings. And then extract them by herself.

Of course you may use some tricks to make it harder. What tricks can be used is actually up to you, Android doesn't provide any by default (AFAIK).

like image 198
inazaruk Avatar answered Mar 15 '26 02:03

inazaruk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!