Skip to content

Commit

Permalink
extractor: update "Image zip" code
Browse files Browse the repository at this point in the history
* with previous code, extraction of some zte Image zip firmware
   were getting failed due to weird sub-dir names. so lets do this

Signed-off-by: ShivamKumarJha <[email protected]>
  • Loading branch information
ShivamKumarJha authored and erfanoabdi committed Jan 21, 2020
1 parent 9e3d23c commit eb88030
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions extractor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,12 @@ elif [[ $(7z l -ba $romzip | grep payload.bin) ]]; then
exit
elif [[ $(7z l -ba $romzip | grep "image.*.zip\|update.zip") ]]; then
echo "Image zip firmware detected"
thezip=$(7z l -ba $romzip | grep "image.*.zip\|update.zip" | gawk '{ print $NF }')
7z e -y $romzip $thezip 2>/dev/null >> $tmpdir/zip.log
thezipfile=$(echo $thezip | sed 's|.*/||')
mv $thezipfile temp.zip
"$LOCALDIR/extractor.sh" temp.zip "$outdir"
mkdir -p $tmpdir/zipfiles
7z e -y $romzip -o$tmpdir/zipfiles 2>/dev/null >> $tmpdir/zip.log
zip_list=`find $tmpdir/zipfiles -type f -name "*.zip" -printf '%P\n' | sort`
for file in $zip_list; do
"$LOCALDIR/extractor.sh" $tmpdir/zipfiles/$file "$outdir"
done
exit
elif [[ $(7z l -ba $romzip | grep "UPDATE.APP") ]]; then
echo "Huawei UPDATE.APP detected"
Expand Down

0 comments on commit eb88030

Please sign in to comment.