evolution: Configure support for Evolution X Vanilla
Signed-off-by: AnierinB <anierin@evolution-x.org>
This commit is contained in:
@@ -23,7 +23,7 @@ SHA256 := prebuilts/build-tools/path/$(HOST_PREBUILT_TAG)/sha256sum
|
||||
$(LINEAGE_TARGET_PACKAGE): $(INTERNAL_OTA_PACKAGE_TARGET)
|
||||
$(hide) mv -f $(INTERNAL_OTA_PACKAGE_TARGET) $(LINEAGE_TARGET_PACKAGE)
|
||||
$(hide) $(SHA256) $(LINEAGE_TARGET_PACKAGE) | sed "s|$(PRODUCT_OUT)/||" > $(LINEAGE_TARGET_PACKAGE).sha256sum
|
||||
$(hide) ./vendor/lineage/build/tools/createjson.py $(TARGET_DEVICE) $(PRODUCT_OUT) $(LINEAGE_VERSION).zip $(TARGET_BUILD_VARIANT)
|
||||
$(hide) ./vendor/lineage/build/tools/createjson.py $(TARGET_DEVICE) $(PRODUCT_OUT) $(LINEAGE_VERSION).zip $(TARGET_BUILD_VARIANT) $(WITH_GMS)
|
||||
$(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
|
||||
|
||||
@@ -9,14 +9,14 @@ import os
|
||||
import hashlib
|
||||
import json
|
||||
|
||||
def generate_json(target_device, product_out, file_name, build_variant):
|
||||
def generate_json(target_device, product_out, file_name, build_variant, with_gms):
|
||||
output = os.path.join(product_out, f"{target_device}.json")
|
||||
|
||||
if os.path.exists(output):
|
||||
os.remove(output)
|
||||
|
||||
android_version = file_name.split('-')[1].split('.')[0]
|
||||
existing_ota_json = os.path.join(f"./evolution/OTA/builds", f"{target_device}.json")
|
||||
android_version = file_name.split('-')[1].split('.')[0] + ("_vanilla" if with_gms == "false" else "")
|
||||
existing_ota_json = os.path.join(f"./evolution/OTA{'-VANILLA' if with_gms == 'false' else ''}/builds", f"{target_device}.json")
|
||||
|
||||
maintainer = ""
|
||||
currently_maintained = False
|
||||
@@ -117,9 +117,10 @@ def main():
|
||||
parser.add_argument("product_out", help="Product output directory")
|
||||
parser.add_argument("file_name", help="File name for OTA")
|
||||
parser.add_argument("build_variant", help="Build variant")
|
||||
parser.add_argument("with_gms", help="Whether with GMS (true/false)")
|
||||
|
||||
args = parser.parse_args()
|
||||
generate_json(args.target_device, args.product_out, args.file_name, args.build_variant)
|
||||
generate_json(args.target_device, args.product_out, args.file_name, args.build_variant, args.with_gms)
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
@@ -5,6 +5,11 @@ PRODUCT_PACKAGES += \
|
||||
ifeq ($(EVO_BUILD_TYPE),Official)
|
||||
PRODUCT_PACKAGES += \
|
||||
Updater
|
||||
|
||||
ifeq ($(WITH_GMS),false)
|
||||
PRODUCT_PACKAGES += \
|
||||
UpdaterVanillaOverlay
|
||||
endif
|
||||
endif
|
||||
|
||||
# Private keys
|
||||
|
||||
@@ -2,9 +2,21 @@ PRODUCT_VERSION_MAJOR = 16
|
||||
PRODUCT_VERSION_MINOR = 0
|
||||
|
||||
# Increase EVO Version with each major release.
|
||||
EVO_VERSION := 11.0
|
||||
EVO_VERSION_BASE := 11.3
|
||||
EVO_BUILD_TYPE ?= Unofficial
|
||||
|
||||
ifeq ($(EVO_BUILD_TYPE),Official)
|
||||
else ifeq ($(EVO_BUILD_TYPE),Unofficial)
|
||||
else
|
||||
$(error EVO_BUILD_TYPE must be Official or Unofficial. Current value: $(EVO_BUILD_TYPE))
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_GMS),true)
|
||||
EVO_VERSION := $(EVO_VERSION_BASE)
|
||||
else
|
||||
EVO_VERSION := $(EVO_VERSION_BASE)-Vanilla
|
||||
endif
|
||||
|
||||
# Internal version
|
||||
LINEAGE_VERSION := EvolutionX-$(PRODUCT_VERSION_MAJOR).$(PRODUCT_VERSION_MINOR)-$(shell date +%Y%m%d)-$(LINEAGE_BUILD)-$(EVO_VERSION)-$(EVO_BUILD_TYPE)
|
||||
|
||||
|
||||
9
overlay/rro_packages/UpdaterVanillaOverlay/Android.bp
Normal file
9
overlay/rro_packages/UpdaterVanillaOverlay/Android.bp
Normal file
@@ -0,0 +1,9 @@
|
||||
//
|
||||
// Copyright (C) 2024 The Evolution X Project
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
//
|
||||
|
||||
runtime_resource_overlay {
|
||||
name: "UpdaterVanillaOverlay",
|
||||
product_specific: true,
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2024 The Evolution X Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.evolution.updater.vanilla.overlay">
|
||||
|
||||
<overlay
|
||||
android:isStatic="true"
|
||||
android:priority="1"
|
||||
android:targetPackage="org.evolution.updater" />
|
||||
</manifest>
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2024 The Evolution X Project
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
|
||||
<string name="updater_server_url" translatable="false">https://raw.githubusercontent.com/Evolution-X/OTA/bka-vanilla/builds/{device}.json</string>
|
||||
<string name="menu_changelog_url" translatable="false">https://raw.githubusercontent.com/Evolution-X/OTA/bka-vanilla/changelogs/<xliff:g id="device_name">%1$s</xliff:g>.txt</string>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user