Skip to content

Commit

Permalink
update script logic
Browse files Browse the repository at this point in the history
Thx for lphgor
  • Loading branch information
simonsmh authored Feb 5, 2020
1 parent 95fac12 commit 6aa98d2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions customize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;}

0 comments on commit 6aa98d2

Please sign in to comment.