-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ability to extract blobs from unzipped ROM
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
1 parent
ba95d88
commit f0bb37f
Showing
1 changed file
with
28 additions
and
1 deletion.
There are no files selected for viewing
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,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 |