diff --git a/Android.mk b/Android.mk index ad6b799..f71eb0a 100644 --- a/Android.mk +++ b/Android.mk @@ -18,6 +18,8 @@ LOCAL_PATH := $(call my-dir) ifeq ($(TARGET_DEVICE),RMX3031) +$(call add-radio-file,configs/dynamic-remove-oplus) + subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH)) $(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk))) diff --git a/releasetools/dynamic-remove-oplus b/releasetools/dynamic-remove-oplus new file mode 100644 index 0000000..3c68258 --- /dev/null +++ b/releasetools/dynamic-remove-oplus @@ -0,0 +1,26 @@ +# Remove my_product since it might be there and we're not building super or rewriting it +remove my_product + +# Remove my_engineering since it might be there and we're not building super or rewriting it +remove my_engineering + +# Remove my_company since it might be there and we're not building super or rewriting it +remove my_company + +# Remove my_carrier since it might be there and we're not building super or rewriting it +remove my_carrier + +# Remove my_region since it might be there and we're not building super or rewriting it +remove my_region + +# Remove my_heytap since it might be there and we're not building super or rewriting it +remove my_heytap + +# Remove my_stock since it might be there and we're not building super or rewriting it +remove my_stock + +# Remove my_preload since it might be there and we're not building super or rewriting it +remove my_preload + +# Remove my_manifest since it might be there and we're not building super or rewriting it +remove my_manifest diff --git a/releasetools/releasetools.py b/releasetools/releasetools.py index 5b0886b..be662af 100644 --- a/releasetools/releasetools.py +++ b/releasetools/releasetools.py @@ -17,6 +17,12 @@ import common import re +def FullOTA_InstallBegin(info): + data = info.input_zip.read("RADIO/dynamic-remove-oplus") + common.ZipWriteStr(info.output_zip, "dynamic-remove-oplus", data) + info.script.AppendExtra('update_dynamic_partitions(package_extract_file("dynamic-remove-oplus"));') + return + def FullOTA_InstallEnd(info): OTA_InstallEnd(info) return