Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,805,022 Members 52,741 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
papinist
Old
#1  
Member - OP
Thanks Meter 13
Posts: 79
Join Date: Dec 2010
Default [Q] Lock screen PIN lost on 4.2.2 - How can I bypass this?

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..
 
iLeopard
Old
#2  
Senior Member
Thanks Meter 170
Posts: 851
Join Date: Dec 2011
Location: College Station

 
DONATE TO ME
Default [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: [ Click to Expand ]
 
papinist
Old
#3  
Member - OP
Thanks Meter 13
Posts: 79
Join Date: Dec 2010
Quote:
Originally Posted by iLeopard View Post
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!
 
iLeopard
Old
#4  
Senior Member
Thanks Meter 170
Posts: 851
Join Date: Dec 2011
Location: College Station

 
DONATE TO ME
Default [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?
 
papinist
Old
#5  
Member - OP
Thanks Meter 13
Posts: 79
Join Date: Dec 2010
Quote:
Originally Posted by iLeopard View Post
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!
 
iLeopard
Old
#6  
Senior Member
Thanks Meter 170
Posts: 851
Join Date: Dec 2011
Location: College Station

 
DONATE TO ME
Default [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?
 
bodh
Old
#7  
Senior Member
Thanks Meter 83
Posts: 379
Join Date: Nov 2012
Location: Scranton
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: [ Click to Expand ]
 
papinist
Old
(Last edited by papinist; 18th February 2013 at 09:50 AM.)
#8  
Member - OP
Thanks Meter 13
Posts: 79
Join Date: 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"
 
Herman76
Old
#9  
Herman76's Avatar
Senior Member
Thanks Meter 257
Posts: 1,368
Join Date: May 2010
Location: Trondheim
Quote:
Originally Posted by papinist View Post
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.
Phone history:
Current:
Google Nexus 10"
Stock ROM Locked Bootloader.

LG Nexus 5
Stock ROM Locked Bootloader
 
papinist
Old
#10  
Member - OP
Thanks Meter 13
Posts: 79
Join Date: Dec 2010
Quote:
Originally Posted by Herman76 View Post
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 :-/

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes