#!/bin/sh
# Unpack a Razer Forge TV boot.img file so we can modify default.prop
set -e

bootimgfile=${1:-boot.img}
outdir=${2:-mybootimg}

if [ -d "$outdir" ]; then
    rm -rf "$outdir"
fi

echo "Unpacking $bootimgfile into $outdir"
mkdir "$outdir"
cd "$outdir"
abootimg -x "../$bootimgfile"

echo "Unpacking initrd.img into ramdisk/"
abootimg-unpack-initrd initrd.img ramdisk
