Skip to content

Commit

Permalink
add ability to extract blobs from unzipped ROM
Browse files Browse the repository at this point in the history
With no arguments, this script still uses adb pull to extract
blobs.  But if you specifiy the root of an unzipped ROM, the
script will pull blobs from the file.

Handy if you don't have your device available or in a good state.
  • Loading branch information
dferg authored and mikeyman77 committed Apr 13, 2012
1 parent ba95d88 commit f0bb37f
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion extract-files.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
#!/bin/sh

<<<<<<< HEAD
BASE=../../../vendor/samsung/hercules/proprietary
=======
set -e

if [ $# -eq 0 ]; then
SRC=adb
else
if [ $# -eq 1 ]; then
SRC=$1
else
echo "$0: bad number of arguments"
echo ""
echo "usage: $0 [PATH_TO_EXPANDED_ROM]"
echo ""
echo "If PATH_TO_EXPANDED_ROM is not specified, blobs will be extracted from"
echo "the device using adb pull."
exit 1
fi
fi

BASE=../../../vendor/samsung/hercules/proprietary
>>>>>>> f90cec0... add ability to extract blobs from unzipped ROM
rm -rf $BASE/*

for FILE in `egrep -v '(^#|^$)' proprietary-files.txt`; do
echo "Extracting /system/$FILE ..."
DIR=`dirname $FILE`
if [ ! -d $BASE/$DIR ]; then
mkdir -p $BASE/$DIR
fi
adb pull /system/$FILE $BASE/$FILE
if [ "$SRC" = "adb" ]; then
adb pull /system/$FILE $BASE/$FILE
else
cp $SRC/system/$FILE $BASE/$FILE
fi
done

./setup-makefiles.sh

0 comments on commit f0bb37f

Please sign in to comment.