Skip to content

Commit

Permalink
create ci flashable from devel-flashable
Browse files Browse the repository at this point in the history
  • Loading branch information
Kethen committed Aug 9, 2022
1 parent a387f8d commit c7f5590
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions make_flashable_zips/make_flashable_zips_from_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ for model in herolte hero2lte
do
rm -rf *

wget https://gitlab.com/ubports/porting/community-ports/android11/samsung-galaxy-s7/samsung-exynos8890/-/jobs/artifacts/main/raw/out/boot.img?job=flashable-${model} -O boot.img
wget https://gitlab.com/ubports/porting/community-ports/android11/samsung-galaxy-s7/samsung-exynos8890/-/jobs/artifacts/main/raw/out/recovery.img?job=flashable-${model} -O recovery.img
wget https://gitlab.com/ubports/porting/community-ports/android11/samsung-galaxy-s7/samsung-exynos8890/-/jobs/artifacts/main/raw/out/system.img?job=flashable-${model} -O system.simg
wget https://gitlab.com/ubports/porting/community-ports/android11/samsung-galaxy-s7/samsung-exynos8890/-/jobs/artifacts/main/raw/out/boot.img?job=devel-flashable-${model} -O boot.img
wget https://gitlab.com/ubports/porting/community-ports/android11/samsung-galaxy-s7/samsung-exynos8890/-/jobs/artifacts/main/raw/out/recovery.img?job=devel-flashable-${model} -O recovery.img
#wget https://gitlab.com/ubports/porting/community-ports/android11/samsung-galaxy-s7/samsung-exynos8890/-/jobs/artifacts/main/raw/out/system.img?job=devel-flashable-${model} -O system.simg
wget https://gitlab.com/ubports/porting/community-ports/android11/samsung-galaxy-s7/samsung-exynos8890/-/jobs/artifacts/main/raw/out/ubuntu.img?job=devel-flashable-${model} -O system.img

simg2img system.simg system.img
#simg2img system.simg system.img

mkdir -p META-INF/com/google/android
cp "$srcdir"/template/META-INF/com/google/android/* META-INF/com/google/android/
sed -i "/#!\/sbin\/sh/a MODEL=$model" META-INF/com/google/android/update-binary
zip -r -y -9 "$outputdir"/${model}-$(date +%Y-%m-%d).zip META-INF system.img boot.img
zip -r -y -9 "$outputdir"/${model}-$(date +%Y-%m-%d)-with-recovery.zip META-INF system.img boot.img recovery.img
date=$(date +%Y-%m-%d)
zip -r -y -9 "$outputdir"/${model}-${date}.zip META-INF system.img boot.img
cp "$outputdir"/${model}-${date}.zip "$outputdir"/${model}-${date}-with-recovery.zip
zip -r -y -9 "$outputdir"/${model}-${date}-with-recovery.zip recovery.img
done

cd ../
Expand Down

0 comments on commit c7f5590

Please sign in to comment.