forked from baidurom/devices-u930
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom_jar.sh
executable file
·17 lines (12 loc) · 1.09 KB
/
custom_jar.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
jarBaseName=$1
tempSmaliDir=$2
if [ "$jarBaseName" = "android.policy" ];then
echo ">>> in custom_jar for android.policy"
echo ">>> remove method sendTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;I)V in baidu policy"
sed -i -e "/^\.method.*sendTextMessage(Ljava\/lang\/String;Ljava\/lang\/String;Ljava\/lang\/String;Landroid\/app\/PendingIntent;Landroid\/app\/PendingIntent;I)V/,/^\.end method/d" $tempSmaliDir/smali/android/telephony/BaiduSmsManager.smali
elif [ "$jarBaseName" = "framework-yi" ];then
echo ">>> in custom_jar for framework-yi"
echo "jarBaseName: $jarBaseName tempSmaliDir: $tempSmaliDir"
echo ">>> remove method sendTextMessage(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Landroid/app/PendingIntent;Landroid/app/PendingIntent;I)V in framework-yi"
sed -i -e "/^\.method.*sendTextMessage(Ljava\/lang\/String;Ljava\/lang\/String;Ljava\/lang\/String;Landroid\/app\/PendingIntent;Landroid\/app\/PendingIntent;I)V/,/^\.end method/d" $tempSmaliDir/smali/android/telephony/BaiduSmsManager.smali
fi