Is {Settings.Secure.AndroidId} Field permanent?

fordicuso 41 Reputation points

It says

"A 64-bit number (as a hex string) that is
randomly generated on the device's first boot and
should remain constant for the lifetime of the device".

My question is, does this number never change even when
user has upgraded Android's version?


p.s. The documentation for

Android.Provider.Settings.Secure.GetString(ContentResolver, Android.Provider.Settings.Secure.AndroidId)

can be found in

A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,208 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 58,496 Reputation points Microsoft Vendor


    does this number never change even when user has upgraded Android's version?

    Android ID will not be changed.

    Open the source code that generate the Ssaid(Android ID) getSsaidSettingLocked based on two parameters: a random ID generated on first use to identify a user ID (in multi-users or work profiles), and the app's signing key. If you update android version, these parameters will not be changed.

    If user ID is randomized after a factory reset, the app-specific Android ID should be changed.

    Best Regards,

    Leon Lu

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

0 additional answers

Sort by: Most helpful