Skip to content

Commit

Permalink
extractor: accept *.zip instead for Image zip firmware detection
Browse files Browse the repository at this point in the history
* some walton firmware are stored in different zip name
 * so accept all zip. this is last if else block anyways

Signed-off-by: ShivamKumarJha <[email protected]>
  • Loading branch information
ShivamKumarJha authored and erfanoabdi committed Jan 21, 2020
1 parent eb88030 commit a19a2c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extractor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ if [[ $MAGIC == "OPPOENCRYPT!" ]] || [[ "$romzipext" == "ozip" ]]; then
exit
fi

if [[ ! $(7z l -ba $romzip | grep ".*system.ext4.tar.*\|.*.tar\|.*chunk\|system\/build.prop\|system.new.dat\|system_new.img\|system.img\|payload.bin\|image.*.zip\|update.zip\|.*rawprogram*\|system.sin\|system-p\|super\|UPDATE.APP\|.*.pac" | grep -v ".*chunk.*\.so$") ]]; then
if [[ ! $(7z l -ba $romzip | grep ".*system.ext4.tar.*\|.*.tar\|.*chunk\|system\/build.prop\|system.new.dat\|system_new.img\|system.img\|payload.bin\|.*.zip\|.*rawprogram*\|system.sin\|system-p\|super\|UPDATE.APP\|.*.pac" | grep -v ".*chunk.*\.so$") ]]; then
echo "BRUH: This type of firmwares not supported"
cd "$LOCALDIR"
rm -rf "$tmpdir" "$outdir"
Expand Down Expand Up @@ -275,7 +275,7 @@ elif [[ $(7z l -ba $romzip | grep payload.bin) ]]; then
rm payload.bin
rm -rf "$tmpdir"
exit
elif [[ $(7z l -ba $romzip | grep "image.*.zip\|update.zip") ]]; then
elif [[ $(7z l -ba $romzip | grep ".*.zip") ]]; then
echo "Image zip firmware detected"
mkdir -p $tmpdir/zipfiles
7z e -y $romzip -o$tmpdir/zipfiles 2>/dev/null >> $tmpdir/zip.log
Expand Down

0 comments on commit a19a2c7

Please sign in to comment.