releasetools: force flash boot.img
authorJan Altensen <info@stricted.net>
Tue, 26 Feb 2019 13:52:46 +0000 (14:52 +0100)
committerJan Altensen <info@stricted.net>
Tue, 26 Feb 2019 13:52:46 +0000 (14:52 +0100)
for unknown reasons `package_extract_file("boot.img", "/dev/bootimg");` is doing nothing at 99% of the time

Change-Id: I74782867c3eb2a7039dbe16b2217eee9518580a6

BoardConfig.mk
releasetools/releasetools.py [new file with mode: 0644]

index efba224ea2cc7efffcfdf6cee3dd0f0be4d46d02..bd40ed802f9a9a247e3a579b898b180517b102ac 100644 (file)
@@ -118,3 +118,5 @@ TARGET_LD_SHIM_LIBS := \
 # SELinux
 BOARD_SECCOMP_POLICY := $(DEVICE_DIR)/seccomp
 #BOARD_SEPOLICY_DIRS += $(DEVICE_DIR)/sepolicy
+
+TARGET_RELEASETOOLS_EXTENSIONS := $(DEVICE_DIR)/releasetools
diff --git a/releasetools/releasetools.py b/releasetools/releasetools.py
new file mode 100644 (file)
index 0000000..0aea793
--- /dev/null
@@ -0,0 +1,3 @@
+def FullOTA_InstallEnd(info):
+  info.script.AppendExtra('package_extract_file("boot.img", "/tmp/boot.img");');
+  info.script.AppendExtra('run_program("/sbin/dd", "if=/tmp/boot.img", "of=/dev/bootimg");');