Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Security of string resources

I was wondering what's the security of Android's resources folders (I'm especially concerned with strings). I know, I know, it would be ridiculous to store a password in Strings.xml. It's not like that, but how easy it is to snoop on these resources, to access sensible app info?

like image 876
ferostar Avatar asked Apr 18 '11 19:04

ferostar


People also ask

What is string resources?

A string resource provides text strings for your application with optional text styling and formatting. There are three types of resources that can provide your application with strings: String. XML resource that provides a single string.

What is string XML file in Android?

String. xml file contains all the strings which will be used frequently in Android project. String. xml file present in the values folder which is sub folder of res folder in project structure.In Android Studio, we have many Views such as TextView,Button,EditText,CheckBox,RadioButton etc.

Which of the format string is not valid?

Format string XXX is not a valid format string so it should not be passed to String.


2 Answers

Unfortunately it is pretty easy to get to the resources. Tools like apktool enable to do that. I have raised a similar question here. You may want to take a look.

like image 156
advantej Avatar answered Oct 05 '22 05:10

advantej


Easy on a rooted phone. Expect anyone can read your string resources shared preferences, etc. I just hooked up ADB, changed to /data/data/com.tumblr/shared_preferences and read my username and password in the clear.

You can also download and decompile the apk. If you need to keep it secret, encrypt it.

like image 28
mike fratto Avatar answered Oct 05 '22 05:10

mike fratto