Is it possible to change Android ID without root access nor factory reset?


Question

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?


Answer

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.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes