Created
September 23, 2019 15:29
-
-
Save fkirc/371fc25c0fd255125a4bb6f9f8a4ab3b to your computer and use it in GitHub Desktop.
Unzip an Android Archive (AAR)
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
#!/usr/bin/env bash | |
set -xe # Log everything, abort if anything fails | |
# Simple script to unzip Android Archive libraries (AAR files) | |
usage() { | |
echo "Usage: $0 <aar file>" | |
exit 1 | |
} | |
[[ $# -eq 1 ]] || { | |
usage | |
} | |
AAR_FILE=$1 | |
EXTRACT_DIR=exaar | |
rm -rf $EXTRACT_DIR | |
mkdir $EXTRACT_DIR || true | |
unzip -v $AAR_FILE | |
unzip $AAR_FILE -d $EXTRACT_DIR | |
unzip -v $EXTRACT_DIR/classes.jar | |
unzip $EXTRACT_DIR/classes.jar -d $EXTRACT_DIR/extracted_classes.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I update this script with output jar file name, and automatic create jar file folder