Created
April 30, 2015 09:15
-
-
Save stefan-girlich/3cc6ad46ec2d00ad2b92 to your computer and use it in GitHub Desktop.
Grabs an ProGuard-obfuscated Android stack trace from the OSX pasteboard, deobfuscates it using the given mapping.txt and writes the result back to the pasteboard.
This file contains hidden or 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
#!/bin/bash | |
# Grabs an ProGuard-obfuscated Android stack trace from the OSX pasteboard, deobfuscates it using the given mapping.txt and writes the result back to the pasteboard. | |
RETRACE_BIN="retrace.sh" | |
MAPPING_FILE=$1 | |
TMP_FILE="/tmp/"$(basename $0)"_tmp_outfile.txt" | |
if [ -z "$MAPPING_FILE" ]; then | |
echo "Mapping file is not given." | |
exit 1 | |
fi | |
pbpaste > $TMP_FILE | |
if [ $? -ne 0 ]; then | |
echo "Could not write to temporary file $TMP_FILE ." | |
exit 2 | |
fi | |
$RETRACE_BIN $MAPPING_FILE $TMP_FILE | pbcopy | |
rm $TMP_FILE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment