-
Notifications
You must be signed in to change notification settings - Fork 1
/
custom_app.sh
executable file
·26 lines (19 loc) · 1.48 KB
/
custom_app.sh
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
#!/bin/bash
apkBaseName=$1
tempSmaliDir=$2
if [ "$apkBaseName" = "Keyguard" ];then
echo ">>> in custom_app for $apkBaseName to adjust the field IccCardConstants$State;->NETWORK_LOCKED with IccCardConstants$State;->PERSO_LOCKED"
find $tempSmaliDir/ -name "*.smali" | xargs sed -i 's#IccCardConstants$State;->NETWORK_LOCKED#IccCardConstants$State;->PERSO_LOCKED#g'
elif [ "$apkBaseName" = "SystemUI" ];then
echo ">>> in custom_app for $apkBaseName to adjust the field IccCardConstants$State;->NETWORK_LOCKED with IccCardConstants$State;->PERSO_LOCKED"
find $tempSmaliDir/ -name "*.smali" | xargs sed -i 's#IccCardConstants$State;->NETWORK_LOCKED#IccCardConstants$State;->PERSO_LOCKED#g'
elif [ "$apkBaseName" = "TelephonyProvider" ];then
echo ">>> in custom_app for $apkBaseName to adjust the interface "getAllMessagesFromIcc" with "getAllMessagesFromIccExtended""
find $tempSmaliDir/ -name "*.smali" | xargs sed -i 's#invoke-static {}, Landroid\/telephony\/SmsManager;->getAllMessagesFromIcc()Ljava\/util\/ArrayList#invoke-static {}, Landroid\/telephony\/SmsManager;->getAllMessagesFromIccExtended()Ljava\/util\/ArrayList#g'
elif [ "$apkBaseName" = "Settings" ];then
echo ">>> in custom_app for $apkBaseName to remove some icons"
rm -rf $tempSmaliDir/res/drawable-hdpi-v4
elif [ "$apkBaseName" = "DownloadProviderUi" ];then
echo ">>> in custom_app for $apkBaseName to remove some icons"
rm -rf $tempSmaliDir/res/mipmap-hdpi-v4
fi