-
-
Save lindwurm/90fc353413ed78c00b32 to your computer and use it in GitHub Desktop.
6.0.1 (M4B30Z, Dec 2016)
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
#!/bin/sh | |
VENDOR=lge | |
DEVICE=hammerhead | |
echo "Please wait..." | |
wget -nc -q https://dl.google.com/dl/android/aosp/hammerhead-mmb29v-factory-62a68ee9.tgz | |
tar zxf hammerhead-mmb29v-factory-62a68ee9.tgz | |
cd hammerhead-mmb29v | |
unzip image-hammerhead-mmb29v.zip | |
cd ../ | |
simg2img hammerhead-mmb29v/system.img system.ext4.img | |
mkdir system | |
sudo mount -o loop -t ext4 system.ext4.img system | |
BASE=../../../vendor/$VENDOR/$DEVICE/proprietary | |
rm -rf $BASE/* | |
for FILE in `cat proprietary-blobs.txt | grep -v ^# | grep -v ^$ | sed -e 's#^/system/##g'| sed -e "s#^-/system/##g"`; do | |
DIR=`dirname $FILE` | |
if [ ! -d $BASE/$DIR ]; then | |
mkdir -p $BASE/$DIR | |
fi | |
echo "cp $FILE $BASE/$FILE" | |
cp system/$FILE $BASE/$FILE | |
done | |
sudo umount system | |
rm -rf system | |
rm -rf hammerhead-mmb29v | |
rm system.ext4.img |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment