From 6aa98d29c6f2501ae4ea5a7a957bb6bccc055fa8 Mon Sep 17 00:00:00 2001 From: Simon Shi Date: Thu, 6 Feb 2020 00:46:41 +0800 Subject: [PATCH] update script logic Thx for lphgor --- customize.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/customize.sh b/customize.sh index 20655b6..9968224 100644 --- a/customize.sh +++ b/customize.sh @@ -7,10 +7,7 @@ mkdir -p `dirname $MODPATH$CFG` ui_print "- Migrating $CFG" [[ -f /sbin/.magisk/mirror$SELECTPATH ]] && cp -af /sbin/.magisk/mirror$SELECTPATH $MODPATH$SELECTPATH || cp -af $SELECTPATH $MODPATH$SELECTPATH ui_print "- Starting modifiy" -sed -i 's/gChannelBondingMode24GHz=0/gChannelBondingMode24GHz=1/g;s/gChannelBondingMode5GHz=0/gChannelBondingMode5GHz=1/g;s/#gChannelBondingMode24GHz=1/gChannelBondingMode24GHz=1/g;s/#gChannelBondingMode5GHz=1/gChannelBondingMode5GHz=1/g;s/gForce1x1Exception=1/gForce1x1Exception=0/g;s/#gForce1x1Exception=0/gForce1x1Exception=0/g' $MODPATH$SELECTPATH -[[ -z $(grep -v "^#" $MODPATH$SELECTPATH | grep gChannelBondingMode24GHz) ]] && sed -i 's/^END$/gChannelBondingMode24GHz=1\nEND/g' $MODPATH$SELECTPATH -[[ -z $(grep -v "^#" $MODPATH$SELECTPATH | grep gChannelBondingMode5GHz) ]] && sed -i 's/^END$/gChannelBondingMode5GHz=1\nEND/g' $MODPATH$SELECTPATH -[[ -z $(grep -v "^#" $MODPATH$SELECTPATH | grep gForce1x1Exception) ]] && sed -i 's/^END$/gForce1x1Exception=0\nEND/g' $MODPATH$SELECTPATH +sed -i '/gChannelBondingMode24GHz=/d;/gChannelBondingMode5GHz=/d;/gForce1x1Exception=/d;s/^END$/gChannelBondingMode24GHz=1\ngChannelBondingMode5GHz=1\ngForce1x1Exception=0\nEND/g' $MODPATH$SELECTPATH } done [[ -z $SELECTPATH ]] && abort "- Installation FAILED. Your device didn't support WCNSS_qcom_cfg.ini." || { mkdir -p $MODPATH/system; mv -f $MODPATH/vendor $MODPATH/system/vendor;}