-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom_app.sh
executable file
·25 lines (19 loc) · 1.13 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
#!/bin/bash
apkBaseName=$1
tempSmaliDir=$2
if [ "$apkBaseName" = "Settings" ];then
echo ">>> in custom_app $apkBaseName"
# Delete the unlock_set_baidu_space in security_settings_picker.xml
if [ -f $tempSmaliDir/res/xml/security_settings_picker.xml ];then
echo ">>> delete unlock_set_baidu_space line in $tempSmaliDir/res/xml/security_settings_picker.xml"
sed -i '/unlock_set_baidu_space/d' $tempSmaliDir/res/xml/security_settings_picker.xml
fi
# Remove the Official Verify Preference.
sed -i -e "/^\.method.*setOfficialVerifyPreference()V/,/^\.end method/d" $tempSmaliDir/smali/com/android/settings/DeviceInfoSettings.smali
#echo ">>> add origin settings"
#sed -i '/com.android.settings.ManageApplicationsSettings/r Settings/settings_headers.xml.part' $tempSmaliDir/res/xml/settings_headers.xml
#Add baidu romer
#echo ">>> add baidu romer"
#sed -i '/android:key="build_number"/r Settings/device_info_settings.xml.part' $tempSmaliDir/res/xml/device_info_settings.xml
#sed -i -e "/^\.method.*onCreate(Landroid\/os\/Bundle;)V/,/^\.end method/d" $tempSmaliDir/smali/com/android/settings/DeviceInfoSettings.smali
fi