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 8242117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:03:51+00:00 2026-06-07T21:03:51+00:00

Recently I found many Android apps using shared preferences for persistent login, such app

  • 0

Recently I found many Android apps using shared preferences for persistent login, such app requires user name and password from the user to login for the first time, but from then on requires no additional actions from the user.

In rare cases, that app will store the password in the file like login_account.xml of the shared_prefs folder, once the user rooted his Android phone, other evil app may read this file to get the user’s password.

In most cases, I found that the apps will store a login key(not password) in the login_account.xml of the shared_prefs folder, it seems to be secure because the evil app cannot steal the password. But it can still get the login status of the victim because he can replace his login key with the victim’s.

I am wondering if there’s some way that can both protect our users from login key been stolen and do not requires our users to input his password to load our app each time?

  • 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-07T21:03:53+00:00Added an answer on June 7, 2026 at 9:03 pm

    Devices are inherently unsecure so no matter what you do, there will always be a possibility for “Evil Guy” to do something. There is absolutely no solution to that.
    You can, however, mitigate the risks somewhat by doing what Chirag Raval suggests : only store the login and the fact that it was successful.
    I would add to that to only ‘auto’-login for a limited time and then show the login dialog again to reconfirm the password.

    You can make it a little more secure by generating a signature of your phone, sending it upon the first login and have the server send a response string which you can use to login subsequently. It would be somewhat secure by the fact that it would be very hard to guess , it would not work on another phone and it still requires the password. To generate such a signature, I would concatenate lots of field values from the Build class, the phone’s id and possibly values obtained in TelephonyManager (home network), then generate a digest from that. The most secure way to do it is to use an SHA-1 HMAC (look at the Bouncy castle library).

    Of course, this all breaks down against a dedicated adversary : he can attach a debugger to your app, trace all its calls and figure out the algorithm for the signature. That’s because the device is unsecure as I wrote at the top. (PS: this actually happened to me while a client was testing the security of an app).

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

Sidebar

Related Questions

I recently imported quite a few posts (many thousands) into WordPress and found out
I recently found a code to send emails using python. It was only for
Recently I've found an example on NHibernate's one-to-many relationship. The mapping goes like this:
Hi i recently found that JSON is been used in many areas. In COMET
Recently I found out that I'm using tabs incorrectly in Vim . I've been
recently I uploaded my app internationally. I found that the app is selling in
I recently encountered this problem. I found many instances of people asking the question—
Recently thanks to rails' popularity, many people start using activerecord as model. however, before
recently found an article in http://hashtwo.com/blog/integrating-a-file-browser-into-ckeditor-cakephp to integrate a file browser into ckeditor (file
I recently found that dynamically creating object and methods in Ruby is quite a

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.