Skip to content

Commit

Permalink
X01BD: Override several props to allow stock ROM flashing
Browse files Browse the repository at this point in the history
* Build system doesn't (seem to?) override PRODUCT_DEVICE, so it has to be
  manually patched here.
* Stock firmware zip checks for ro.build.date.utc, which's false-positive
  since TWRP's build date might be newer than stock firmware that we're
  going to flash.
* Also, just for kicks and giggles, override ro.bootimage.build.date.utc
  so we can have matching yet consistent POSIX build time.

Signed-off-by: Albert I <[email protected]>
Change-Id: Id3a19c4a977e8084453c01897e82f193ff8d976d
  • Loading branch information
krasCGQ authored and justks committed Jul 11, 2019
1 parent 67a651f commit d59a52d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_DEVICE),X01BD)
include $(call all-makefiles-under,$(LOCAL_PATH))
include $(CLEAR_VARS)
endif

# Hack some props to allow stock ROM flashing
BOARD_RECOVERY_IMAGE_PREPARE := \
sed -i 's/ro.bootimage.build.date.utc=.*/ro.bootimage.build.date.utc=0/' $(TARGET_RECOVERY_ROOT_OUT)/prop.default; \
sed -i 's/ro.build.date.utc=.*/ro.build.date.utc=0/' $(TARGET_RECOVERY_ROOT_OUT)/prop.default; \
sed -i 's/ro.product.device=.*/ro.product.device=ASUS_X01BD/' $(TARGET_RECOVERY_ROOT_OUT)/prop.default

endif

0 comments on commit d59a52d

Please sign in to comment.