How to restore previous android id from titanium backup? My line apps doesn't work because it counts on android id.

I want to restore my android id then. However, out of so many back up files in titanium back up, which one contains my old id?
Android ID can be found in the database settings.db of Settings Storage/Providers app. It is located under /data/data/com.android.providers.settings/databases. 

There are multiple ways of restoring Android ID. 

Through Titanium Backup

In Titanium Backup (TiBu), go to Menu &rarr; Manage Android ID &rarr; Restore Android ID from a backup. If one or multiple backups of Settings Storage/Providers app exists then TiBu would list the ID. You can then select the ID and begin restoration of it. 

(Click image to enlarge)



However, if no such backup of that app exists, then you would get this dialog:



Using command-line

If you already know which ID has to be restored then you can do this:

Setup adb in PC and execute:



(The lines starting with echo are only for the purpose of explaining what I'm going to do in consecutive command. Avoid executing them.)

You can also edit settings.db using an SQLite database manager such as sqlite3, but why bother this much?



Interestingly, the hostname of your device would be nothing more than android-ANDROID_ID where ANDROID_ID is the Android ID. You can check it using: 

adb shell getprop net.hostname


Note: the whole solution is tested on Android 4.2.1 and 6.0.1.