Apps like Titanium Backup made it easy for us to restore Android ID, but because of changes in Android 6.0 Marshmallow update, the app no longer helps in restoring Android ID of the device prior to new ROM or firmware flash. To fix this, you have to restore the Android ID all by yourself now, manually. But it isn’t hard, as you’ll see.
Android ID is changed when you flash a new ROM, but you may want it back as it’s used by banking and similar high-security demanding apps to make sure it’s the same devices where you had logged in before.
When such apps don’t find the same Android ID as that stored in app’s cache, it would ask you to register again. And if you are a pro user, many of your apps may be relying on Android ID.
Luckily for us, user piit79 over at XDA found a trick to find the previous Android ID of the device and use it to restore, replacing the new Android ID you got after flashing the Marshmallow update, or any other ROM based on 6.0 for that matter.
How to
adb devices
adb shell content query --uri content://settings/secure --where "name=\'android_id\'"
You will get a result like this.
For me Android ID is 66afb59f014dae26
adb shell content delete --uri content://settings/secure --where "name=\'android_id\'"
adb shell content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:<new_android_id>
In my case, the above command will be:
adb shell content insert --uri content://settings/secure --bind name:s:android_id --bind value:s:66afb59f014dae26
The Android ID you enter above has to be your previous Android ID, one that you want to restore. Don’t forget to remove the < and > around Android ID.
Done. That’s it.
Reboot your device, and open Titanium backup now, or any other banking app, and it should recognize old Android ID now, and shouldn’t ask you to re-login.
Via piit79










