Skip to content

Commit

Permalink
Support C6802 and C6902 with a post-install script
Browse files Browse the repository at this point in the history
* Modem firmware differs on C6[89]02.

Change-Id: I3569e37bdd01511b7122620486a954487db5412f
  • Loading branch information
chirayudesai authored and Gerrit Code Review committed Feb 14, 2014
1 parent 40631c7 commit cbf3262
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BoardConfigCommon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions proprietary-files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions recovery/c6x02.sh
Original file line number Diff line number Diff line change
@@ -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
28 changes: 28 additions & 0 deletions releasetools.py
Original file line number Diff line number Diff line change
@@ -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");')
3 changes: 3 additions & 0 deletions rhine.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cbf3262

Please sign in to comment.