Created
July 16, 2014 17:09
-
-
Save halfvector/840a945c081e5112c6d6 to your computer and use it in GitHub Desktop.
update device's android_id
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prerequisites: rooted device, adb, sqlite installed locally | |
# works beautifully on glass | |
# android-ids are hexadecimal [0-9a-f] | |
# install sqlite3 locally to modify the db | |
sudo apt-get install -y sqlite3 | |
# make sure we have a device connected | |
adb devices | |
# grab db from android device | |
adb pull /data/data/com.android.providers.settings/databases/settings.db | |
# update name | |
sqlite3 settings.db "update secure set value='decaf1' where name='android_id'" | |
# verify | |
sqlite3 settings.db 'select * from secure' | fgrep android_id | |
# push db back to android device | |
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db | |
# reboot device | |
adb reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment