I depends on device.uuid to control my users, Does UUID change when factory reset, in Phonegap android.
2 Answers
If you are talking about device UUID for android , its a random ID generated on first boot of the device. It will stay the same until OS upgrade or Factory Reset. So you can use that id as an unique identifier for the device from your app. This way users don't even need to sign in to your app. Just by opening itself you get a unique (almost) identifier, that you could use.
According to the docs:
A 64-bit number (as a hex string) that is randomly generated when the user first sets up the device and should remain constant for the lifetime of the user's device. The value may change if a factory reset is performed on the device.
Useful articles from android developers Identifying App Installations and Best Practices for Unique Identifiers.
Update with new information:
On Android 8.0 (API level 26) and higher versions of the platform, a 64-bit number (expressed as a hexadecimal string), unique to each combination of app-signing key, user, and device. Values of ANDROID_ID are scoped by signing key and user. The value may change if a factory reset is performed on the device or if an APK signing key changes. For more information about how the platform handles ANDROID_ID in Android 8.0 (API level 26) and higher, see Android 8.0 Behavior Changes.
Note: For apps that were installed prior to updating the device to a version of Android 8.0 (API level 26) or higher, the value of ANDROID_ID changes if the app is uninstalled and then reinstalled after the OTA. To preserve values across uninstalls after an OTA to Android 8.0 or higher, developers can use Key/Value Backup.
Old answer
device.uuid
on android it gets the native android.provider.Settings.Secure.ANDROID_ID
According to the docs
A 64-bit number (as a hex string) that is randomly generated when the user first sets up the device and should remain constant for the lifetime of the user's device. The value may change if a factory reset is performed on the device.
Note: When a device has multiple users (available on certain devices running Android 4.2 or higher), each user appears as a completely separate device, so the ANDROID_ID value is unique to each user.
So yes, if the user do a factory reset the value may change.

- 51,328
- 11
- 132
- 176
-
But it changes when app reinstalling – shamon shamsudeen Mar 28 '20 at 18:00
-
The behavior changed on android 8, updated with the new information. – jcesarmobile Mar 28 '20 at 19:37