Created
September 25, 2016 10:25
-
-
Save karubabu/f5103f3078770bf8390a57b75584ee9b to your computer and use it in GitHub Desktop.
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 | |
VENDOR=lge | |
DEVICE=hammerhead | |
echo "Please wait..." | |
wget -nc -q https://dl.google.com/dl/android/aosp/hammerhead-mob31e-factory-90504514.zip | |
unzip hammerhead-mob31e-factory-90504514.zip | |
cd hammerhead-mob31e | |
unzip image-hammerhead-mob31e.zip | |
cd ../ | |
simg2img hammerhead-mob31e/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-mob31e | |
rm system.ext4.img |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment