7 Star 25 Fork 2

代号9527/结界

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
uninstall.sh 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
代号9527 提交于 2021-01-05 22:51 . Update
#!/system/bin/sh
( sleep 20
#enable/disable/default-state
AD_Components=`dumpsys package --all-components | grep '/' | grep -iE "$Component_Keyword_Blacklist_D" | grep -viE "$Component_Keyword_Whitelist_E" | sed 's/.* //g;s/}//g;s/^\/.*//g' | sort -u`
if [[ "$AD_Components" != "" ]];then
for AD in $AD_Components;do
pm enable $AD >/dev/null 2>&1
done
fi
Add_ADActivity=`cat ${0} | sed -n '/^#Disable_Components_Start/,/#Disable_Components_End$/p' | awk '!/#/ {print $NF}' | sed 's/ //g'`
if [[ "$Add_ADActivity" != "" ]];then
for ADDAD in $Add_ADActivity;do
pm enable $ADDAD >/dev/null 2>&1
done
fi
data_storage=/data/data
media_storage=/data/media/0
find_ad_files=`find ${data_storage} ${media_storage} -type d -mindepth 1 -maxdepth 8 '(' -iname "ad" -o -iname "*.ad" -o -iname "ad.*" -o -iname "*.ad.*" -o -iname "*_ad" -o -iname "ad_*" -o -iname "*_ad_*" -o -iname "ad-*" -o -iname "ads" -o -iname "*.ads" -o -iname "ads.*" -o -iname "*.ads.*" -o -iname "*_ads" -o -iname "ads_*" -o -iname "*_ads_*" -o -iname "*adnet*" -o -iname "*splash*" -o -iname "*advertise*" ')' | grep -ivE 'rules|filter|block|white|mxtech'`
if [[ "$find_ad_files" != "" ]];then
for FADL in $find_ad_files;do
if [[ -d "$FADL" ]];then
chattr -R -i $FADL
chmod -R 775 $FADL
fi
done
fi
AD_FilesBlackList=`cat ${0} | sed -n '/^#Disable_Folder_Start/,/#Disable_Folder_End$/p' | awk '!/#/ {print $NF}' | sed 's/ //g'`
if [[ "$AD_FilesBlackList" != "" ]];then
for ADFL in $AD_FilesBlackList;do
if [[ -d "$ADFL" ]];then
chattr -R -i $ADFL
chmod -R 775 $ADFL
fi
done
fi
ad_miui_securitycenter=/data/data/com.miui.securitycenter/files
if [[ -e "$ad_miui_securitycenter" ]];then
[[ -f "$ad_miui_securitycenter/securityscan_homelist_cache" ]] && { chattr -i $ad_miui_securitycenter/securityscan_homelist_cache; rm -f $ad_miui_securitycenter/securityscan_homelist_cache; }
am force-stop 'com.miui.securitycenter'
fi
IFW=/data/system/ifw
if [[ -f "$IFW/AD_Components_Blacklist.xml" ]];then
rm -f $IFW/AD_Components_Blacklist.xml
fi
wait
exit )
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/coolapk-code_9527/border.git
git@gitee.com:coolapk-code_9527/border.git
coolapk-code_9527
border
结界
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385