summaryrefslogtreecommitdiffstats
path: root/prebuilt/common/bin/modelid_cfg.sh
diff options
context:
space:
mode:
Diffstat (limited to 'prebuilt/common/bin/modelid_cfg.sh')
-rw-r--r--prebuilt/common/bin/modelid_cfg.sh70
1 files changed, 70 insertions, 0 deletions
diff --git a/prebuilt/common/bin/modelid_cfg.sh b/prebuilt/common/bin/modelid_cfg.sh
new file mode 100644
index 0000000..b4e9252
--- /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