diff options
-rwxr-xr-x | BoardConfig.mk | 1 | ||||
-rw-r--r-- | device.mk | 2 | ||||
-rw-r--r-- | releasetools.py | 64 |
3 files changed, 65 insertions, 2 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk index dfd453d..6ce6e01 100755 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -63,3 +63,4 @@ BOARD_KERNEL_BASE := 0x30000000 BOARD_KERNEL_PAGESIZE := 4096 TARGET_RECOVERY_UI_LIB := librecovery_ui_crespo +TARGET_RELEASETOOLS_EXTENSIONS := device/samsung/crespo @@ -67,13 +67,11 @@ PRODUCT_PACKAGES := \ PRODUCT_COPY_FILES += \ frameworks/base/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \ frameworks/base/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \ - frameworks/base/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \ frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \ frameworks/base/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \ frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \ frameworks/base/data/etc/android.hardware.sensor.proximity.xml:system/etc/permissions/android.hardware.sensor.proximity.xml \ frameworks/base/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \ - frameworks/base/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \ frameworks/base/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \ packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:system/etc/permissions/android.software.live_wallpaper.xml diff --git a/releasetools.py b/releasetools.py new file mode 100644 index 0000000..493f94f --- /dev/null +++ b/releasetools.py @@ -0,0 +1,64 @@ +# Copyright (C) 2010 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import common + +def FullOTA_InstallEnd(info): + try: + bootloader_img = info.input_zip.read("RADIO/bootloader.img") + common.ZipWriteStr(info.output_zip, "bootloader.img", bootloader_img) + info.script.WriteRawImage("bootloader", "bootloader.img") + except KeyError: + print "no bootloader.img in target_files; skipping install" + + try: + radio_img = info.input_zip.read("RADIO/radio.img") + common.ZipWriteStr(info.output_zip, "radio.img", radio_img) + info.script.WriteRawImage("radio", "radio.img") + except KeyError: + print "no radio.img in target_files; skipping install" + +def IncrementalOTA_InstallEnd(info): + try: + target_bootloader_img = info.target_zip.read("RADIO/bootloader.img") + try: + source_bootloader_img = info.source_zip.read("RADIO/bootloader.img") + except KeyError: + source_bootloader_img = None + + if source_bootloader_img == target_bootloader_img: + print "bootloader unchanged; skipping" + else: + common.ZipWriteStr(info.output_zip, "bootloader.img", bootloader_img) + info.script.WriteRawImage("bootloader", "bootloader.img") + + except KeyError: + print "no bootloader.img in target target_files; skipping install" + + try: + target_radio_img = info.target_zip.read("RADIO/radio.img") + try: + source_radio_img = info.source_zip.read("RADIO/radio.img") + except KeyError: + source_radio_img = None + + if source_radio_img == target_radio_img: + print "radio unchanged; skipping" + else: + # TODO: send radio image as binary patch + + common.ZipWriteStr(info.output_zip, "radio.img", radio_img) + info.script.WriteRawImage("radio", "radio.img") + except KeyError: + print "no radio.img in target target_files; skipping install" |