Browse Source

misc: version: Convert odm version shell command to module.

This causes it to be properly "rebuilt" on a clean build, when
build modules are not discovered (eg. when running m installclean
followed by a build, without touching any makefiles).

Change-Id: I6b0e7f1a06c54aff6ee6aefaa21d29a6c1210ff8
Signed-off-by: MarijnS95 <marijns95@gmail.com>
vintf-enforce
MarijnS95 10 months ago
parent
commit
4ff2571176
2 changed files with 14 additions and 1 deletions
  1. 3
    0
      common.mk
  2. 11
    1
      misc/version/Android.mk

+ 3
- 0
common.mk View File

@@ -112,6 +112,9 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
firmware_folders

PRODUCT_PACKAGES += \
odm_build_prop_version

# APN list
PRODUCT_COPY_FILES += \
device/sample/etc/old-apns-conf.xml:system/etc/old-apns-conf.xml \

+ 11
- 1
misc/version/Android.mk View File

@@ -1 +1,11 @@
$(shell pushd $(PRODUCT_OUT)/odm/ > /dev/null && echo "ro.odm.version=$(PLATFORM_VERSION)_$(SOMC_KERNEL_VERSION)_$(SOMC_PLATFORM)_$(TARGET_VENDOR_VERSION)" >build.prop && popd > /dev/null)
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := odm_build_prop_version
LOCAL_MODULE_PATH := $(TARGET_OUT_ODM)

LOCAL_POST_INSTALL_CMD := echo \
"ro.odm.version=$(PLATFORM_VERSION)_$(SOMC_KERNEL_VERSION)_$(SOMC_PLATFORM)_$(TARGET_VENDOR_VERSION)" \
>$(TARGET_OUT_ODM)/build.prop

include $(BUILD_PHONY_PACKAGE)

Loading…
Cancel
Save