diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk index 34674d8..2dd538e 100644 --- a/BoardConfigCommon.mk +++ b/BoardConfigCommon.mk @@ -158,3 +158,5 @@ TW_BOARD_CUSTOM_GRAPHICS := ../../../device/sony/rhine-common/recovery/twrpgraph TW_BRIGHTNESS_PATH := /sys/class/leds/wled:backlight/brightness TW_MAX_BRIGHTNESS := 4095 TW_NO_USB_STORAGE := true + +TARGET_RELEASETOOLS_EXTENSIONS := device/sony/rhine-common diff --git a/proprietary-files.txt b/proprietary-files.txt index 2630c72..83853c9 100644 --- a/proprietary-files.txt +++ b/proprietary-files.txt @@ -105,6 +105,9 @@ etc/firmware/wcnss.b06 etc/firmware/wcnss.b07 etc/firmware/wcnss.b08 etc/firmware/wcnss.mdt +etc/firmware/c6x02/mba.b00 +etc/firmware/c6x02/modem.b01 +etc/firmware/c6x02/modem.mdt etc/hw_config.sh etc/pre_hw_config.sh etc/ramdump_ssr.xml diff --git a/recovery/c6x02.sh b/recovery/c6x02.sh new file mode 100644 index 0000000..0bdcfe0 --- /dev/null +++ b/recovery/c6x02.sh @@ -0,0 +1,11 @@ +#!/sbin/sh + +mkdir -p /lta-label +mount -o ro /dev/block/platform/msm_sdcc.1/by-name/LTALabel /lta-label +ls lta-label/*.html | grep -q c6[89]02 +if [ $? -eq 0 ]; then + mount /dev/block/platform/msm_sdcc.1/by-name/system /system + cp /system/etc/firmware/c6x02/* /system/etc/firmware/ + umount /system +fi +umount /lta-label diff --git a/releasetools.py b/releasetools.py new file mode 100644 index 0000000..3fc68ae --- /dev/null +++ b/releasetools.py @@ -0,0 +1,28 @@ +# Copyright (C) 2012 The Android Open Source Project +# Copyright (C) 2014 The CyanogenMod 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. + +"""Custom OTA Package commands for rhine""" + +import os + +TARGET_DIR = os.getenv('OUT') +TARGET_DEVICE = os.getenv('CM_BUILD') + +def FullOTA_InstallEnd(self): + if TARGET_DEVICE == "honami" or TARGET_DEVICE == "togari": + self.output_zip.write(os.path.join(TARGET_DIR, "c6x02.sh"), "c6x02.sh") + self.script.AppendExtra('package_extract_file("c6x02.sh", "/tmp/c6x02.sh");') + self.script.AppendExtra('set_perm(0, 0, 0777, "/tmp/c6x02.sh");') + self.script.AppendExtra('run_program("/tmp/c6x02.sh");') diff --git a/rhine.mk b/rhine.mk index d0da8da..638c2d6 100644 --- a/rhine.mk +++ b/rhine.mk @@ -171,6 +171,9 @@ PRODUCT_COPY_FILES += \ $(COMMON_PATH)/rootdir/sbin/wait4tad_static:root/sbin/wait4tad_static \ $(COMMON_PATH)/rootdir/sbin/tad_static:root/sbin/tad_static +PRODUCT_COPY_FILES += \ + $(LOCAL_PATH)/recovery/c6x02.sh:c6x02.sh + # Set default USB interface PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ persist.sys.usb.config=mtp