Fragment is a modern, visual, and user-friendly web application designed to help you recover forgotten Android patterns, PINs, and passwords by utilizing the fragments of memory you still have.
This project started out of sheer panic.
I was completely locked out of my Android phone after forgetting my pattern. I searched everywhere for a solution, but the internet gave me only one answer: Factory Reset. I was about to lose all my photos, messages, and data.
But then I realized something: I didn't forget the entire pattern. I knew it started in the top-left corner. I knew I definitely didn't use the bottom-right dot. I had fragments of the memory.
Instead of wiping my phone, I used AI to help me quickly code a script that took the rules of Android patterns, applied the constraints I remembered, and generated the remaining possibilities. I built a quick visual grid, tapped in my constraints, and the app gave me a list of patterns to try.
By eliminating them one by one... I unlocked my phone. I saved my data.
I realized how many people must be in this exact situation—not just with patterns, but with PINs and passwords where they remember parts of it but not the whole thing. Most tools that do this (like Crunch or Hashcat) are built by hackers, for hackers, and require complex command-line knowledge.
So, I expanded the app. I added PIN and Password recovery, wrapped it in a beautiful, minimalist UI, and open-sourced it for the world.
- Visual 3x3 Grid: Interactive UI to input your constraints.
- Excluded Dots: Mark dots you know you didn't use.
- Starting Dots: Mark where the pattern might have started.
- Partial Sequences: Draw the part of the pattern you do remember.
- Smart Generation: Respects Android's complex pattern rules (e.g., intermediate dots).
- Custom Lengths: Support for standard (4, 6, 8) and custom lengths (up to 12).
- Known Positions: Lock in specific digits if you know their exact placement.
- Excluded Numbers: Quickly eliminate numbers you never use.
- Must Include: Mandate specific digits that exist somewhere in the PIN.
- Granular Character Sets: Toggle lowercase, uppercase, numbers, and symbols.
- Exact Counts (Advanced): Specify if you know there are exactly 2 numbers or 1 capital letter.
- Known Positions: Lock in specific characters.
- Excluded/Included Characters: Remove confusing characters (like 'O' and '0') or mandate specific ones.
- Frontend Framework: React 19 (Vite)
- Language: TypeScript
- Styling: Tailwind CSS v4 (with Dark Mode support)
- Icons: Lucide React
- Logic: Custom Depth-First Search (DFS) algorithms for combinatorial generation.
To run Fragment locally on your machine:
-
Clone the repository:
git clone https://github.com/sagnikonly/Recallkey.git cd fragment-recovery -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser: Navigate to
http://localhost:3000(or the port provided by Vite).
Fragment uses Depth-First Search (DFS) algorithms to traverse the massive mathematical space of possible combinations.
To prevent browser crashes from astronomical permutations (a 12-character password has trillions of combinations), the app calculates the theoretical total to show you the math, but safely caps the actual UI generation to 10,000 results and implements a 2.5-second timeout failsafe.
Contributions are welcome! If you have ideas for new constraints, better algorithms, or UI improvements:
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Built with ❤️ to save your data from the factory reset button.
