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 | |
set -e | |
SUPPORTED_VNDK_VERSIONS="34" | |
FLASHABLE_PARTITIONS="product system system_ext" | |
SUPPORTED_PARTITIONS="$FLASHABLE_PARTITIONS vendor" | |
if [ $UID != 0 ]; then | |
echo "$0: Must be run as root" |
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 | |
set -e | |
function unsparse_if_needed() { | |
if [ "$(file -b $1 | cut -f1 -d ',')" = "Android sparse image" ]; then | |
echo "Unsparsing..." | |
simg2img "$1" "$1".raw | |
mv "$1".raw "$1" | |
fi | |
} |
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 | |
if [ -z "$1" ] || [ ! -f "$1" ]; then | |
echo "Usage: $0 <zip> <wipe y/n>" | |
exit 1 | |
fi | |
REQUIREMENTS="git g++ heimdall lz4 make unzip" | |
for REQUIREMENT in $REQUIREMENTS; do | |
[ -z "$(command -v $REQUIREMENT)" ] && echo "Error: Please install $REQUIREMENTS" && exit 1 |