# Getting past lock code via adb ?

Ok not 100% sure I forgot my pass code or if something happened to corrupt it. Was it always 5 numbers ? I vaguely remember it having to be 6 minimum. Either way the pass code no longer seems valid so is there are way I can either clear it or by pass it using developer tools?

I can access the system partition via TWRP so is there a way of just deleting the pass code and unlocking it that way?

I've no used my phone much since before Xmas because of one thing or another but I did spend quite a bit of time configuring and testing it so I am reluctant to just blow it all away. I know I did do a back up previously but from what I read on the forums the back up at that time was not complete and so should not be trusted to be a recovery from factory restore.

EDIT: I suppose i should also add I have copied across the root.img.gz and home.img.gz to my laptop and so can browse and change them freely. Just no sure where to look. Was kinda hoping of a /etc/shadow- file somewhere ;)

EDIT2: So /etc/signond.conf looks interesting. But no sign of it being used anywhere. It has just a couple of options to it.

;
FileSystemName=signonfs
Size=8
FileSystemType=ext2

[ObjectTimeouts]
; All the values are in seconds
IdentityTimeout=30
AuthSessionTimeout=30
; Set the timeout to 0 to disable quitting due to inactivity
DaemonTimeout=5


Thoughts anyone? Thanks.

edit retag close delete

I can't help with the rest, but my pass code is 5 numbers long.

( 2018-02-14 16:22:40 +0300 )edit

Fairy nuff. Figure mine must be six then. But I've run them any which way and still no joy.. *sighs&

( 2018-02-14 16:24:58 +0300 )edit

what device you using? adb? TWRP? some android port?

( 2018-02-14 16:33:44 +0300 )edit

Guessing Xperia X from previous posting.

( 2018-02-14 16:36:29 +0300 )edit

Sony F5121.

When TWRP is booted it has an adb daemon running. I thought people knew that. Anyway, it is easy enough to get the filesystem images question is where do I look on them for the pass code or the settings for pass codes?

( 2018-02-14 16:37:42 +0300 )edit

Sort by » oldest newest most voted

I went through that and in the end I ended up remembering that I had changed the code (and luckily remembered the new one :)

Nevertheless, here are some files which you may find interesting:

/usr/share/lipstick/devicelock/devicelock_settings.conf /usr/share/lipstick/devicelock/.devicelock.enc

AFAIK the code is encrypted partially making use of the IMEI and the contents of /dev/block/platform/msm_sdcc.1/by-name/QOTP (which in my case had the same content as /sys/class/net/wlan0/address, i.e. the MAC address).

This program /usr/lib/qt5/plugins/devicelock/encpartition can be used to check/change/play-with the code. You won't get anywhere however unless you remember the code or figure out how to decrypt it.

(This is for Jolla-1. I don't know if things are different in other models)

more

Thanks. I will bear that in mind if it ever happens again. For now though I decided to just re-install and start from the beginning.

Thanks anyway.

( 2018-02-19 22:20:38 +0300 )edit