Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to get UserId and password of installed application?

Is it possible/ permissible in Android SDK to get UserId and password of installed application (if it has a login)? I need installed application info like Application name, package name, installed date and was wondering if getting login name and password is feasible and allowed by Android.

This question helps to get the required username but this is application-specific. What I want is a generalised solution like if the installed application has a login (username and password) for example Facebook or Gmail or twitter, only then it should return the values.

The same I want to use in iPhone application. Please suggest your perspective on iOS too. I want to clearly mention that I am not sure if this is allowed in Android and iOS.

Also, can AccountManager help me in Android?

like image 312
Nitish Avatar asked Nov 17 '13 08:11

Nitish


People also ask

Does Android have a password manager?

Manage your saved passwords in Android or Chrome. They're securely stored in your Google Account and available across all your devices.

What are user ids and passwords?

User ID and password systems are among the oldest forms of digital authentication. These types of authentication systems, which simply prompt a user to enter his or her ID and password to gain system access, are easy to implement and use, but they also carry some huge security risks.


1 Answers

Usernames and passwords

iOS

It is somewhat unclear, but I assume that you are talking about getting OTHER installed apps' login information since I don't see why you would need a generalized way of getting your own app's information.

As for the iOS part, this is not doable. Most apps stores passwords in the keychain (like Apple suggests), and there is no way to share a keychain access group with other apps (except if the apps share the same Bundle seed ID, but that is not the case here). The Apple Keychain Services Concepts clearly states that

The iOS gives an application access to only its own keychain items. The keychain access controls discussed in this section do not apply to iOS.

Android

I strongly doubt there is a way on Android, but I will leave that for a more experienced Android developer to answer.

EDIT: Since you have not received any other answers I will go ahead and say what I think regarding the Android part as well. Generally speaking, Android does not provide a way of storing credentials the same way as iOS does it. Instead, there are multiple ways of doing it. On their Security Tips site, they state that where possible, username and password should not be stored on the device. Gmail, for example, does not (perhaps unreliable source). If you do store them on there, it also says that

By default, files that you create on internal storage are accessible only to your app.

App detection

When it comes to detecting apps there are two ways to go about it (this is for iOS):

  • Checking if a specific URL scheme is supported by the device (and thus the app is installed). This can be done with canOpenUrl:
  • Comparing the device's currently running processes to known app executable names. This is done with sysctl(). This is a neat way of doing it: UIDevice Category For Processes

For Android, check out this example: How to Get List of Installed Apps in Android.

Conclusion

By design, there is no way to get usernames and passwords in either iOS or Android. There are ways of getting a list of most apps installed on an iPhone. This should also be possible on Android, I provided a link that describes one way of doing it.

like image 101
Daniel Larsson Avatar answered Sep 28 '22 03:09

Daniel Larsson