From dd039b6d87bdf174467acf62a696a561b7a2a2eb Mon Sep 17 00:00:00 2001 From: attn1 Date: Tue, 1 Mar 2011 19:18:30 -0500 Subject: [PATCH] Merge kineto chk and add NAM DHD config into modelid_cfg Change-Id: I770266b6a35ddfb1a4d4893b9db00dd61aede441 --- prebuilt/common/bin/chkkineto.sh | 40 ----------------- prebuilt/common/bin/modelid_cfg.sh | 70 ++++++++++++++++++++++++++++++ products/common.mk | 2 +- 3 files changed, 71 insertions(+), 41 deletions(-) delete mode 100644 prebuilt/common/bin/chkkineto.sh create mode 100644 prebuilt/common/bin/modelid_cfg.sh diff --git a/prebuilt/common/bin/chkkineto.sh b/prebuilt/common/bin/chkkineto.sh deleted file mode 100644 index b94936e2..00000000 --- a/prebuilt/common/bin/chkkineto.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/sbin/sh -# -# Remove KINETO if TMUS or GOOGLE Radio firmware not preset. -# - -c=`/system/bin/getprop ro.carrier` -p=/system/app/MS-HTCVISION-KNT20-02.apk -r=y - -if [ "$c" = "TMUS" ]; - then - r=n -fi - -if [ "$c" = "GOOGLE" ]; - then - r=n -fi - -if [ "$c" = "ALL" ]; - then - r=n -fi - -if [ "$r" = "y" ]; - then - if [ -f $p ]; - then - rm -f /system/app/MS-HTCVISION-KNT20-02.apk - rm -f /system/lib/libkineto.so - rm -f /system/lib/libganril.so - rm -f /system/lib/librilswitch.so - sed 's/librilswitch.so/libhtc_ril.so/' /system/build.prop > /tmp/build.tmp - sed '/rilswitch/d' /tmp/build.tmp > /system/build.prop - chmod 644 /system/build.prop - rm /tmp/build* - fi -fi - -exit 0 diff --git a/prebuilt/common/bin/modelid_cfg.sh b/prebuilt/common/bin/modelid_cfg.sh new file mode 100644 index 00000000..b4e92523 --- /dev/null +++ b/prebuilt/common/bin/modelid_cfg.sh @@ -0,0 +1,70 @@ +#!/sbin/sh +# + +# Remove KINETO on incorrect models. +# +# Valid: +# VISION TMUS MODELID PC1010000 +# MAHIMAHI TMUS MODELID PB9910000 +# GLACIER TMUS MODELID PD1510000 +# Espresso TMUS MODELID PB6510000 +# + +kineto=/system/app/MS-HTCVISION-KNT20-02.apk +rm_kineto=y + +cat /proc/cmdline|grep -q androidboot.mid=PC1010000 +if [ $? = 0 ]; + then + rm_kineto=n +fi + +cat /proc/cmdline|grep -q androidboot.mid=PB9910000 +if [ $? = 0 ]; + then + rm_kineto=n +fi + +cat /proc/cmdline|grep -q androidboot.mid=PD1510000 +if [ $? = 0 ]; + then + rm_kineto=n +fi + +cat /proc/cmdline|grep -q androidboot.mid=PB6510000 +if [ $? = 0 ]; + then + rm_kineto=n +fi + +if [ "$rm_kineto" = "y" ]; + then + if [ -f $kineto ]; + then + rm -f /system/app/MS-HTCVISION-KNT20-02.apk + rm -f /system/lib/libkineto.so + rm -f /system/lib/libganril.so + rm -f /system/lib/librilswitch.so + sed 's/librilswitch.so/libhtc_ril.so/' /system/build.prop > /tmp/build.tmp + sed '/rilswitch/d' /tmp/build.tmp > /system/build.prop + chmod 644 /system/build.prop + rm /tmp/build* + fi +fi + +# +# Check for spade; if NAM model update DSP and GPS config +# + +cat /proc/cmdline | grep -q spade +if [ $? = 0 ]; + then +cat /proc/cmdline | grep -q androidboot.mid=PD9812000 + if [ $? = 0 ]; + then + mv /system/etc/nam/*MCLK.txt /system/etc/soundimage/ + mv /system/etc/nam/CodecDSPID.txt /system/etc + mv /system/etc/nam/gps.conf /system/etc + fi + rm -R /system/etc/nam +fi diff --git a/products/common.mk b/products/common.mk index a78c37ce..64a02685 100644 --- a/products/common.mk +++ b/products/common.mk @@ -58,7 +58,7 @@ include vendor/cyanogen/products/themes_common.mk PRODUCT_COPY_FILES += \ vendor/cyanogen/prebuilt/common/bin/backuptool.sh:system/bin/backuptool.sh \ - vendor/cyanogen/prebuilt/common/bin/chkkineto.sh:system/bin/chkkineto.sh \ + vendor/cyanogen/prebuilt/common/bin/modelid_cfg.sh:system/bin/modelid_cfg.sh \ vendor/cyanogen/prebuilt/common/bin/verify_cache_partition_size.sh:system/bin/verify_cache_partition_size.sh \ vendor/cyanogen/prebuilt/common/etc/resolv.conf:system/etc/resolv.conf \ vendor/cyanogen/prebuilt/common/etc/sysctl.conf:system/etc/sysctl.conf \