Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8611937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:30:07+00:00 2026-06-12T04:30:07+00:00

In my application I have a config.xml file which is being parsed,. In this

  • 0

In my application I have a config.xml file which is being parsed,. In this configuration file, there is some data that I don’t what the end-user to see in plaintext. In this particular case, a password for a mail account. The config.xml file is saved to a folder with the path

/mnt/sdcard/my_application_folder/config.xml  

I have looked up some methods which is provided by the class File

  • setReadable(boolean value)
  • setExecutable(boolean value)
  • setWritable(boolean value)

I tried to apply these methods this way:

String path = folder.getPathToNode() + "/config.xml";
configFile = new File(path);

if(configFile.exists()) {
    configFile.setReadable(false);
    configFile.setExecutable(true);
    configFile.setWritable(false);
}

I guess that some of you would suggest that I store this data in SharedPreferences, but my application has two user groups, the end-user and an administrator which will edit the config.xml on his computer, and transfer the file over to the phone.

I can open Astro File Manager and see the config.xml in plain text, but I should not because the file is not readable?

Can I parse this config.xml if I apply the values above? Can anybody suggest another solution to this “security issue”?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:30:09+00:00Added an answer on June 12, 2026 at 4:30 am

    Don’t save sensitive data on the SD card/external storage. Any application can read it, even without special permissions. Find another way to update settings (via the UI, server push, etc.) or at least think of some way to encrypt or obfuscate sensitive information. External storage is generally VFAT (or emulates it), so you cannot set file permissions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application that is deployed with web.config file. Are there any
I have an application that uses xml config file, where I'm describing layouts for
I have a Web application (with a Web.config file), which will move through the
I have an service application that reads a config file containing a list of
I have a file located at [application]/config/routing.yml, when I change something in there, the
I have an xml configuration file which works fine in Java, and I'm trying
I have created a custom xml file which I use as a config for
Currently, we use a giant configuration object that is serialized to/from XML. This has
i have an xml file under WEB-INF called pretty-config.xml , it's for prettyFaces rewrite
I have a xml file which I modify with the following code: XmlDocument xlDoc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.