-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
153 additions
and
221 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,58 @@ | ||
#!/bin/bash | ||
|
||
VENDOR=amazon | ||
DEVICE=tank | ||
export VENDOR=amazon | ||
export DEVICE_VENDOR=amazon | ||
export DEVICE=tank | ||
|
||
# Check to see if the user passed a folder in to extract from rather than adb pull | ||
if [ $# -eq 1 ]; then | ||
COPY_FROM=$1 | ||
test ! -d "$COPY_FROM" && echo error reading dir "$COPY_FROM" && exit 1 | ||
fi | ||
|
||
test -z "$DEVICE" && echo device not set && exit 2 | ||
test -z "$VENDOR" && echo vendor not set && exit 2 | ||
test -z "$VENDORDEVICEDIR" && VENDORDEVICEDIR=$DEVICE | ||
export VENDORDEVICEDIR | ||
set -e | ||
|
||
BASE=../../../vendor/$VENDOR/$VENDORDEVICEDIR/proprietary | ||
rm -rf $BASE/* | ||
|
||
for FILE in `egrep -v '(^#|^$)' ../$DEVICE/proprietary-files.txt`; do | ||
echo "Extracting /system/$FILE ..." | ||
OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS | ||
FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"` | ||
DEST=${PARSING_ARRAY[1]} | ||
if [ -z $DEST ] | ||
then | ||
DEST=$FILE | ||
fi | ||
DIR=`dirname $FILE` | ||
if [ ! -d $BASE/$DIR ]; then | ||
mkdir -p $BASE/$DIR | ||
fi | ||
if [ "$COPY_FROM" = "" ]; then | ||
adb pull /system/$FILE $BASE/$DEST | ||
# if file dot not exist try destination | ||
if [ "$?" != "0" ] | ||
then | ||
adb pull /system/$DEST $BASE/$DEST | ||
function extract() { | ||
for FILE in `egrep -v '(^#|^$)' $1`; do | ||
echo "Extracting /system/$FILE ..." | ||
OLDIFS=$IFS IFS=":" PARSING_ARRAY=($FILE) IFS=$OLDIFS | ||
FILE=`echo ${PARSING_ARRAY[0]} | sed -e "s/^-//g"` | ||
DEST=${PARSING_ARRAY[1]} | ||
if [ -z $DEST ]; then | ||
DEST=$FILE | ||
fi | ||
DIR=`dirname $FILE` | ||
if [ ! -d $2/$DIR ]; then | ||
mkdir -p $2/$DIR | ||
fi | ||
else | ||
cp $COPY_FROM/$FILE $BASE/$DEST | ||
# if file does not exist try destination | ||
if [ "$?" != "0" ] | ||
then | ||
cp $COPY_FROM/$DEST $BASE/$DEST | ||
if [ "$COPY_FROM" = "" ]; then | ||
# Try destination target first | ||
if [ -f /system/$DEST ]; then | ||
adb pull /system/$DEST $2/$DEST | ||
else | ||
# if file does not exist try OEM target | ||
if [ "$?" != "0" ]; then | ||
adb pull /system/$FILE $2/$DEST | ||
fi | ||
fi | ||
else | ||
# Try destination target first | ||
if [ -f $COPY_FROM/$DEST ]; then | ||
cp $COPY_FROM/$DEST $2/$DEST | ||
else | ||
# if file does not exist try OEM target | ||
if [ "$?" != "0" ]; then | ||
cp $COPY_FROM/$FILE $2/$DEST | ||
fi | ||
fi | ||
fi | ||
fi | ||
done | ||
done | ||
} | ||
|
||
DEVICE_BASE=../../../vendor/$VENDOR/$DEVICE/proprietary | ||
rm -rf $DEVICE_BASE/* | ||
|
||
# Extract the device specific files | ||
extract ../../$DEVICE_VENDOR/$DEVICE/proprietary-files.txt $DEVICE_BASE | ||
|
||
./setup-makefiles.sh |
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
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
Oops, something went wrong.