diff --git a/README.md b/README.md index c534bf1..f6b5ddc 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ Double your bandwith on your Qualcomm devices! -在「高通设备」上以40Mhz运行2.4Ghz/5.0Ghz的Wifi。 +高通设备 WiFi 增强模块。 ## Details 细节 -By default, some devices provided an ini file to control the wifi behavior. This module modified the `WCNSS_qcom_cfg.ini` in order to support 40mhz. +By default, some devices provided an ini file to control the WiFi behavior. This module modified the `WCNSS_qcom_cfg.ini` in order to support 40mhz. -默认情况下,某些设备提供了一个ini文件来控制wifi行为,该模块修改了`WCNSS_qcom_cfg.ini`以支持40MHz。 +默认情况下,某些设备提供了一个ini文件来控制 WiFi 行为,该模块修改了`WCNSS_qcom_cfg.ini`以支持40MHz。 - Make 2.4Ghz/5Ghz WiFi running at 40Mhz enabled. 开启 40Mhz WiFi 支持。 ``` @@ -26,6 +26,11 @@ gForce1x1Exception=0 sae_enabled=1 ``` +- Disable BandCapability limits. 禁用频段适用限制。 +``` +BandCapability=0 +``` + This module should work on most of the devices. The basic logic is simple, but not all devices need such kind of module. If you can find `WCNSS_qcom_cfg.ini` in your system partition, please open an issue to report it to me; if you can't, this module won't work for you, including almost all Nexus/Pixel devices. 该模块可在大多数设备上使用。其逻辑很简单,但是并非所有设备都适用该模块。如果您可以在系统分区中找到`WCNSS_qcom_cfg.ini`,请创建 issue 告诉我。 如果不能,则该模块将对您的设备不起作用,包括几乎所有的 Nexus / Pixel 设备。 @@ -34,32 +39,31 @@ This module should work on most of the devices. The basic logic is simple, but n Please follow the instuction below from @axeldna: 请按照说明进行操作 -1. Removed the installed Wifi Bonding module. -移除已安装了的WIFI Bonding模块。 -2. Removed all saved wifi 2.4Ghz networks (I removed all of them anyway, but shouldn't be necessary) . -移除所有已保存的2.4Ghz的Wifi(非必要) -3. Rebooted the phone (to make sure wifi settings are removed from cloud account too). -重启手机(以确保从云服务中删除相关的Wifi设置项)。 -4. Installed the Wifi Bonding module. 安装Wifi Bonding模块。 +1. Removed the installed WiFi Bonding module. +移除已安装了的WiFi Bonding模块。 +2. Removed all saved WiFi 2.4Ghz networks (I removed all of them anyway, but shouldn't be necessary) . +移除所有已保存的2.4Ghz的WiFi(非必要) +3. Rebooted the phone (to make sure WiFi settings are removed from cloud account too). +重启手机(以确保从云服务中删除相关的WiFi设置项)。 +4. Installed the WiFi Bonding module. 安装WiFi Bonding模块。 5. Rebooted the phone (as indicated by Magisk to start the module). 重启手机(根据Magisk指示来重启)。 -6. With a phone "free of wifi" and with a fresh Wifi Bonding module, I joined 2.4Ghz wifi networks. -试着开始接入2.4Ghz的Wifi。 +6. With a phone "free of WiFi" and with a fresh WiFi Bonding module, I joined 2.4Ghz WiFi networks. +试着开始接入2.4Ghz的WiFi。 7. Checked my newly registered 2.4Ghz networks and they are showing 150Mbps Link Speed. -自测新连上的2.4Ghz的Wifi有150Mbps的连接速度。 +自测新连上的2.4Ghz的WiFi有150Mbps的连接速度。 8. On some MTK solution AP, they are showing 300Mbps Link Speed. -连接一些联发科路由的Wifi有300Mbps的连接速度。 +连接一些联发科路由的WiFi有300Mbps的连接速度。 ## NOTICE 小贴士 * 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. 您应该使用最新的Magisk Manager来安装此模块。如果您在Magisk Manager中安装模块遇到问题,请尝试使用Recovery来安装 * Recent fixes: - -Update for magisk tmpfs location changes. +Support Magisk Canary(26404). +Fix path detection for old devices. ## Credit & Support 版权及支持 -* Copyright (C) 2017-2020 simonsmh * Any issue or pull request is welcomed. 欢迎提交 issue 以及 Pull Request * Star this module at [GitHub](https://github.com/Magisk-Modules-Repo/wifi-bonding) 欢迎点亮项目小星星 diff --git a/customize.sh b/customize.sh index 232f15d..256528d 100644 --- a/customize.sh +++ b/customize.sh @@ -1,14 +1,23 @@ -[ -x "$(which magisk)" ] && MIRRORPATH=$(magisk --path)/.magisk/mirror || unset MIRRORPATH -array=$(find /system /vendor /product /system_ext -name WCNSS_qcom_cfg.ini) -for CFG in $array +if [ "$MAGISK_VER_CODE" -lt 24000 ]; then +ui_print "*********************************************************" +ui_print "! Please install Magisk v24+" +abort "*********************************************************" +fi +[ -x "$(which magisk)" ] && CMDPREFIX="magisk --denylist exec" || unset CMDPREFIX +CHECK_DIRS="/system /vendor /product /system_ext" +EXISTING_DIRS="" +for dir in $CHECK_DIRS; do +[[ -d "$dir" ]] && EXISTING_DIRS="$EXISTING_DIRS $dir" +done +CFGS=$($CMDPREFIX find $EXISTING_DIRS -type f -name WCNSS_qcom_cfg.ini) +for CFG in $CFGS do -[[ -f $CFG ]] && [[ ! -L $CFG ]] && { -SELECTPATH=$CFG +[[ -f $CFG ]] && { mkdir -p `dirname $MODPATH$CFG` -ui_print "- Migrating $MIRRORPATH$SELECTPATH" -cp -af $MIRRORPATH$SELECTPATH $MODPATH$SELECTPATH +ui_print "- Migrating $CFG" +$CMDPREFIX cp -af $CFG $MODPATH$CFG ui_print "- Starting modifiy" -sed -i '/gChannelBondingMode24GHz=/d;/gChannelBondingMode5GHz=/d;/gForce1x1Exception=/d;/sae_enabled=/d;s/^END$/gChannelBondingMode24GHz=1\ngChannelBondingMode5GHz=1\ngForce1x1Exception=0\nsae_enabled=1\nEND/g' $MODPATH$SELECTPATH +sed -i '/gChannelBondingMode24GHz=/d;/gChannelBondingMode5GHz=/d;/gForce1x1Exception=/d;/sae_enabled=/d;/BandCapability=/d;s/^END$/gChannelBondingMode24GHz=1\ngChannelBondingMode5GHz=1\ngForce1x1Exception=0\nsae_enabled=1\nBandCapability=0\nEND/g' $MODPATH$CFG } 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; mv -f $MODPATH/product $MODPATH/system/product; mv -f $MODPATH/system_ext $MODPATH/system/system_ext;} +[[ -z $CFG ]] && abort "- Installation FAILED. Your device didn't support WCNSS_qcom_cfg.ini." || { mkdir -p $MODPATH/system; mv -f $MODPATH/vendor $MODPATH/system/vendor; mv -f $MODPATH/product $MODPATH/system/product; mv -f $MODPATH/system_ext $MODPATH/system/system_ext;} diff --git a/module.prop b/module.prop index e6b4db1..3e52560 100644 --- a/module.prop +++ b/module.prop @@ -1,7 +1,7 @@ id=wifi-bonding name=Wifi Bonding (Qcom) -version=1.15 -versionCode=16 +version=1.16 +versionCode=17 author=simonsmh description=Doubles your wi-fi bandwith by modifying WCNSS_qcom_cfg.ini. updateJson=https://cdn.jsdelivr.net/gh/Magisk-Modules-Repo/wifi-bonding/version.json diff --git a/version.json b/version.json index 674b455..7d29ae8 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { - "version": "1.15", - "versionCode": 16, - "zipUrl": "https://github.com/Magisk-Modules-Repo/wifi-bonding/releases/download/16/wifi_bonding.zip", + "version": "1.16", + "versionCode": 17, + "zipUrl": "https://github.com/Magisk-Modules-Repo/wifi-bonding/releases/download/17/wifi_bonding.zip", "changelog": "https://cdn.jsdelivr.net/gh/Magisk-Modules-Repo/wifi-bonding/README.md" }