5

I have an Android 10 phone (OnePlus 5) and I want to change the Android ID (I think this is what apps use to identify you sometimes). I read that either I can do a factory reset or root my phone, both of which probably involve wiping the data clean which I want to avoid, and rooting looks complicated.

But I read that it's possible to change the Android ID by just using some command line tools, is it possible?

StopUsingFacebook
  • 163
  • 1
  • 1
  • 5
  • How do you know that changing this ID is what you need? Typically modern apps are not allowed to use the device id anymore. Instead the advertising id is often used which can be reset in Android Google settings. See https://source.android.com/devices/tech/config/immutable-device-ids – Robert Feb 15 '21 at 15:30
  • 1
    @Robert, maybe I mistermed. I thought modern apps are not allowed to use the IMEI number anymore. By "device ID" in my post I meant the "Android ID", which I believe they are allowed to use. I did not know about advertising ID.. will check – StopUsingFacebook Feb 15 '21 at 15:32
  • 1
    Sorry, the links was only about the static IDs, not covering ANDROID_ID. This is the correct link: https://developer.android.com/about/versions/oreo/android-8.0-changes#privacy-all – Robert Feb 15 '21 at 15:35
  • @Robert I don't believe advertising ID Is what I need since the issue occurs on different Google accounts on my phone (I assume advertising ID is different for different Google accounts). So I think it uses Android ID. – StopUsingFacebook Feb 15 '21 at 15:39

1 Answers1

6

AFAIK you cannot change Android ID without root or without performing a factory reset.

For my own and future visitors' reference, I'll explain what you asked in the comment:

Would a factory reset also lead to a different app-specific ID?

Android documentation is not very clear about this:

"The value may change if a factory reset is performed on the device or if an APK signing key changes."

As I explained in my answer to Where is the "android_id" stored and when does it change?, since Android 8 every app gets a unique Android ID which is saved in file:

/data/system/users/<User_ID>/settings_ssaid.xml

Since the file is not accessible without root, it's not possible to change the ID for a specific app.

Android 11 source code shows that the app-specific Android ID is generated 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.

Since the user ID is randomized after a factory reset, the app-specific Android ID should also change.

Without root and factory reset the only thing we can change is the package's signing keys, which may not always be very feasible and requires some good hacking skills.

With root access you can edit the file mentioned above. It contains the user ID as well as the app-specific Android IDs. Simply changing the Android ID will do the trick.

But if you reinstall or update the app the original Android ID (created by Android OS) will come back (since the randomly generated user ID and the package's signing key isn't changed). So you need to edit the file again. Or you can remove the user ID as well from the file (the line with name="userkey") which makes the changes permanent.

After making changes to the file, a reboot might be required if Android framework is caching the values somewhere.

Irfan Latif
  • 20,353
  • 3
  • 70
  • 213
  • If the ANDROID_ID of only one app should be changed apps like "Parallel Space" may be an additional root-less option, too. As the app then runs within Parallel Space the signature key is different and the app is seeing a different ANDROID_ID. However some apps have counter-measures against apps like Parallel Space. – Robert Feb 16 '21 at 08:36
  • Or you can remove the user ID as well from the file (the line with name="userkey") which makes the changes permanent.

    Does this have no adverse effects?

    – StopUsingFacebook Feb 16 '21 at 13:54
  • @Robert Parallel Space modifies apps or it uses some sort of virtualization engine? I'm not sure about that. However apps running in a work profile or secondary user (like with Shelter, Island, Second Space, Dual Apps etc.) have always different ANDROID_ID because the user ID is different, though signing key remains the same. – Irfan Latif Feb 16 '21 at 14:16
  • 1
    @StopUsingFacebook the only adverse effect is that all apps running under that user may get a new Android ID. – Irfan Latif Feb 16 '21 at 14:18
  • @IrfanLatif Would AndroidID change when the OS has been updated? For example from Android 11 to Android 13? Thanks – Houman Apr 11 '23 at 20:29