There are many tutorials for unlock android pattern, but all are work when your device is rooted, so when device is not root and you forget your android pattern and don’t want to loss userdata, then this trick for you.
How this work?
Android pattern or password are stored in userdata partition, if your have backup of userdata then you can bruteforce gesture.key or password.key
How to backup userdata:
Restsrt your device in recovery mode by pressing volume down+power or volume up+power button.
Select option backup userdata.(create backup on external sd card)
if backup successfully created then you will see a file named userdata_xxx_xxx.backup in your external sdcard.
move file to pc desktop.
how to crack or pattern:
Convert userdata .backup file into .tar.gz by following command:
“dd if=userdata.xxx.xxx.backup bs=512 skip=1 of=backup.tar.gz”
Extract tar file:
“tar -xvf backup.tar.gz -Desktop/anyfolder”
Download python script from here: or clone
git clone https://github.com/sch3m4/androidpatternlock
move gesture.key file from anyfolder/data/system/ to androidpatternlock folder that u cloned or downloaded from github.
type command in terminal:
“python aplc.py gesture.key”