diff --git a/fw_updater_packer_unpacker/unofficial_pkg_repacker.sh b/fw_updater_packer_unpacker/unofficial_pkg_repacker.sh index 4c16cfd..8c9e218 100755 --- a/fw_updater_packer_unpacker/unofficial_pkg_repacker.sh +++ b/fw_updater_packer_unpacker/unofficial_pkg_repacker.sh @@ -35,7 +35,7 @@ # params INDIR=$1 # input folder TMPDIR=$INDIR -PKGFILE=$1/repacked.pkg # output pkg file +PKGFILE=$1/FwUpdater.pkg # output pkg file SHA256KEY="./key.pub" SIGKEY="./key.private" # we use data encryption key (ignored anyway) DATAKEY_D="./key.private" @@ -101,3 +101,7 @@ printf "%.8x" $((OFFSET_DATA)) | sed -E 's/(..)(..)(..)(..)/\4\3\2\1/' | xxd -r echo "* add file header" printf "DPUP" | cat - $TMPDIR/tmp.step5 > $PKGFILE + +# remove tmp files +rm $TMPDIR/tmp.step* +rm $INDIR/repacked_pkg.tar.gz diff --git a/python_api/assets/start_eufwupdater.sh b/python_api/assets/start_eufwupdater.sh index 0440f0b..d848c0f 100644 --- a/python_api/assets/start_eufwupdater.sh +++ b/python_api/assets/start_eufwupdater.sh @@ -101,7 +101,7 @@ dd if=$1 of=$IV bs=1 skip=${IV_OFFSET} count=32 2>/dev/null ######################################## # decrypt data and extract directory tree ######################################## -dd if=$1 bs=$(($DATA_OFFSET)) skip=1 2>/dev/null | head -c $(($BODY_SIZE)) | openssl enc -d -aes-256-cbc -K "cat ${AES256_KEY}" -iv "cat ${IV}" | tar -xz -C $2 +dd if=$1 bs=$(($DATA_OFFSET)) skip=1 2>/dev/null | head -c $(($BODY_SIZE)) | openssl enc -d -aes-256-cbc -K `cat ${AES256_KEY}` -iv `cat ${IV}` | tar -xz -C $2 ########################################