aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormosimchah <mosimchah@gmail.com>2025-12-06 07:13:41 -0500
committermosimchah <mosimchah@gmail.com>2025-12-06 07:22:05 -0500
commit7d7fa78bdf35d8e841e7bd6848f6369f96f47bfb (patch)
treef617101572e2c05325a62c638daf197512553ce1
parent57cab2fce3a91aeec377df56d8c23a95497b36d2 (diff)
aicp: add our bootanimation from w16.0_pre-rebase_12-3-25
https://github.com/AICP/vendor_aicp/tree/w16.0_pre-rebase-12-3-25 commit 0f4ae5cea00cf2768ca21d3cc87acda64a02f552 Author: Chirayu Desai <chirayudesai1@gmail.com> Date: Wed Nov 10 20:52:20 2021 +0530 Move bootanimation to product Co-authored-by: Michael Bestas <mkbestas@gmail.com> Change-Id: I9972653845c64aab944d0289d9357361e2feb344 commit c819641cbe6ab2dcc8de633137c6adbec30f61dd Author: Michele Bono <bono.michele94@gmail.com> Date: Sun Aug 2 20:55:04 2020 +0530 vendor_aicp: add random bootanimation Adapt to android 10 Change-Id: Id23cf6e7f34bac667e4be3906cc6e455c0dc2dad commit c5970bbda0c31c072b00922062cd09df150ed95e Author: George Zacharia <george.zcharia@gmail.com> Date: Sun Aug 2 12:42:46 2020 +0530 vendor_aicp: Fix zipping up bootanimation Specifying the directory caused the zero size zip file also to get included in the final bootanimation zip. Fix this by passing the list of files to be zipped up using the file list parameter. Test: run `make bootanimation.zip` Manually check if a bootanimation.zip is not present inside the bootanimation zip Change-Id: I04fb49cbab00f9e43b4706fb350b76c8353a3ac6 commit 4a740fc229a369a261d28ef93325b3f6a8727a29 Author: George Zacharia <george.zcharia@gmail.com> Date: Sun Aug 2 20:59:22 2020 +0530 Revert "aicp: Use prebuilt ImageMagick for bootanim" This reverts commit b78ea0e934a73f37df5fe19d8b3b80165a764a87. Reason for revert: the prebuilt binary has its jpg support stripped, thus fails to modify the files Change-Id: Ibbf5cd67ec3ec5e3680cebe0074aebab34e4a474 commit 893021885f7624c8ba557de2e37f18d6d0af80e7 Author: Michele Bono <bono.michele94@gmail.com> Date: Mon Nov 4 13:10:38 2019 +0100 vendor: fix bootanimation Change-Id: Ib038dae6174ebea0da7d9d0fabbd6a46fc421cc4 commit b78ea0e934a73f37df5fe19d8b3b80165a764a87 Author: Rashed Abdel-Tawab <rashed@linux.com> Date: Sun Sep 8 15:30:19 2019 -0700 aicp: Use prebuilt ImageMagick for bootanim Change-Id: I49301cf09f79d617868ac3d445d243020b587c9d commit 02c91dca301af776b786859c9b74c92b706c2ff1 Author: Luca Stefani <luca.stefani.ge1@gmail.com> Date: Sun Sep 8 22:02:37 2019 +0200 aicp: Rework bootanimation generation Change-Id: Ib0b363c3e0545cb0c86dc69dd1a75f82dd777e59 commit e90090c72444c61d6b8acd9de5f0c52a37e49648 Author: doc HD <doc.divxm@gmail.com> Date: Wed Apr 3 14:28:52 2019 +0000 Revert "vendor: Update bootanimation" This reverts commit db14dec32e52b7c964e8e3609f6b5c19e963a408. Change-Id: Ic0e4439877c9bc95f6ba8ddd3be02ffb9ac54b06 commit db14dec32e52b7c964e8e3609f6b5c19e963a408 Author: GreekDragon <alextsanisbadlorg@gmail.com> Date: Sun Mar 31 13:28:34 2019 -0700 vendor: Update bootanimation Change-Id: Ie5df5734881536f388006d1ce322d0eefe883cf7 commit 46a1f6e5cbece39712844dae22841b0aa27e9760 Author: Michele Bono <bono.michele94@gmail.com> Date: Wed Oct 3 11:34:05 2018 +0200 vendor_aicp: add random bootanimation Change-Id: I76fce620196f8e20cb9d318234f32a97af7094fa
-rw-r--r--bootanimation/Android.bp61
-rw-r--r--bootanimation/Android.mk85
-rw-r--r--bootanimation/CleanSpec.mk17
-rw-r--r--bootanimation/bootanimation.tarbin6430720 -> 0 bytes
-rw-r--r--bootanimation/bootanimation0.tarbin0 -> 17268224 bytes
-rw-r--r--bootanimation/bootanimation1.tarbin0 -> 21226496 bytes
-rw-r--r--bootanimation/bootanimation2.tarbin0 -> 10556928 bytes
-rw-r--r--bootanimation/bootanimation3.tarbin0 -> 29313536 bytes
-rw-r--r--bootanimation/desc.txt6
-rwxr-xr-xbootanimation/gen-bootanimation.sh56
10 files changed, 105 insertions, 120 deletions
diff --git a/bootanimation/Android.bp b/bootanimation/Android.bp
deleted file mode 100644
index bcd8e3fa1..000000000
--- a/bootanimation/Android.bp
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// SPDX-FileCopyrightText: The LineageOS Project
-// SPDX-License-Identifier: Apache-2.0
-//
-
-genrule {
- name: "gen-bootanimation.zip",
- tools: [
- "mogrify",
- "soong_zip",
- ],
- tool_files: [
- "bootanimation.tar",
- "desc.txt",
- "gen-bootanimation.sh",
- ],
- out: ["bootanimation.zip"],
-
- cmd: select((soong_config_variable("lineage_bootanimation", "height"),
- soong_config_variable("lineage_bootanimation", "width"),
- soong_config_variable("lineage_bootanimation", "half_res"),
- soong_config_variable("lineage_bootanimation", "prebuilt_file")), {
- (any @ height, any @ width, any @ half_res, any @ prebuilt_file):
- "cp ../../../../../" + prebuilt_file + " $(out)",
- (any @ height, any @ width, any @ half_res, default):
- "$(location gen-bootanimation.sh)" +
- " $(out)" +
- " $(genDir)" +
- " $(location bootanimation.tar)" +
- " $(location desc.txt)" +
- " $(location mogrify)" +
- " $(location soong_zip)" +
- " " + height +
- " " + width +
- " " + half_res,
- (default, default, default, default):
- "$(location gen-bootanimation.sh)" +
- " $(out)" +
- " $(genDir)" +
- " $(location bootanimation.tar)" +
- " $(location desc.txt)" +
- " $(location mogrify)" +
- " $(location soong_zip)" +
- " 600" +
- " 600" +
- " false",
- }),
-}
-
-prebuilt_media {
- name: "bootanimation.zip",
- src: ":gen-bootanimation.zip",
- product_specific: true,
-}
-
-install_symlink {
- name: "bootanimation-dark.zip",
- product_specific: true,
- installed_location: "media/bootanimation-dark.zip",
- symlink_target: "bootanimation.zip",
-}
diff --git a/bootanimation/Android.mk b/bootanimation/Android.mk
new file mode 100644
index 000000000..a5ae35934
--- /dev/null
+++ b/bootanimation/Android.mk
@@ -0,0 +1,85 @@
+#
+# Copyright (C) 2016 The CyanogenMod Project
+# 2017-2019 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+ifeq ($(TARGET_SCREEN_WIDTH),)
+ $(warning TARGET_SCREEN_WIDTH is not set, using default value: 1080)
+ TARGET_SCREEN_WIDTH := 1080
+endif
+ifeq ($(TARGET_SCREEN_HEIGHT),)
+ $(warning TARGET_SCREEN_HEIGHT is not set, using default value: 1080)
+ TARGET_SCREEN_HEIGHT := 1080
+endif
+
+TARGET_GENERATED_BOOTANIMATION := $(TARGET_OUT_INTERMEDIATES)/BOOTANIMATION/bootanimation.zip
+$(TARGET_GENERATED_BOOTANIMATION): INTERMEDIATES := $(TARGET_OUT_INTERMEDIATES)/BOOTANIMATION
+$(TARGET_GENERATED_BOOTANIMATION): $(SOONG_ZIP)
+ @echo "Building bootanimation.zip"
+ @rm -rf $(dir $@)
+ @mkdir -p $(dir $@)
+ $(hide) tar xfp vendor/aicp/bootanimation/bootanimation$(shell shuf -i 0-3 -n 1).tar -C $(INTERMEDIATES)
+ $(hide) if [ $(TARGET_SCREEN_HEIGHT) -lt $(TARGET_SCREEN_WIDTH) ]; then \
+ SIZE=$(TARGET_SCREEN_HEIGHT); \
+ else \
+ SIZE=$(TARGET_SCREEN_WIDTH); \
+ fi; \
+ if [ "$(TARGET_BOOTANIMATION_HALF_RES)" = "true" ]; then \
+ IMAGESIZE="$$(expr "$$SIZE" / 2)"; \
+ else \
+ IMAGESIZE=$$SIZE; \
+ fi; \
+ RESOLUTION="$$IMAGESIZE"x"$$IMAGESIZE"; \
+ for part_cnt in 1 2 3; do \
+ mkdir -p $(INTERMEDIATES)/part$$part_cnt; \
+ done; \
+ mogrify -resize $$RESOLUTION -colors 250 $(INTERMEDIATES)/*/*.jpg; \
+ echo "$$SIZE $$SIZE 30" > $(INTERMEDIATES)/desc.txt; \
+ cat vendor/aicp/bootanimation/desc.txt >> $(INTERMEDIATES)/desc.txt
+ $(hide) find $(INTERMEDIATES)/ -type f \( -name "*.jpg" -or -name "*.txt" \) | sort >$@.list
+ $(hide) $(SOONG_ZIP) -L 0 -o $(TARGET_GENERATED_BOOTANIMATION) -C $(INTERMEDIATES) -l $@.list
+
+ifeq ($(TARGET_BOOTANIMATION),)
+ TARGET_BOOTANIMATION := $(TARGET_GENERATED_BOOTANIMATION)
+ ifeq ($(shell command -v mogrify),)
+ $(info **********************************************)
+ $(info The boot animation could not be generated as)
+ $(info ImageMagick is not installed in your system.)
+ $(info $(space))
+ $(info Please install ImageMagick from this website:)
+ $(info https://imagemagick.org/script/binary-releases.php)
+ $(info **********************************************)
+ $(error stop)
+ endif
+endif
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := bootanimation.zip
+LOCAL_MODULE_CLASS := ETC
+LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/media
+
+include $(BUILD_SYSTEM)/base_rules.mk
+
+$(LOCAL_BUILT_MODULE): $(TARGET_BOOTANIMATION)
+ @cp $(TARGET_BOOTANIMATION) $@
+
+include $(CLEAR_VARS)
+
+BOOTANIMATION_SYMLINK := $(TARGET_OUT_PRODUCT)/media/bootanimation-dark.zip
+$(BOOTANIMATION_SYMLINK): $(LOCAL_INSTALLED_MODULE)
+ @mkdir -p $(dir $@)
+ $(hide) ln -sf bootanimation.zip $@
+
+ALL_DEFAULT_INSTALLED_MODULES += $(BOOTANIMATION_SYMLINK)
diff --git a/bootanimation/CleanSpec.mk b/bootanimation/CleanSpec.mk
new file mode 100644
index 000000000..a32a8837e
--- /dev/null
+++ b/bootanimation/CleanSpec.mk
@@ -0,0 +1,17 @@
+#
+# Copyright (C) 2017 The LineageOS Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/BOOTANIMATION)
diff --git a/bootanimation/bootanimation.tar b/bootanimation/bootanimation.tar
deleted file mode 100644
index 14d560621..000000000
--- a/bootanimation/bootanimation.tar
+++ /dev/null
Binary files differ
diff --git a/bootanimation/bootanimation0.tar b/bootanimation/bootanimation0.tar
new file mode 100644
index 000000000..dc5e3c62e
--- /dev/null
+++ b/bootanimation/bootanimation0.tar
Binary files differ
diff --git a/bootanimation/bootanimation1.tar b/bootanimation/bootanimation1.tar
new file mode 100644
index 000000000..aa2393e28
--- /dev/null
+++ b/bootanimation/bootanimation1.tar
Binary files differ
diff --git a/bootanimation/bootanimation2.tar b/bootanimation/bootanimation2.tar
new file mode 100644
index 000000000..9a144ff86
--- /dev/null
+++ b/bootanimation/bootanimation2.tar
Binary files differ
diff --git a/bootanimation/bootanimation3.tar b/bootanimation/bootanimation3.tar
new file mode 100644
index 000000000..4eb1827ad
--- /dev/null
+++ b/bootanimation/bootanimation3.tar
Binary files differ
diff --git a/bootanimation/desc.txt b/bootanimation/desc.txt
index 4aecc8ed1..56a4838bd 100644
--- a/bootanimation/desc.txt
+++ b/bootanimation/desc.txt
@@ -1,3 +1,3 @@
-c 1 0 part0
-c 0 0 part1
-c 1 0 part2
+c 1 0 part1
+c 0 0 part2
+c 1 0 part3
diff --git a/bootanimation/gen-bootanimation.sh b/bootanimation/gen-bootanimation.sh
deleted file mode 100755
index 8c2ba50e2..000000000
--- a/bootanimation/gen-bootanimation.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash -e
-#
-# Copyright (C) 2016 The CyanogenMod Project
-# 2017-2024 The LineageOS Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-PARAM_OUT=$1
-PARAM_GENDIR=$2
-PARAM_BOOTANIMATION_TAR=$3
-PARAM_DESC_TXT=$4
-PARAM_MOGRIFY=$5
-PARAM_SOONG_ZIP=$6
-PARAM_TARGET_SCREEN_HEIGHT=$7
-PARAM_TARGET_SCREEN_WIDTH=$8
-PARAM_TARGET_BOOTANIMATION_HALF_RES=$9
-
-INTERMEDIATES=$PARAM_GENDIR/intermediates
-
-mkdir -p $INTERMEDIATES
-
-tar xfp $PARAM_BOOTANIMATION_TAR -C $INTERMEDIATES
-
-if [ $PARAM_TARGET_SCREEN_HEIGHT -lt $PARAM_TARGET_SCREEN_WIDTH ]; then
- IMAGEWIDTH=$PARAM_TARGET_SCREEN_HEIGHT
-else
- IMAGEWIDTH=$PARAM_TARGET_SCREEN_WIDTH
-fi
-
-IMAGESCALEWIDTH=$IMAGEWIDTH
-IMAGESCALEHEIGHT=$(expr $IMAGESCALEWIDTH / 3);
-
-if [ "$PARAM_TARGET_BOOTANIMATION_HALF_RES" = "true" ]; then
- IMAGEWIDTH="$(expr "$IMAGEWIDTH" / 2)"
-fi
-
-IMAGEHEIGHT=$(expr $IMAGEWIDTH / 3);
-RESOLUTION="$IMAGEWIDTH"x"$IMAGEHEIGHT";
-
-$PARAM_MOGRIFY -resize $RESOLUTION -colors 256 $INTERMEDIATES/*/*.png;
-
-echo "$IMAGESCALEWIDTH $IMAGESCALEHEIGHT 60" > $INTERMEDIATES/desc.txt;
-cat $PARAM_DESC_TXT >> $INTERMEDIATES/desc.txt
-
-$PARAM_SOONG_ZIP -L 0 -o $PARAM_OUT -C $INTERMEDIATES -D $INTERMEDIATES