If I uninstall an app from my Android device and reinstall it, does the user id change? For example, if the user was app-60 before, will it be app-60 (uid 60) again after reinstallation?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Excerpt from Security and Permissions “At install time, Android gives each package a distinct Linux user ID. The identity remains constant for the duration of the package’s life on that device. On a different device, the same package may have a different UID; what matters is that each package has a distinct UID on a given device.”
When installing an app, Android by default(1) creates a UID specifically for that package, so that it can have its private resources / storage space. When no packages are using anymore that UID, the UID is deleted.
So I believe it changes. You can use Pratik’s code to checkout and determine the difference after successive installs.
Here is the code for the Package Manager service. Could be a starting point to dig in deep.