Created
June 12, 2015 18:03
-
-
Save virifi/8ce2bbad81901a614ac8 to your computer and use it in GitHub Desktop.
auto_extract_nexus_binaries.sh
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/sh | |
| set -e | |
| SCRIPT_DIR=$(cd $(dirname "$0"); pwd) | |
| AOSP_ROOT="$SCRIPT_DIR/.." | |
| download_and_extract() { | |
| if [ $# -ne 1 ]; then | |
| echo "Invalid arguments." | |
| echo "download_and_extract <tar url>" | |
| return 1 | |
| fi | |
| url=$1 | |
| tar_name=${url##*/} | |
| cd "$AOSP_ROOT" | |
| curl -LO https://dl.google.com/dl/android/aosp/$tar_name | |
| extract_script_name=$(tar xzvf $tar_name) | |
| rm $tar_name | |
| yes "I ACCEPT" | ./$extract_script_name 2> /dev/null | |
| rm $extract_script_name | |
| cd - | |
| return 0 | |
| } | |
| cd "$AOSP_ROOT" | |
| # Binary url : https://developers.google.com/android/nexus/drivers#maguro | |
| download_and_extract https://dl.google.com/dl/android/aosp/broadcom-maguro-jdq39-8edbeae8.tgz | |
| download_and_extract https://dl.google.com/dl/android/aosp/imgtec-maguro-jdq39-bb3c4e4e.tgz | |
| download_and_extract https://dl.google.com/dl/android/aosp/invensense-maguro-jdq39-5eeb2d51.tgz | |
| download_and_extract https://dl.google.com/dl/android/aosp/nxp-maguro-jdq39-a20a2cd1.tgz | |
| download_and_extract https://dl.google.com/dl/android/aosp/samsung-maguro-jdq39-556fc2c7.tgz | |
| download_and_extract https://dl.google.com/dl/android/aosp/widevine-maguro-jdq39-62276b32.tgz | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment