View Single Post
  #10 (permalink)  
Old 01-13-2010, 04:49 AM
marr17's Avatar
marr17
Lurker
Offline
Threadstarter
Location: ontario,ca
 
Join Date: May 2008
Posts: 12
Reputation: 0
marr17 is a n00b
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Locked out of hero

http://cfossguy.blogspot.com/2009/11...r-android.html

  1. Plug phone into computer via USB
  2. adb shell
  3. su to get #
  4. chmod 777 /data/data/com.android.providers.settings/databases/settings.db


Now, you have root access to your android phone and you have changed the permissions to the "settings.db" so that you can pull/push it from your computer back to the phone. Many thanks to "briankwest" and this post for that valuable tidbit. Next, comes the hard part that I had to figure out on my own:
  1. Pull the sqlite database file from your phone settings using this command: adb pull /data/data/com.android.providers.settings/databases/settings.db ./settings.db
  2. Make a copy of this file to make sure you can push the original settings back, if needed: cp settings.db settings.db.bak
  3. Download SQLite database browser from here: http://sourceforge.net/projects/sqlitebrowser/
  4. Open the "settings.db" file that you pulled in #1 in SQLite Database Browser
  5. Browse data in the "system" table. You are looking for 2 rows: "lock_pattern_autolock" and "lockscreen.lockedoutpermanently"
  6. Make sure both rows have a value of "0" instead of "1". You can use SQLite to modify this data once you've browsed to it
  7. Save the database file and close the SQLite browser
  8. Push the sqlite database file back to your phone using this command: adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
  9. Turn your phone off/on and your phone will no longer be locked! And, you don't have to worry about fixing the permissions on settings.db. When your phone started, it reset the permissions on that file back to the default, which means you will have to root back in and re-chmod if you didn't update the settings.db file properly.
This information kept me from calling Sprint PCS customer service, something I only do if absolutely necessary. Also, this is a nifty way to change pretty much any SQLite data on your phone.

Last edited by marr17; 01-13-2010 at 11:25 PM.
Reply With Quote