1. Implementing the Functionality of adb root
To disable powersave, you need to modify the following parameters in WCNSS_qcom_cfg.ini. Additionally, use `adb root` for accessing necessary permissions.
Code language: JavaScript
gEnableImps=0gEnableBmps=0
If it doesn’t work, then add the following two parameters:
Code language: JavaScript
gEnablePowerSaveOffload=0gAutoBmpsTimerValue=0
Steps: #1. adb root; adb remount #2. adb pull /vendor/etc/wifi/WCNSS_qcom_cfg.ini ~/ #3. Pull the file to the computer to modify the parameters, then use the command from step three to push it back to the phone #4. adb push WCNSS_qcom_cfg.ini /vendor/etc/wifi/ #5. adb reboot to restart the phone
2. Verification of adb root
1) Verify whether the modified parameters have taken effect
#1. Open WiFi #2. adb shell iwpriv wlan0 getConfig #3. adb shell dmesg > ~/dmesg.txt Check whether the modified parameter values in WCNSS_qcom_cfg.ini are correct
Place the iwpriv tool in the phone’s system/xbin directory
2) Verify whether powersave is enabled
1. Capture 802.11 protocol packets and check for the following fields:
After enabling, packet capture can show the NULL data PM=1 or 0 setting. When it equals 1, the STA sleeps, and the AP caches data packets for the STA. When it’s 0, the AP is notified that the STA is awake to receive packets. If disabled, the STA’s NULL data PM remains 0, staying awake for a long time.
…1 … = PWR MGT: STA will go to sleep
If the following field is present, it indicates that powersave is enabled. This is the behavior of powersave, where it continuously switches between sleeping and waking when powersave is on.
2. Packet capture can be done using WireShark
Code language: JavaScript
sudo apt-get install aircrack-ng wireshark libcap2-bin sudo airmon-ng start wlan0