Last active
January 19, 2016 02:13
-
-
Save JasonRaveling/db473693fd6fee2f65d0 to your computer and use it in GitHub Desktop.
Decrypt TWRP Recovery on Encrypted Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// past this into a file name Pattern.java | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.SecureRandom; | |
public class Pattern { | |
public static void main(String... args) { | |
int[] pattern = {DOT_NUMBERS_HERE}; | |
byte[] res = new byte[pattern.length]; | |
for( int i = 0; i < pattern.length; i++ ) { | |
res[i] = (byte) (pattern[i]); | |
} | |
StringBuffer hexString = new StringBuffer(); | |
for (int i = 0; i < res.length; i++) { | |
if ((0xff & res[i]) < 0x10) { | |
hexString.append("0" + Integer.toHexString((0xFF & res[i]))); | |
} else { | |
hexString.append(Integer.toHexString(0xFF & res[i])); | |
} | |
} | |
System.out.print("unlock code: "); | |
System.out.println(hexString); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment