diff --git a/README.mkdn b/README.mkdn deleted file mode 100644 index 524d15d6..00000000 --- a/README.mkdn +++ /dev/null @@ -1,26 +0,0 @@ -LineageOS -=========== - -Getting started ---------------- - -Please see the [LineageOS Wiki](https://wiki.lineageos.org/) for building instructions, by device. - - -Submitting patches ------------------- -Patches are always welcome! Please submit your patches via LineageOS Gerrit! - -Simply follow our guide on [how to submit patches](https://wiki.lineageos.org/submitting-patch-howto.html). - -To view the status of your and others' patches, visit [LineageOS Gerrit Code Review](https://review.lineageos.org/). - - -Buildbot --------- - -All supported devices are built weekly and periodically as changes are committed to ensure the source trees remain buildable. - -You can view the current build statuses at [LineageOS Buildkite](https://buildkite.com/lineageos). - -Builds produced weekly by the buildbot can be downloaded from [LineageOS downloads](https://download.lineageos.org/). diff --git a/bootanimation/Android.mk b/bootanimation/Android.mk index 97948f38..125086be 100644 --- a/bootanimation/Android.mk +++ b/bootanimation/Android.mk @@ -1,63 +1,2 @@ -# -# 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) +# Bootanimation + PRODUCT_COPY_FILES += vendor/lineage/bootanimation/bootanimation.zip:$(TARGET_COPY_OUT_PRODUCT)/media/bootanimation.zip 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/build/target/product/product_launched_with_j.mk b/build/target/product/product_launched_with_j.mk new file mode 100644 index 00000000..54010047 --- /dev/null +++ b/build/target/product/product_launched_with_j.mk @@ -0,0 +1,2 @@ +#PRODUCT_SHIPPING_API_LEVEL indicates the first api level, device has been commercially launched on. +PRODUCT_SHIPPING_API_LEVEL := 16 diff --git a/build/target/product/product_launched_with_j_mr1.mk b/build/target/product/product_launched_with_j_mr1.mk new file mode 100644 index 00000000..7c8f4eaf --- /dev/null +++ b/build/target/product/product_launched_with_j_mr1.mk @@ -0,0 +1,2 @@ +#PRODUCT_SHIPPING_API_LEVEL indicates the first api level, device has been commercially launched on. +PRODUCT_SHIPPING_API_LEVEL := 17 diff --git a/build/target/product/product_launched_with_j_mr2.mk b/build/target/product/product_launched_with_j_mr2.mk new file mode 100644 index 00000000..2666915e --- /dev/null +++ b/build/target/product/product_launched_with_j_mr2.mk @@ -0,0 +1,2 @@ +#PRODUCT_SHIPPING_API_LEVEL indicates the first api level, device has been commercially launched on. +PRODUCT_SHIPPING_API_LEVEL := 18 diff --git a/build/tasks/ascii_output.sh b/build/tasks/ascii_output.sh new file mode 100755 index 00000000..2b0963e3 --- /dev/null +++ b/build/tasks/ascii_output.sh @@ -0,0 +1,18 @@ +#!/bin/bash +RED="\e[31m" +ORANGE="\e[91m" +YELLOW="\e[33m" +GREEN="\e[32m" +BLUE="\e[34m" +INDIGO="\e[35m" +VIOLET="\e[95m" +ENDCOLOR="\e[0m" +echo -e "${GREEN}======================================${ENDCOLOR}" +echo -e "${RED} __ ____ __ ____ _____ ${ENDCOLOR}" +echo -e "${RED} / |/ (_)____/ /_ / __ \/ ___/ ${ENDCOLOR}" +echo -e "${RED} / /|_/ / / ___/ __/ / / / /\__ \ ${ENDCOLOR}" +echo -e "${BLUE} / / / / (__ ) /_ / /_/ /___/ / ${ENDCOLOR}" +echo -e "${BLUE} /_/ /_/_/____/\__/ \____//____/ ${ENDCOLOR}" +echo -e "${BLUE} ${ENDCOLOR}" +echo -e "${INDIGO} Beyond The Clouds ${ENDCOLOR}" +echo -e "${GREEN}======================================${ENDCOLOR}" diff --git a/build/tasks/bacon.mk b/build/tasks/bacon.mk index 272a4b8e..13a9c825 100644 --- a/build/tasks/bacon.mk +++ b/build/tasks/bacon.mk @@ -14,15 +14,20 @@ # limitations under the License. # ----------------------------------------------------------------- -# Lineage OTA update package +# MistOS OTA update package -LINEAGE_TARGET_PACKAGE := $(PRODUCT_OUT)/lineage-$(LINEAGE_VERSION).zip +LINEAGE_TARGET_PACKAGE := $(PRODUCT_OUT)/$(LINEAGE_VERSION).zip SHA256 := prebuilts/build-tools/path/$(HOST_PREBUILT_TAG)/sha256sum $(LINEAGE_TARGET_PACKAGE): $(INTERNAL_OTA_PACKAGE_TARGET) - $(hide) ln -f $(INTERNAL_OTA_PACKAGE_TARGET) $(LINEAGE_TARGET_PACKAGE) + $(hide) mv -f $(INTERNAL_OTA_PACKAGE_TARGET) $(LINEAGE_TARGET_PACKAGE) $(hide) $(SHA256) $(LINEAGE_TARGET_PACKAGE) | sed "s|$(PRODUCT_OUT)/||" > $(LINEAGE_TARGET_PACKAGE).sha256sum + @echo "Creating json OTA..." >&2 + $(hide) ./vendor/lineage/build/tools/createjson.sh $(TARGET_DEVICE) $(PRODUCT_OUT) $(LINEAGE_VERSION).zip $(MIST_VERSION_BASE) $(MIST_CODENAME) $(MIST_PACKAGE_TYPE) $(MIST_RELEASE_TYPE) + $(hide) cp -f $(PRODUCT_OUT)/$(TARGET_DEVICE).json vendor/official_devices/$(MIST_PACKAGE_TYPE)/$(TARGET_DEVICE).json + $(hide) rm -rf $(call intermediates-dir-for,PACKAGING,target_files) + $(hide) ./vendor/lineage/build/tasks/ascii_output.sh @echo "Package Complete: $(LINEAGE_TARGET_PACKAGE)" >&2 .PHONY: bacon diff --git a/build/tools/createjson.sh b/build/tools/createjson.sh new file mode 100644 index 00000000..d93f8956 --- /dev/null +++ b/build/tools/createjson.sh @@ -0,0 +1,123 @@ +#!/bin/bash +# +# Copyright (C) 2019-2022 crDroid Android Project +# Copyright (C) 2024 risingOS Android 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. +# + +#$1=TARGET_DEVICE, $2=PRODUCT_OUT, $3=FILE_NAME, $4=RISING_VERSION, $5=RISING_CODENAME, $6=RISING_PACKAGE_TYPE, $7=RISING_RELEASE_TYPE +existingOTAjson=./vendor/official_devices/$6/$1.json +output=$2/$1.json +major_version=$(echo $4 | cut -d'.' -f1) + +#cleanup old file +if [ -f $output ]; then + rm $output +fi + +echo "Generating JSON file data for OTA support..." + +if [ -f $existingOTAjson ]; then + #get data from already existing device json + #there might be a better way to parse json yet here we try without adding more dependencies like jq + maintainer=`grep -n "\"maintainer\"" $existingOTAjson | cut -d ":" -f 3 | sed 's/"//g' | sed 's/,//g' | xargs` + oem=`grep -n "\"oem\"" $existingOTAjson | cut -d ":" -f 3 | sed 's/"//g' | sed 's/,//g' | xargs` + device=`grep -n "\"device\"" $existingOTAjson | cut -d ":" -f 3 | sed 's/"//g' | sed 's/,//g' | xargs` + filename=$3 + download="https://sourceforge.net/projects/project-mistos/files/Android16/$1/$3/download" + version=`echo $4-$5` + buildprop=$2/system/build.prop + linenr=`grep -n "ro.system.build.date.utc" $buildprop | cut -d':' -f1` + timestamp=`sed -n $linenr'p' < $buildprop | cut -d'=' -f2` + md5=`md5sum "$2/$3" | cut -d' ' -f1` + sha256=`sha256sum "$2/$3" | cut -d' ' -f1` + size=`stat -c "%s" "$2/$3"` + buildtype=$7 + forum=`grep -n "\"forum\"" $existingOTAjson | cut -d ":" -f 4 | sed 's/"//g' | sed 's/,//g' | xargs` + if [ ! -z "$forum" ]; then + forum="https:"$forum + fi + recovery=`grep -n "\"recovery\"" $existingOTAjson | cut -d ":" -f 4 | sed 's/"//g' | sed 's/,//g' | xargs` + if [ ! -z "$recovery" ]; then + recovery="https:"$recovery + fi + paypal=`grep -n "\"paypal\"" $existingOTAjson | cut -d ":" -f 4 | sed 's/"//g' | sed 's/,//g' | xargs` + if [ ! -z "$paypal" ]; then + paypal="https:"$paypal + fi + telegram=`grep -n "\"telegram\"" $existingOTAjson | cut -d ":" -f 4 | sed 's/"//g' | sed 's/,//g' | xargs` + if [ ! -z "$telegram" ]; then + telegram="https:"$telegram + fi + + echo '{ + "response": [ + { + "maintainer": "'$maintainer'", + "oem": "'$oem'", + "device": "'$device'", + "filename": "'$filename'", + "download": "'$download'", + "timestamp": '$timestamp', + "md5": "'$md5'", + "sha256": "'$sha256'", + "size": '$size', + "version": "'$version'", + "buildtype": "'$buildtype'", + "forum": "'$forum'", + "recovery": "'$recovery'", + "paypal": "'$paypal'", + "telegram": "'$telegram'" + } + ] +}' >> $output + cat $output +else + filename=$3 + version=$4-$5 + download="https://sourceforge.net/projects/project-mistos/files/Android16/$1/$3/download" + buildprop=$2/system/build.prop + linenr=`grep -n "ro.system.build.date.utc" $buildprop | cut -d':' -f1` + timestamp=`sed -n $linenr'p' < $buildprop | cut -d'=' -f2` + md5=`md5sum "$2/$3" | cut -d' ' -f1` + sha256=`sha256sum "$2/$3" | cut -d' ' -f1` + size=`stat -c "%s" "$2/$3"` + + echo '{ + "response": [ + { + "maintainer": "''", + "oem": "''", + "device": "''", + "filename": "'$filename'", + "download": "'$download'", + "timestamp": '$timestamp', + "md5": "'$md5'", + "sha256": "'$sha256'", + "size": '$size', + "version": "'$version'", + "buildtype": "''", + "forum": "''", + "recovery": "''", + "paypal": "''", + "telegram": "''" + } + ] +}' >> $output + cat $output + echo 'There is no official support for this device yet' + echo 'Consider adding official support by Applying' +fi + +echo "" diff --git a/config/BoardConfigSoong.mk b/config/BoardConfigSoong.mk index 2f8cc1ce..3bed8b3f 100644 --- a/config/BoardConfigSoong.mk +++ b/config/BoardConfigSoong.mk @@ -21,8 +21,16 @@ $(foreach v,$(EXPORT_TO_SOONG),$(eval $(call add_soong_config_var,lineageVarsPlu # Camera ifneq ($(TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED),) - $(error TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED is deprecated, please migrate to soong_config_set,camera,override_format_from_reserved) -endif +SOONG_CONFIG_NAMESPACES += lineageVarsPlugin + +SOONG_CONFIG_lineageVarsPlugin := + +define addVar + SOONG_CONFIG_lineageVarsPlugin += $(1) + SOONG_CONFIG_lineageVarsPlugin_$(1) := $($1) +endef + +$(foreach v,$(EXPORT_TO_SOONG),$(eval $(call addVar,$(v)))) # Libui ifneq ($(TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS),) diff --git a/config/common.mk b/config/common.mk index 89de9d43..bbbc80d0 100644 --- a/config/common.mk +++ b/config/common.mk @@ -1,7 +1,7 @@ # Allow vendor/extra to override any property by setting it first $(call inherit-product-if-exists, vendor/extra/product.mk) -PRODUCT_BRAND ?= LineageOS +PRODUCT_BRAND ?= MistOS ifeq ($(PRODUCT_GMS_CLIENTID_BASE),) PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ @@ -91,9 +91,9 @@ PRODUCT_PACKAGES += \ PRODUCT_COPY_FILES += \ vendor/lineage/config/permissions/org.lineageos.android.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/permissions/org.lineageos.android.xml -# Enforce privapp-permissions whitelist -PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ - ro.control_privapp_permissions=enforce +#Enable transitional log for Privileged permissions +PRODUCT_PRODUCT_PROPERTIES += \ + ro.control_privapp_permissions=log ifneq ($(TARGET_DISABLE_LINEAGE_SDK), true) # Lineage SDK @@ -117,10 +117,7 @@ $(call enforce-product-packages-exist-internal,$(wildcard device/*/$(LINEAGE_BUI endif # Bootanimation -TARGET_SCREEN_WIDTH ?= 1080 -TARGET_SCREEN_HEIGHT ?= 1920 -PRODUCT_PACKAGES += \ - bootanimation.zip +$(call inherit-product, vendor/lineage/bootanimation/Android.mk) # Build Manifest PRODUCT_PACKAGES += \ @@ -140,8 +137,7 @@ PRODUCT_PACKAGES += \ endif PRODUCT_PACKAGES += \ - LineageSettingsProvider \ - Updater + LineageSettingsProvider PRODUCT_COPY_FILES += \ vendor/lineage/prebuilt/common/etc/init/init.lineage-updater.rc:$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/init/init.lineage-updater.rc @@ -261,4 +257,3 @@ include vendor/lineage/config/version.mk -include vendor/lineage-priv/keys/keys.mk -include $(WORKSPACE)/build_env/image-auto-bits.mk --include vendor/lineage/config/partner_gms.mk diff --git a/config/common_mobile.mk b/config/common_mobile.mk index 758a5b43..88b5f4e6 100644 --- a/config/common_mobile.mk +++ b/config/common_mobile.mk @@ -20,22 +20,12 @@ PRODUCT_PACKAGES += \ Glimpse \ LatinIME -ifeq ($(PRODUCT_TYPE), go) -PRODUCT_PACKAGES += \ - Launcher3QuickStepGo - -PRODUCT_DEXPREOPT_SPEED_APPS += \ - Launcher3QuickStepGo -else +# Temp build PRODUCT_PACKAGES += \ Launcher3QuickStep PRODUCT_DEXPREOPT_SPEED_APPS += \ Launcher3QuickStep -endif - -PRODUCT_PACKAGES += \ - Launcher3Overlay # Charger PRODUCT_PACKAGES += \ @@ -47,40 +37,6 @@ PRODUCT_PACKAGES += \ lineage_charger_animation_vendor endif -# Customizations -PRODUCT_PACKAGES += \ - IconPackCircularAndroidOverlay \ - IconPackCircularLauncherOverlay \ - IconPackCircularSettingsOverlay \ - IconPackCircularSystemUIOverlay \ - IconPackFilledAndroidOverlay \ - IconPackFilledLauncherOverlay \ - IconPackFilledSettingsOverlay \ - IconPackFilledSystemUIOverlay \ - IconPackKaiAndroidOverlay \ - IconPackKaiLauncherOverlay \ - IconPackKaiSettingsOverlay \ - IconPackKaiSystemUIOverlay \ - IconPackRoundedAndroidOverlay \ - IconPackRoundedLauncherOverlay \ - IconPackRoundedSettingsOverlay \ - IconPackRoundedSystemUIOverlay \ - IconPackSamAndroidOverlay \ - IconPackSamLauncherOverlay \ - IconPackSamSettingsOverlay \ - IconPackSamSystemUIOverlay \ - IconPackVictorAndroidOverlay \ - IconPackVictorLauncherOverlay \ - IconPackVictorSettingsOverlay \ - IconPackVictorSystemUIOverlay \ - IconShapePebbleOverlay \ - IconShapeRoundedRectOverlay \ - IconShapeSquareOverlay \ - IconShapeSquircleOverlay \ - IconShapeTaperedRectOverlay \ - IconShapeTeardropOverlay \ - IconShapeVesselOverlay - # Legal PRODUCT_SYSTEM_PROPERTIES += \ ro.lineagelegal.url=https://lineageos.org/legal @@ -108,6 +64,5 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ # Themes PRODUCT_PACKAGES += \ - LineageBlackTheme \ ThemePicker \ ThemesStub diff --git a/config/common_mobile_full.mk b/config/common_mobile_full.mk index 22b1acf2..bf0f432a 100644 --- a/config/common_mobile_full.mk +++ b/config/common_mobile_full.mk @@ -3,10 +3,6 @@ $(call inherit-product, vendor/lineage/config/common_mobile.mk) PRODUCT_SIZE := full -# Include {Lato,Rubik} fonts -$(call inherit-product-if-exists, external/google-fonts/lato/fonts.mk) -$(call inherit-product-if-exists, external/google-fonts/rubik/fonts.mk) - # Apps PRODUCT_PACKAGES += \ Camelot \ @@ -31,12 +27,6 @@ PRODUCT_PACKAGES += \ unrar \ zstd -# Fonts -PRODUCT_PACKAGES += \ - fonts_customization.xml \ - FontLatoOverlay \ - FontRubikOverlay - # Include Lineage LatinIME dictionaries PRODUCT_PACKAGE_OVERLAYS += vendor/lineage/overlay/dictionaries PRODUCT_ENFORCE_RRO_EXCLUDED_OVERLAYS += vendor/lineage/overlay/dictionaries diff --git a/config/mist.mk b/config/mist.mk new file mode 100644 index 00000000..916841e2 --- /dev/null +++ b/config/mist.mk @@ -0,0 +1,2 @@ +PRODUCT_PACKAGES += \ + Updater diff --git a/config/partner_gms.mk b/config/partner_gms.mk deleted file mode 100644 index e754da30..00000000 --- a/config/partner_gms.mk +++ /dev/null @@ -1,51 +0,0 @@ -ifeq ($(WITH_GMS),true) - # Special handling for Android TV - ifeq ($(PRODUCT_IS_ATV),true) - ifneq (,$(wildcard vendor/partner_gms-tv)) - ifneq ($(GMS_MAKEFILE),) - # Specify the GMS makefile you want to use, for example: - # - gms.mk - default Android TV GMS - # - gms_gtv.mk - default Google TV GMS - # - gms_minimal.mk - minimal Android TV GMS - $(call inherit-product, vendor/partner_gms-tv/products/$(GMS_MAKEFILE)) - else - $(call inherit-product-if-exists, vendor/partner_gms-tv/products/gms.mk) - endif - $(call inherit-product-if-exists, vendor/partner_gms-tv/products/mainline_modules.mk) - endif - # Special handling for Android Automotive - else ifeq ($(PRODUCT_IS_AUTOMOTIVE),true) - ifneq (,$(wildcard vendor/partner_gms-car)) - ifneq ($(GMS_MAKEFILE),) - $(call inherit-product, vendor/partner_gms-car/products/$(GMS_MAKEFILE)) - else - $(call inherit-product-if-exists, vendor/partner_gms-car/products/gms.mk) - endif - endif - else - ifneq (,$(wildcard vendor/partner_gms)) - # Specify the GMS makefile you want to use, for example: - # - fi.mk - Project Fi - # - gms.mk - default GMS - # - gms_go.mk - low ram devices - # - gms_go_2gb.mk - low ram devices (2GB) - # - gms_64bit_only.mk - devices supporting 64-bit only - # - gms_minimal.mk - minimal GMS - ifneq ($(GMS_MAKEFILE),) - $(call inherit-product, vendor/partner_gms/products/$(GMS_MAKEFILE)) - else - $(call inherit-product-if-exists, vendor/partner_gms/products/gms.mk) - endif - endif - - ifneq (,$(wildcard vendor/partner_modules)) - # Specify the mainline module makefile you want to use, for example: - # - mainline_modules.mk - updatable apex - # - mainline_modules_flatten_apex.mk - flatten apex - # - mainline_modules_low_ram.mk - low ram devices - ifneq ($(MAINLINE_MODULES_MAKEFILE),) - $(call inherit-product, vendor/partner_modules/build/$(MAINLINE_MODULES_MAKEFILE)) - endif - endif - endif -endif diff --git a/config/version.mk b/config/version.mk index 985693f0..538a774c 100644 --- a/config/version.mk +++ b/config/version.mk @@ -1,45 +1,77 @@ -PRODUCT_VERSION_MAJOR = 23 +PRODUCT_VERSION_MAJOR = 16 PRODUCT_VERSION_MINOR = 0 -ifeq ($(LINEAGE_VERSION_APPEND_TIME_OF_DAY),true) - LINEAGE_BUILD_DATE := $(shell date -u +%Y%m%d_%H%M%S) +# Increase Mist Version with each major release. +MIST_VERSION_DISPLAY := 4.3-Test +MIST_FLAVOR := Baklava +MIST_VERSION_BASE := 4.3 +MIST_CODENAME := Fizzle +MIST_BUILD_TYPE ?= Unofficial + +MIST_BUILD_DATE := $(shell date -u +%Y%m%d) + +CURRENT_DEVICE := $(shell echo "$(TARGET_PRODUCT)" | cut -d'_' -f 2,3) +OFFICIAL_MAINTAINERS := $(shell cat mist-maintainers/mist.maintainers) +OFFICIAL_DEVICES := $(shell cat mist-maintainers/mist.devices) + +ifeq ($(findstring $(LINEAGE_BUILD), $(OFFICIAL_DEVICES)),) + # Device not listed as official + MIST_BUILD_TYPE := UNOFFICIAL else - LINEAGE_BUILD_DATE := $(shell date -u +%Y%m%d) + # Check if builder is an official maintainer + ifeq ($(findstring $(MISTOS_MAINTAINER), $(OFFICIAL_MAINTAINERS)),) + # Builder not an official maintainer, warn and set unofficial + $(warning **********************************************************************) + $(warning * There is already an official maintainer for $(LINEAGE_BUILD) *) + $(warning * Setting build type to UNOFFICIAL *) + $(warning **********************************************************************) + MIST_BUILD_TYPE := UNOFFICIAL + else + # Official maintainer building official device + MIST_BUILD_TYPE := OFFICIAL + endif endif -# Set LINEAGE_BUILDTYPE from the env RELEASE_TYPE, for jenkins compat - -ifndef LINEAGE_BUILDTYPE - ifdef RELEASE_TYPE - # Starting with "LINEAGE_" is optional - RELEASE_TYPE := $(shell echo $(RELEASE_TYPE) | sed -e 's|^LINEAGE_||g') - LINEAGE_BUILDTYPE := $(RELEASE_TYPE) - endif +# Enforce official build for official maintainers on official devices +ifeq ($(MIST_BUILD_TYPE), OFFICIAL) + ifeq ($(findstring $(LINEAGE_BUILD), $(OFFICIAL_DEVICES)),) + # Shouldn't reach here, error for unexpected situation + $(error **********************************************************) + $(error * A violation has been detected, aborting build *) + $(error **********************************************************) + endif endif -# Filter out random types, so it'll reset to UNOFFICIAL -ifeq ($(filter RELEASE NIGHTLY SNAPSHOT EXPERIMENTAL,$(LINEAGE_BUILDTYPE)),) - LINEAGE_BUILDTYPE := UNOFFICIAL - LINEAGE_EXTRAVERSION := -endif -ifeq ($(LINEAGE_BUILDTYPE), UNOFFICIAL) - ifneq ($(TARGET_UNOFFICIAL_BUILD_ID),) - LINEAGE_EXTRAVERSION := -$(TARGET_UNOFFICIAL_BUILD_ID) - endif +# Mist Packages +ifeq ($(WITH_GMS),true) + ifeq ($(TARGET_USES_MINI_GAPPS), true) + MIST_PACKAGE_TYPE ?= MINI + else ifeq ($(TARGET_USES_PICO_GAPPS), true) + MIST_PACKAGE_TYPE ?= PICO + else + MIST_PACKAGE_TYPE ?= GAPPS + endif +else + MIST_PACKAGE_TYPE ?= VANILLA endif -LINEAGE_VERSION_SUFFIX := $(LINEAGE_BUILD_DATE)-$(LINEAGE_BUILDTYPE)$(LINEAGE_EXTRAVERSION)-$(LINEAGE_BUILD) - # Internal version -LINEAGE_VERSION := $(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(LINEAGE_VERSION_SUFFIX) +LINEAGE_VERSION := MistOS-$(MIST_VERSION_BASE)-$(MIST_CODENAME)-$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(MIST_PACKAGE_TYPE)-$(shell date +%Y%m%d)-$(LINEAGE_BUILD)-$(MIST_BUILD_TYPE) # Display version -LINEAGE_DISPLAY_VERSION := $(PRODUCT_VERSION_MAJOR)-$(LINEAGE_VERSION_SUFFIX) +LINEAGE_DISPLAY_VERSION := MistOS-$(MIST_VERSION_BASE)-$(MIST_CODENAME)-$(MIST_PACKAGE_TYPE)-$(LINEAGE_BUILD)-$(MIST_BUILD_TYPE)-$(shell date +%Y%m%d) # LineageOS version properties PRODUCT_SYSTEM_PROPERTIES += \ - ro.lineage.version=$(LINEAGE_VERSION) \ - ro.lineage.display.version=$(LINEAGE_DISPLAY_VERSION) \ - ro.lineage.build.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \ - ro.lineage.releasetype=$(LINEAGE_BUILDTYPE) + ro.mist.version=$(LINEAGE_VERSION) \ + ro.mist.display.version=$(LINEAGE_DISPLAY_VERSION) \ + ro.mist.build.version=$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR) \ + ro.modversion=$(MIST_VERSION) \ + ro.mist.packagetype=$(MIST_PACKAGE_TYPE) \ + ro.mist.version_display=$(MIST_VERSION_DISPLAY) \ + ro.mist.version.base=$(MIST_VERSION_BASE) \ + ro.mistos.maintainer=$(MISTOS_MAINTAINER) \ + ro.mistos.flavor=$(MIST_FLAVOR) \ + ro.mist.codename=$(MIST_CODENAME) \ + ro.mist.buildtype=$(MIST_BUILD_TYPE) diff --git a/overlay/common/frameworks/base/core/res/res/drawable-hdpi/default_wallpaper.png b/overlay/common/frameworks/base/core/res/res/drawable-hdpi/default_wallpaper.png deleted file mode 100644 index c38e6e0d..00000000 Binary files a/overlay/common/frameworks/base/core/res/res/drawable-hdpi/default_wallpaper.png and /dev/null differ diff --git a/overlay/common/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png b/overlay/common/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png index a60c013e..c4780cc2 100644 Binary files a/overlay/common/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png and b/overlay/common/frameworks/base/core/res/res/drawable-nodpi/default_wallpaper.png differ diff --git a/overlay/common/frameworks/base/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.png b/overlay/common/frameworks/base/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.png deleted file mode 100644 index 10b06e32..00000000 Binary files a/overlay/common/frameworks/base/core/res/res/drawable-sw600dp-nodpi/default_wallpaper.png and /dev/null differ diff --git a/overlay/common/frameworks/base/core/res/res/drawable-sw720dp-nodpi/default_wallpaper.png b/overlay/common/frameworks/base/core/res/res/drawable-sw720dp-nodpi/default_wallpaper.png deleted file mode 100644 index 10b06e32..00000000 Binary files a/overlay/common/frameworks/base/core/res/res/drawable-sw720dp-nodpi/default_wallpaper.png and /dev/null differ diff --git a/overlay/common/packages/apps/Settings/res/values/config.xml b/overlay/common/packages/apps/Settings/res/values/config.xml index 07f9922f..6be32515 100644 --- a/overlay/common/packages/apps/Settings/res/values/config.xml +++ b/overlay/common/packages/apps/Settings/res/values/config.xml @@ -36,4 +36,7 @@ com.android.customization.picker.CustomizationPickerActivity android.intent.action.SET_WALLPAPER + + + false diff --git a/overlay/rro_packages/Launcher3Overlay/Android.bp b/overlay/rro_packages/Launcher3Overlay/Android.bp deleted file mode 100644 index 8043464f..00000000 --- a/overlay/rro_packages/Launcher3Overlay/Android.bp +++ /dev/null @@ -1,9 +0,0 @@ -// -// Copyright (C) 2022 The LineageOS Project -// SPDX-License-Identifier: Apache-2.0 -// - -runtime_resource_overlay { - name: "Launcher3Overlay", - product_specific: true, -} diff --git a/overlay/rro_packages/Launcher3Overlay/AndroidManifest.xml b/overlay/rro_packages/Launcher3Overlay/AndroidManifest.xml deleted file mode 100644 index b87512af..00000000 --- a/overlay/rro_packages/Launcher3Overlay/AndroidManifest.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/overlay/rro_packages/Launcher3Overlay/res/values/config.xml b/overlay/rro_packages/Launcher3Overlay/res/values/config.xml deleted file mode 100644 index 401fc9d5..00000000 --- a/overlay/rro_packages/Launcher3Overlay/res/values/config.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - com.android.wallpaper - - diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh index ba8bf568..244c1d9a 100755 --- a/prebuilt/common/bin/backuptool.sh +++ b/prebuilt/common/bin/backuptool.sh @@ -7,7 +7,7 @@ export C=/tmp/backupdir export SYSDEV="$(readlink -nf "$2")" export SYSFS="$3" export TMPDIR=/tmp -export V=23 +export V=16.0 export ADDOND_VERSION=3 @@ -48,7 +48,7 @@ if [ ! -r $S/build.prop ]; then echo "Backup/restore is not possible. Partition is probably empty" return 1 fi -if ! grep -q "^ro.lineage.version=$V.*" $S/build.prop; then +if ! grep -q "^ro.mist.version=$V.*" $S/build.prop; then echo "Backup/restore is not possible. Incompatible ROM version: $V" return 2 fi diff --git a/prebuilt/common/bin/backuptool_ab.sh b/prebuilt/common/bin/backuptool_ab.sh index 9f61ddda..94fd71b7 100755 --- a/prebuilt/common/bin/backuptool_ab.sh +++ b/prebuilt/common/bin/backuptool_ab.sh @@ -5,7 +5,7 @@ export S=/system export C=/postinstall/tmp/backupdir -export V=23 +export V=16.0 export ADDOND_VERSION=3 @@ -56,7 +56,7 @@ if [ ! -r /system/build.prop ]; then echo "Backup/restore is not possible. Partition is probably empty" return 1 fi -if ! grep -q "^ro.lineage.version=$V.*" /system/build.prop; then +if ! grep -q "^ro.mist.version=$V.*" /system/build.prop; then echo "Backup/restore is not possible. Incompatible ROM version: $V" return 2 fi diff --git a/prebuilt/common/etc/init/init.lineage-updater.rc b/prebuilt/common/etc/init/init.lineage-updater.rc index f1bed8d3..4be6987a 100644 --- a/prebuilt/common/etc/init/init.lineage-updater.rc +++ b/prebuilt/common/etc/init/init.lineage-updater.rc @@ -1,4 +1,4 @@ on post-fs-data # Create an additional OTA package directory that unlike /data/ota_package # will not be touched by GmsCore. - mkdir /data/lineageos_updates 0770 system cache encryption=Require + mkdir /data/mist_updates 0770 system cache encryption=Require