Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsmh committed Dec 14, 2017
1 parent 62f5dde commit 99191c3
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
37 changes: 24 additions & 13 deletions META-INF/com/google/android/update-binary
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,32 @@ $POSTFSDATA && cp -af $INSTALLER/common/post-fs-data.sh $MODPATH/post-fs-data.sh
# service mode scripts
$LATESTARTSERVICE && cp -af $INSTALLER/common/service.sh $MODPATH/service.sh

WCNSS_qcom_cfg_Migration(){
if [ -f /dev/magisk/mirror/system/etc/wifi/WCNSS_qcom_cfg.ini ]; then
rm -f $MODPATH/vendor/system/etc/wifi/WCNSS_qcom_cfg.ini
cp -af /dev/magisk/mirror/system/etc/wifi/WCNSS_qcom_cfg.ini $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini
elif [ -f /dev/magisk/mirror/system/vendor/etc/wifi/WCNSS_qcom_cfg.ini ]; then
rm -f $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini
cp -af /system/vendor/etc/wifi/WCNSS_qcom_cfg.ini $MODPATH/vendor/system/etc/wifi/WCNSS_qcom_cfg.ini
fi
sed -i 's/gChannelBondingMode24GHz=0/gChannelBondingMode24GHz=1/g;s/gChannelBondingMode5GHz=0/gChannelBondingMode5GHz=1/g' $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini
if [ -z $(grep gChannelBondingMode24GHz $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini) ]; then
sed -i 's/^END$/gChannelBondingMode24GHz=1\nEND/g' $MODPATH$CFGPATH
fi
if [ -z $(grep gChannelBondingMode5GHz $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini) ]; then
sed -i 's/^END$/gChannelBondingMode5GHz=1\nEND/g' $MODPATH$CFGPATH
fi
}

ui_print "- Migrating WCNSS_qcom_cfg.ini "
if [ -f "/system/etc/wifi/WCNSS_qcom_cfg.ini" -o -f "/dev/magisk/mirror/system/etc/wifi/WCNSS_qcom_cfg.ini" ]; then
if [ -f /system/etc/wifi/WCNSS_qcom_cfg.ini ]; then
CFGPATH = /system/etc/wifi/WCNSS_qcom_cfg.ini
mkdir -p $MODPATH/system/etc/wifi/
if [ -f /dev/magisk/mirror/system/etc/wifi/WCNSS_qcom_cfg.ini ]; then
cp -af /dev/magisk/mirror/system/etc/wifi/WCNSS_qcom_cfg.ini $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini
else
cp -af /system/etc/wifi/WCNSS_qcom_cfg.ini $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini
fi
sed -i 's/gChannelBondingMode24GHz=0/gChannelBondingMode24GHz=1/g;s/gChannelBondingMode5GHz=0/gChannelBondingMode5GHz=1/g' $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini
if [ -z "$(grep gChannelBondingMode24GHz $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini)" ]; then
sed -i 's/^END$/gChannelBondingMode24GHz=1\nEND/g' $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini
fi
if [ -z "$(grep gChannelBondingMode5GHz $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini)" ]; then
sed -i 's/^END$/gChannelBondingMode5GHz=1\nEND/g' $MODPATH/system/etc/wifi/WCNSS_qcom_cfg.ini
fi
WCNSS_qcom_cfg_Migration
elif [ -f /system/vendor/etc/wifi/WCNSS_qcom_cfg.ini ]; then
CFGPATH = /system/vendor/etc/wifi/WCNSS_qcom_cfg.ini
mkdir -p $MODPATH/vendor/system/etc/wifi/
WCNSS_qcom_cfg_Migration
else
ui_print "- Migration FAILED"
fi
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Make 40Mhz runing at 2.4Ghz/5Ghz on your Qualcomm devices!

* You should use latest Magisk Manager to install this module. If you meet any problem under installation from Magisk Manager, please try to install it from recovery.
* Recent fixes:
Fix devices with some missing tiles.
Fix devices with vendor separated.

#### Credit & Support

Expand Down
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=wifi-bonding
name=Wifi Bonding (Qualcomm)
version=1.1
versionCode=2
version=1.2
versionCode=3
author=simonsmh
description=Make 2.4Ghz/5Ghz WiFi runing on 40Mhz on your Qualcomm devices.
template=1400

0 comments on commit 99191c3

Please sign in to comment.