Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] Lock screen PIN lost on 4.2.2 - How can I bypass this?

OP papinist

18th February 2013, 12:58 AM   |  #1  
OP Senior Member
Thanks Meter: 15
 
109 posts
Join Date:Joined: Dec 2010
Hi guys, I need help!
My friend set the Lock screen PIN but now it is not recognised anymore.. maybe he set it wrong, or he forgot the correct numbers. Anyway, now the phone is stuck at the pin request and we can't do anything.

Situation: Galaxy Nexus on 4.2.2 stock with stock recovery - Unlocked bootloader, root permission, wifi on and connected.

these are the procedures I tried:

- first of all, inserting wrong pin 5 times should give a message to access with google accounts, but we have no message... perhaps this is only for locking screen with sequence.

- adb commands: requires usb debug on, and luckily we have it on. However, 4.2.2 introduces whitelist for usb debug connections (read of it on androidpolice): when connecting to a pc in usb debug mode, phone asks you confirmation. Since we can't get past the lock screen, we can't confirm that and adb finds the device 'offline'.

- install "screen lock bypass" from web play store: phone is connected to wifi, installing an app from web play store will send it to the phone and install it. Then, connecting phone to a charger would pop up a request to unlock it. Unfortunately that app is only compatible with android version from 2.2 to 4.0. Even if I download that .apk to trying manual installation, I can't push it with "adb install package.apk" since adb won't work (see previous procedure)

- flashing from recovery a modified update.zip that will overwrite lockscreen settings: simply put that modified update.zip into sdcard and flash it from recovery. But our nexus has not a removable sdcard, and connecting to pc won't show files because it is pin protected (very smart, android!). Moreover, it requires cwm or twrp recovery and I don't have that installed.

A real mess, right?
Is there anything else I could try? I really want to save his data..
18th February 2013, 01:01 AM   |  #2  
Senior Member
Flag College Station
Thanks Meter: 170
 
851 posts
Join Date:Joined: Dec 2011
Donate to Me
More
[Q] Lock screen PIN lost on 4.2.2 - How can I bypass this?
Perhaps boot into fast boot, flash cwm or twrp via adb. ADB should work there. Then flash your update.zip or another ROM
The Following User Says Thank You to iLeopard For This Useful Post: [ View ]
18th February 2013, 01:21 AM   |  #3  
OP Senior Member
Thanks Meter: 15
 
109 posts
Join Date:Joined: Dec 2010
Quote:
Originally Posted by iLeopard

Perhaps boot into fast boot, flash cwm or twrp via adb. ADB should work there. Then flash your update.zip or another ROM

thanks fro your instant reply!
If adb should work in fastboot mode, then I could send commands to blank password.
I found these commands:
adb shell
sqlite3 /data/data/com.android.providers.setting*s/databases/settings.db
update secure set value=65536 where name='lockscreen.password_type';
.exit
exit
adb reboot

do you think it should work?

Procedure with modified update.zip is here: http://www.garage4hackers.com/f54/re...read-2630.html

another interesting procedure could be this? http://blog.thisisfeifan.com/2012/05...pk-coming.html

I am not an expert, hope I can save that phone!
18th February 2013, 01:23 AM   |  #4  
Senior Member
Flag College Station
Thanks Meter: 170
 
851 posts
Join Date:Joined: Dec 2011
Donate to Me
More
[Q] Lock screen PIN lost on 4.2.2 - How can I bypass this?
Hah NP, thank tapatalk for the updates.

As far as those methods go, I'm not entirely sure any will work as I have no experience with them. Is there data you wish to preserve?
18th February 2013, 01:29 AM   |  #5  
OP Senior Member
Thanks Meter: 15
 
109 posts
Join Date:Joined: Dec 2010
Quote:
Originally Posted by iLeopard

Hah NP, thank tapatalk for the updates.

As far as those methods go, I'm not entirely sure any will work as I have no experience with them. Is there data you wish to preserve?

tried fastboot mode, but ADB won't see the device :-/

Yes my friend has a lot of data in it.. damn!
18th February 2013, 01:31 AM   |  #6  
Senior Member
Flag College Station
Thanks Meter: 170
 
851 posts
Join Date:Joined: Dec 2011
Donate to Me
More
[Q] Lock screen PIN lost on 4.2.2 - How can I bypass this?
Install fast boot drivers, just stock drivers from Samsung. I've also heard PDAnet is a workaround for drivers.

Are we talking application data or personal data?
18th February 2013, 05:52 AM   |  #7  
Senior Member
Flag Scranton
Thanks Meter: 84
 
379 posts
Join Date:Joined: Nov 2012
I found something similar to your sqlite code, http://null-byte.wonderhowto.com/how...0138807/...But i do not believe it would work with the newest adb rsa verification.

I'd think you need to flash a new factory image.
http://forum.xda-developers.com/show....php?t=1626895, fastboot flash all except userdata.img
But maybe even that would not wipe the lockscreen.

If you get drivers working, you might be able to try and dd the proper partition to pc hard disk before wiping, but you'd have to research the specifics.
The Following User Says Thank You to bodh For This Useful Post: [ View ]
18th February 2013, 10:23 AM   |  #8  
OP Senior Member
Thanks Meter: 15
 
109 posts
Join Date:Joined: Dec 2010
I finally manage to install the fastboot drivers and now fastboot recognises the phone. Obviously if fastboot works, adb does not work, so I can't use the commands I found.
An androidpolice user suggest me to flash a previous 4.2.1 image, wiping regular and dalvik cache, without flas the userdata.img. It will be unstable but stable enough to do some backup..

EDIT: I am now able to get into stock recovery, here I see something like "install from adb", so maybe I could send the modified update.zip?
Would it works?
It has this data inside:
ui_print("Mounting System");
ui_print("Mounting Data");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
ui_print("Deleting Pattern/ PIN Lock Keys");
delete("/data/system/gesture.key");
delete("/data/system/password.key");
ui_print("Unmounting System");
ui_print("Unmounting Data");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/data");
ui_print("Done ");

Could I mess all up?

EDIT#2: the update.zip method does not work, the file load but phone says "installation aborted"
Last edited by papinist; 18th February 2013 at 10:50 AM.
18th February 2013, 12:04 PM   |  #9  
Herman76's Avatar
Senior Member
Flag Trondheim
Thanks Meter: 257
 
1,368 posts
Join Date:Joined: May 2010
More
Quote:
Originally Posted by papinist

I finally manage to install the fastboot drivers and now fastboot recognises the phone. Obviously if fastboot works, adb does not work, so I can't use the commands I found.
An androidpolice user suggest me to flash a previous 4.2.1 image, wiping regular and dalvik cache, without flas the userdata.img. It will be unstable but stable enough to do some backup..

EDIT: I am now able to get into stock recovery, here I see something like "install from adb", so maybe I could send the modified update.zip?
Would it works?
It has this data inside:
ui_print("Mounting System");
ui_print("Mounting Data");
run_program("/sbin/busybox", "mount", "/system");
run_program("/sbin/busybox", "mount", "/data");
ui_print("Deleting Pattern/ PIN Lock Keys");
delete("/data/system/gesture.key");
delete("/data/system/password.key");
ui_print("Unmounting System");
ui_print("Unmounting Data");
run_program("/sbin/busybox", "umount", "/system");
run_program("/sbin/busybox", "umount", "/data");
ui_print("Done ");

Could I mess all up?

EDIT#2: the update.zip method does not work, the file load but phone says "installation aborted"

Did you activate lockscreen PIN or SIM card PIN. If SIM card ping, you need the PUK code provided by your operator to unlock that.

Anyway, just a thought.
18th February 2013, 12:07 PM   |  #10  
OP Senior Member
Thanks Meter: 15
 
109 posts
Join Date:Joined: Dec 2010
Quote:
Originally Posted by Herman76

Did you activate lockscreen PIN or SIM card PIN. If SIM card ping, you need the PUK code provided by your operator to unlock that.

Anyway, just a thought.

no Herman, it's the screen lock pin. I was able to flash the twrp recovery from fastboot, backup data partition, factory reset (phone boots normally without asking for a pin!), but after restoring data partition, pin request come back :-/

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes