As stated here Oreo has unique ANDROID_ID's for each app which makes the previous command for getting the id not working as I'd like.
adb shell settings get secure android_id
How can I now, on Oreo, get the android id as seen by a specific app?
Root & non-root solutions are welcomed.
adb
doesn't support retrieving an app-specific ANDROID_ID
at this time, because app-specific ANDROID_IDs are being written into a separate file (settings_ssaid.xml
, while adb
allows to access only values from system
, secure
or global
tables). However, on emulator or on a rooted device this can be easily achieved:
# switch into a root mode and open a shell
$ adb root
$ adb shell
$ pm list users
Users:
UserInfo{0:Owner:13} running
UserInfo{10:New user:10} running
# let's find all the app-specific ANDROID_IDs for user 0
$ cd /data/system/users/0
$ cat settings_ssaid.xml
<settings version="-1">
<setting id="0" name="userkey" value="E4FC4CFF14039F5AD44AD63F70007F85FDBBE1FF9BCB9FF5331B3FD33E057461" package="android" defaultValue="E4FC4CFF14039F5AD44AD63F70007F85FDBBE1FF9BCB9FF5331B3FD33E057461" defaultSysSet="true" tag="null" />
<setting id="4" name="10072" value="9d5f269e42d4ca76" package="info.osom.ssaid" defaultValue="9d5f269e42d4ca76" defaultSysSet="false" tag="null" />
</settings>
In this example, I have one application with package name info.osom.ssaid
, whose ANDROID_ID
value is 9d5f269e42d4ca76
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With