summaryrefslogtreecommitdiffstats
path: root/prebuilt/common/bin/modelid_cfg.sh
blob: b4e925238e901e19698195d2acc6bf88e3d894d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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