Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
6.0.1 (M4B30Z, Dec 2016)
#!/bin/sh
VENDOR=lge
DEVICE=hammerhead
echo "Please wait..."
wget -nc -q https://dl.google.com/dl/android/aosp/hammerhead-m4b30z-factory-625c027b.zip
unzip hammerhead-m4b30z-factory-625c027b.zip
cd hammerhead-m4b30z
unzip image-hammerhead-m4b30z.zip
cd ../
simg2img hammerhead-m4b30z/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-m4b30z
rm system.ext4.img
echo "All Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.