1

I am just wondering for a unique device identifier in android. and had a look at this adb command.

adb shell getprop ro.expect.recovery_id

Is it a unique identifier for a device? if its not, then what's its purpose? I was just googling around but coudln't found anything related to this identifier.

Lino
  • 5,084
  • 3
  • 21
  • 39
Bilal
  • 1,034
  • 11
  • 23

1 Answers1

1
getprop ro.expect.recovery_id

will return the ID of a boot image.

eg: [ro.expect.recovery_id]: [0xe0d5700a6d7672e44a8e9b341f0a22b8f781e73d00000000 0000000000000000]

You can see usage here and here

Update:

recovery.id is removed from aosp/887473 onwards. Refer here for the details. But I'm not sure that this change is updated in source branch. You can find the author and commit message in the above link.

From the commit message:

Since aosp/887473 removed ro.expect.recovery_id, There is no usage of "RECOVERYIMAGE_ID_FILE" which points $(PRODUCT_OUT)/recovery.id.

Sudheesh R
  • 1,767
  • 3
  • 23
  • 43
  • Ah okay. Thanks for your answer. if it is boot image, then it must not be unique. can u suggest me any unique hardware identifier other than Android_id? – Bilal Dec 31 '19 at 12:57
  • Although relying on hardware id is not recommended but still you can follow these links to get an idea. [Stackoverflow thread](https://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id) and [android developer documentation](https://developer.android.com/training/articles/user-data-ids) – Sudheesh R Dec 31 '19 at 15:37
  • yeah just had a look on them, and came on a conclusion, that after Android O Android_ID is best candidate. – Bilal Jan 01 '20 at 07:14