Phone went crazy, now I can't get in...help!

Subversive

Member
Mar 29, 2014
7
0
0
Visit site
Hi, so I have a Galaxy S2, rooted and unlocked. I think it's on Android 2.3, but I'm not sure. So it was working fine about an hour ago. I set it down, then when I went to pick it up, it was going crazy entering the 7 key on the lock screen over and over.... I hit OK, it said wrong password of course, kept typing the number 7 (I could see the key blinking). I finally had to power it off to get it to stop. When I powered it back on, it wouldn't accept my original password. I've tried power cycling it again, no dice. Tried all the "default" passwords I can think of with no luck. I'm really frustrated because I'm a consultant and use a timesheet app to track my hours at various clients throughout the month. Without that app it's going to be a nightmare trying to reconstruct where and when I worked this month. I really really don't want to have to do a factory reset.

My one glimmer of hope is the fact that I have it rooted, but when I plug it in, it doesn't show up in my computer. I normally have to press the USB connect option when I connect it before the computer sees it.

Does anyone have any idea how this could happen, and more importantly, if there's any way for me to recover without factory resetting?
 

Vsweety

Banned
Mar 24, 2014
407
0
0
Visit site
Hi, so I have a Galaxy S2, rooted and unlocked. I think it's on Android 2.3, but I'm not sure. So it was working fine about an hour ago. I set it down, then when I went to pick it up, it was going crazy entering the 7 key on the lock screen over and over.... I hit OK, it said wrong password of course, kept typing the number 7 (I could see the key blinking). I finally had to power it off to get it to stop. When I powered it back on, it wouldn't accept my original password. I've tried power cycling it again, no dice. Tried all the "default" passwords I can think of with no luck. I'm really frustrated because I'm a consultant and use a timesheet app to track my hours at various clients throughout the month. Without that app it's going to be a nightmare trying to reconstruct where and when I worked this month. I really really don't want to have to do a factory reset.

My one glimmer of hope is the fact that I have it rooted, but when I plug it in, it doesn't show up in my computer. I normally have to press the USB connect option when I connect it before the computer sees it.

Does anyone have any idea how this could happen, and more importantly, if there's any way for me to recover without factory resetting?

Pulled the battery yet?

Got backup data sets off the phone?
 

Subversive

Member
Mar 29, 2014
7
0
0
Visit site
Yes, tried pulling the battery as one of my first steps, sorry should have mentioned that.

I managed to get booted into recovery mode using ADB and am running a backup now. I found some threads on how to possibly get this PIN removed, but no luck so far.

Tried Method 2 on this page:
[Android][Guide]Hacking And Bypassing Android Password/Pattern/Face/PI - xda-developers

Tried this one but getting an error that sqllite3 not found, does it need to be installed on the phone in advance?
[Hack] remove a lockscreen pin via adb with sqlite3 - xda-developers
 

Subversive

Member
Mar 29, 2014
7
0
0
Visit site
So, making some progress here, but maybe someone can help me move it along faster.

I'm trying to perform these steps to remove the screen lock PIN from my phone.

http://forum.xda-developers.com/showthread.php?t=1409304

I have the SDK tools installed on my (Windows) computer. I have been able to boot my phone into recovery mode and connect to it using ADB. However my phone does not appear to have sqlite3 installed. I have managed to get the sqlite3.exe file copied to my /system/bin directory on the android, however it will not run. It gives me the following error:

# sqlite3
sqlite3
MZ?♥♦**╕@?♫▼║♫┤: not found
▼║♫┤: not found
sqlite3: 4: Syntax error: "(" unexpected
#

I'm thinking this is related to the fact that this is a windows executable (same error goes if I name the file sqlite3.exe and run it). What am I missing here?
 

neu smurph

Well-known member
May 15, 2013
158
0
0
Visit site
May or may not help, but if you had Google's Android Device Manager set up on the phone you can use the web interface to change password/pin remotely (as long as it's got connectivity when stuck on the lock screen). I'm pretty sure it rolled out across all Android versions via a Play Services update about 6-8 months ago or so, but end users still needed to manually allow the service Administrator Access.

https://support.google.com/accounts/answer/3265955
 

Subversive

Member
Mar 29, 2014
7
0
0
Visit site
Thanks, but not sure how to get to it now (not sure if I ever installed it in the first place either). It was connected to wifi when I first was locked out, but since I've pulled the battery and booted into recovery mode multiple times it doesn't seem to be connecting automatically anymore.

I actually got most of the way through the process linked above, but it doesn't seem to be working. Here are the steps I took.

  1. Copied settings.db to sdcard
  2. Pulled it to my computer using sdb pull
  3. Ran the sqlite3 commands as directed by the recovery instructions
  4. Used adb push to put it back in the sdcard directory
  5. Copied it back to the proper directory, overwriting the original

However, after doing these steps then rebooting, the phone is still locked out. I'm noticing the following. The original file settings for the settings.db file were as follows:

-rw-rw---- 1 system system 73728 Mar 29 03:32 settings.db

Whereas the new file settings are

-rwxrwxr-x 1 root root 73728 Mar 28 23:40 settings.db

So could this be the cause? Also I'm just noticing the dates are weirdly messed up, as the edited one should have a later date. Do I need to change the owner and the rw settings back to match the original?

Also, I figured out how to get the android version of sqlite3 on the phone, so I can run db commands directly if necessary now.
 

Subversive

Member
Mar 29, 2014
7
0
0
Visit site
Well, I managed to find my data and get it off the phone in a usable format. This seems beyond the scope of these forums, but just in case this helps somebody someday, here's what I did.

sdb shell
su
cd data/data
cd timesheetapp (or whatever your app directory is called. in my case it had the developers name in it, so took a few minutes to find)
cd databases
cp timesheet.db /sdcard/timesheet.db
exit
exit
adb pull /sdcard/timesheet.db timesheet.db
sqlite3 timesheet.db (from Windows command prompt where sqlite3.exe lives)
.tables (locate table which looks promising)
.mode csv
.header on
.out timesheetexport.dmp
select * from tasks; (tasks is the table chosen several steps up, if this turns out to be the wrong one, just try again with a different table until you find the one that has the data you need)
rename timesheetexport.dmp to timesheetexport.csv, open with excel
Voila, data I need is there and can be reconstructed so I can do my invoicing.

All hail the internet and the power of google for the above. I'll also be repeating some of the steps to get my photos and videos off the phone before factory resetting.
 

Subversive

Member
Mar 29, 2014
7
0
0
Visit site
Haven't had time to post again since I wiped the phone on Saturday night, but this is annoying. So I did the factory reset on the phone. It reboots, comes up with the google sign in stuff, etc. All my apps are gone, all the default Bell apps are there again, etc. Looking good. However, it seems that the unknown pin code lock is still there. If the phone times out or I press the lock button, I am presented with lock screen. None of the default PINS (1234, 1111, 9999, 0000) work, nor does my previous PIN. I am able to bypass the lock screen by double clicking the home button which brings up the voice prompt ("what do you want to do?"). If I then cancel, I can hit the home button again and get my phone home screen. However I cannot set a new PIN, as it wants me to enter the current one first.

So, to put it bluntly, what the hell?
 

Rukbat

Retired Moderator
Feb 12, 2012
44,529
26
0
Visit site
Sorry about your problems, and if deleting the pin file doesn't kill the pin, Golfdriver's suggestion is probably the best one. Odin is, of course, readily available and you can probably find the stock ROM at Firmwares | SamMobile (use the phone's model number, not "S2".)

This seems beyond the scope of these forums, but just in case this helps somebody someday, here's what I did.
It may be beyond the scope of the forums, but I thank you for it. It's now on my laptop, my NAS, my cloud storage and my phone. The last step, the SELECT, is trivial for someone who's been working with SQL since it was developed, but getting the right database out of the phone to be able to perform a select on it (and telling it to use csv format in the output) would have taken a lot of searching on my part. Thanks for the information, and I hope you find a ROM and get the phone fixed.
 

Forum statistics

Threads
943,143
Messages
6,917,490
Members
3,158,839
Latest member
akbarramadhani12