How To Hack Android Pattern Lock using HackLock on Termux

 Hacking Android pattern lock.

We, Android users have the misconception that pattern lock is the most secure way to protect our smartphone. But we are wrong, pattern lock is categorized in “medium” security.

Android itself recommends us to set characters as password as they are not that easy to crack compared to pattern lock.

As Android is a large platform and it offers many different kinds of services, it has many bugs that are still unsolved or unpatched.

If it is possible to hack pattern lock, then how?

We can use a simple tool called HackLock, a shell script. This tool hosts a PHP web page and serves a virtual lock page when the target draws the pattern on the web page, the pattern is captured in the form of numbers.

Let’s see how it is possible.

Installing and Configuring HackLock on Termux

Open up the Termux application and download the tool from Github. Now navigate to the directory where the tool is downloaded and list it.

Follow these steps to install and configure HackLock properly.

#1. Make sure you have PHP and Open SSH installed in the Termux. If you don’t have, just install them by applying these commands. Before that don’t forget to update and upgrade the repositories to avoid unnecessary errors.

apt update && upgrade

pkg install php

pkg install openssh

#2. Navigate to the directory where the tool was downloaded. Change the mode of script to the executable and launch the script.

chmod +x


#3. Choose the No.1 option- Hack pattern and hit Enter. It will start downloading Ngrok which is a port forwarding service. Just give it some time

#4. Make sure that you have the Mobile Hotspot enabled, otherwise Ngrok will not generate any link. If you forgot to enable, just restart the tool.

#5. Copy the link and send it to the target.

Capturing the Pattern Lock of the Target Device

When the target enters the link, he/she will get to see a lock screen as shown in the screenshot below. Usually, most people fall into this trap

If you get lucky, the captured pattern will be shown in the form of numbers on the Termux application. Now open up/download a pattern lock image and join the pattern depending on the numbers you’ve captured.

Boom! what did you get? Was it too hard?