Skip to content

Commit

Permalink
Support magisk canary
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsmh committed Jan 17, 2024
1 parent 2346d89 commit 4c8f35f
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 31 deletions.
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 支持。
```
Expand All @@ -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 设备。
Expand All @@ -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 <[email protected]>
* Any issue or pull request is welcomed. 欢迎提交 issue 以及 Pull Request
* Star this module at [GitHub](https://github.com/Magisk-Modules-Repo/wifi-bonding) 欢迎点亮项目小星星
27 changes: 18 additions & 9 deletions customize.sh
Original file line number Diff line number Diff line change
@@ -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;}
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 (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
6 changes: 3 additions & 3 deletions version.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 4c8f35f

Please sign in to comment.