I've mistakenly deleted my apk keystore (jks) and google can't help me, What to do?
1 Answers
Make sure you're on Ubuntu || mint or similar based Linux distro.
Step 1: Download TestDisk & PhotoRec 7.1-WIP, Data Recovery from here (only 7.1 supports jks recovery)
Step 2: Now run photorec on the partition from where the data was lost. It will take a lot of time so sit back and wait (for me, it took 10 hours). If you're not sure how to do this, just ask for help in the comment.
NOTE The data it will recover will be huge in size may be above 50GB so don't worry just wait for it to finish recovering
Step 4: After completion of recovery and if any keystore file has been recovered else sorry mate the file which has been recovered may contain some other files with it and lot of spaces also that's why it is huge in size, your key is within this file, Download any hex editor I used bless hex editor.
Step 5: When you'll open your file in a hex editor just search for the name of your key alias in the editor (usually it is on the top so you don't have to go through any pain) you'll catch it in one glimpse and will say "hurrraaayyyy" in loud voice.
NOTE If you have recovered multiple files then just find the right one, one by one in which your key alias lies.
Step 6: Just copy the part of the key from start to the end (excluding the spaces but be careful in copying don't miss any part of the key you can copy spaces it won't do any harm) and open a new file in hex editor and paste it there and save it (congrats that's your key).