代码拉取完成,页面将自动刷新
apkBaseName=$1
tempSmaliDir=$2
if [ "$apkBaseName" = "SystemUI" ];then
echo ">>> in custom_app for $apkBaseName"
find $tempSmaliDir -name "*.smali" | xargs sed -i 's/com\/android\/internal\/statusbar\/StatusBarNotification/android\/service\/notification\/StatusBarNotification/g'
find $tempSmaliDir -name "*.smali" | xargs sed -i 's/Surface;->screenshot/SurfaceControl;->screenshot/g'
elif [ "$apkBaseName" = "Phone" ];then
echo ">>> in custom_app for $apkBaseName to add some permissions for android 4.3"
sed -i '/<original-package android:name="com.android.phone" \/>/a\<uses-permission android:name="android.permission.MANAGE_USERS" \/>\n\<uses-permission android:name="android.permission.UPDATE_APP_OPS_STATS" \/>\n\<uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" \/>' $tempSmaliDir/AndroidManifest.xml
echo ">>> in custom_app for $apkBaseName to change some permissions for android 4.3"
sed -i 's#android:name="android.permission.SEND_SMS_NO_CONFIRMATION"#android:name="android.permission.SEND_RESPOND_VIA_MESSAGE"#g' $tempSmaliDir/AndroidManifest.xml
elif [ "$apkBaseName" = "Contacts" ];then
echo ">>> in custom_app for $apkBaseName to remove AlwaysRunningService for android 4.3"
sed -i '/AlwaysRunningService/d' $tempSmaliDir/AndroidManifest.xml
echo ">>> in custom_app for $apkBaseName to change some permissions for android 4.3"
sed -i 's#android:permission="android.permission.SEND_SMS_NO_CONFIRMATION"#android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE"#g' $tempSmaliDir/AndroidManifest.xml
elif [ "$apkBaseName" = "Settings" ];then
echo ">>> in custom_app for $apkBaseName to add UsbSettings"
sed -i '/<\/application>/i\<activity android:theme="@*android:style\/Theme.DeviceDefault.Light" android:name="com.android.settings.deviceinfo.UsbSettings" android:clearTaskOnLaunch="true" android:screenOrientation="portrait">\n<intent-filter>\n<action android:name="android.intent.action.MAIN" \/>\n<action android:name="com.android.settings.USBSETTING" \/>\n<category android:name="android.intent.category.DEFAULT" \/>\n<\/intent-filter>\n<\/activity>\n' $tempSmaliDir/AndroidManifest.xml
echo ">>> add timed power_off"
sed -i '/com.android.settings.ManageApplicationsSettings/r Settings/settings_headers.xml.part' $tempSmaliDir/res/xml/settings_headers.xml
#elif [ "$apkBaseName" = "HomePro" ];then
# echo ">>> in custom_app for $apkBaseName"
# find $tempSmaliDir -name "default_workspace.xml" | xargs sed -i 's/className="com.baiyi_mobile.search.MainActivity" packageName="com.baiyi_mobile.search"/className="com.baidu.musicplayer.activity.MainFragmentActivity" packageName="com.baidu.musicplayer"/g' $tempSmaliDir/res/xml/default_workspace.xml
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。