diff --git a/bootanimation/Android.mk b/bootanimation/Android.mk deleted file mode 100644 index 97948f38..00000000 --- a/bootanimation/Android.mk +++ /dev/null @@ -1,63 +0,0 @@ -# -# 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. -# - -TARGET_GENERATED_BOOTANIMATION := $(TARGET_OUT_INTERMEDIATES)/BOOTANIMATION/bootanimation.zip -$(TARGET_GENERATED_BOOTANIMATION): INTERMEDIATES := $(call intermediates-dir-for,BOOTANIMATION,bootanimation) -$(TARGET_GENERATED_BOOTANIMATION): $(SOONG_ZIP) - @echo "Building bootanimation.zip" - @rm -rf $(dir $@) - @mkdir -p $(INTERMEDIATES) - $(hide) tar xfp vendor/lineage/bootanimation/bootanimation.tar -C $(INTERMEDIATES) - $(hide) if [ $(TARGET_SCREEN_HEIGHT) -lt $(TARGET_SCREEN_WIDTH) ]; then \ - IMAGEWIDTH=$(TARGET_SCREEN_HEIGHT); \ - else \ - IMAGEWIDTH=$(TARGET_SCREEN_WIDTH); \ - fi; \ - IMAGESCALEWIDTH=$$IMAGEWIDTH; \ - IMAGESCALEHEIGHT=$$(expr $$IMAGESCALEWIDTH / 3); \ - if [ "$(TARGET_BOOTANIMATION_HALF_RES)" = "true" ]; then \ - IMAGEWIDTH="$$(expr "$$IMAGEWIDTH" / 2)"; \ - fi; \ - IMAGEHEIGHT=$$(expr $$IMAGEWIDTH / 3); \ - RESOLUTION="$$IMAGEWIDTH"x"$$IMAGEHEIGHT"; \ - prebuilts/tools-lineage/${HOST_OS}-x86/bin/mogrify -resize $$RESOLUTION -colors 256 $(INTERMEDIATES)/*/*.png; \ - echo "$$IMAGESCALEWIDTH $$IMAGESCALEHEIGHT 60" > $(INTERMEDIATES)/desc.txt; \ - cat vendor/lineage/bootanimation/desc.txt >> $(INTERMEDIATES)/desc.txt - $(hide) $(SOONG_ZIP) -L 0 -o $@ -C $(INTERMEDIATES) -D $(INTERMEDIATES) - -ifeq ($(TARGET_BOOTANIMATION),) - TARGET_BOOTANIMATION := $(TARGET_GENERATED_BOOTANIMATION) -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 deleted file mode 100644 index a32a8837..00000000 --- a/bootanimation/CleanSpec.mk +++ /dev/null @@ -1,17 +0,0 @@ -# -# 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 14d56062..00000000 Binary files a/bootanimation/bootanimation.tar and /dev/null differ diff --git a/bootanimation/bootanimation.zip b/bootanimation/bootanimation.zip new file mode 100644 index 00000000..aace220f Binary files /dev/null and b/bootanimation/bootanimation.zip differ diff --git a/bootanimation/desc.txt b/bootanimation/desc.txt deleted file mode 100644 index 4aecc8ed..00000000 --- a/bootanimation/desc.txt +++ /dev/null @@ -1,3 +0,0 @@ -c 1 0 part0 -c 0 0 part1 -c 1 0 part2 diff --git a/config/bootanimation.mk b/config/bootanimation.mk new file mode 100644 index 00000000..125086be --- /dev/null +++ b/config/bootanimation.mk @@ -0,0 +1,2 @@ +# Bootanimation + PRODUCT_COPY_FILES += vendor/lineage/bootanimation/bootanimation.zip:$(TARGET_COPY_OUT_PRODUCT)/media/bootanimation.zip diff --git a/config/common.mk b/config/common.mk index c058feb0..78a67a78 100644 --- a/config/common.mk +++ b/config/common.mk @@ -135,14 +135,12 @@ $(call enforce-product-packages-exist-internal,$(lastword $(_include_stack)),pro endif # Bootanimation -TARGET_INCLUDE_BOOT_ANIMATIONS ?= true -ifeq ($(TARGET_INCLUDE_BOOT_ANIMATIONS),true) include vendor/lineage/bootanimation/prebuilts/prebuilts.mk -endif -TARGET_SCREEN_WIDTH ?= 1080 -TARGET_SCREEN_HEIGHT ?= 1920 -PRODUCT_PACKAGES += \ - bootanimation.zip +include vendor/lineage/config/bootanimation.mk + +# Bootanim +PRODUCT_COPY_FILES += \ + vendor/lineage/prebuilt/common/etc/init/init.bootanim.rc:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/init/init.bootanim.rc # Build Manifest PRODUCT_PACKAGES += \ diff --git a/prebuilt/common/etc/init/init.bootanim.rc b/prebuilt/common/etc/init/init.bootanim.rc new file mode 100644 index 00000000..a37a944e --- /dev/null +++ b/prebuilt/common/etc/init/init.bootanim.rc @@ -0,0 +1,5 @@ +# Bootanim +on post-fs-data + mkdir /data/misc/bootanim 0777 + chown system system /data/misc/bootanim + chmod 644 /data/misc/bootanim/bootanimation.zip