Web UI for LTE/NR band locking on Qualcomm devices via Network Signal Guru (NSG).
Provides a web-based interface to enable/disable specific LTE and NR (5G) bands on Android devices with Qualcomm modems. Useful for:
- Avoiding problematic bands that cause connection drops
- Locking to specific bands for testing
- Optimizing signal quality by disabling weak bands
- Web UI (Python HTTP server on
localhost:8080) - Backend writes to NSG's
force_qualcomm.xmlconfiguration - NSG applies band configuration to modem via diag interface
- Modem remembers band preferences in NV items (persists across reboots)
| Feature | Status |
|---|---|
| Web UI reads band config | ✅ Working |
| Web UI writes band config | ✅ Working |
| NSG applies bands | ✅ Working |
| Config persists reboot | ✅ Working |
| Web server auto-starts | ✅ Working |
| NSG dependency | |
| Band enforcement verified |
23:39:10.701 - initialized /dev/diag,5,1
NSG opens diag and maintains session. No "stop" or "cleanup" messages — diag stays active.
Multiple processes hold /dev/diag open:
- audioserver
- bluetooth
- system
- root (NSG)
- LTE bands enabled: 1, 2, 3, 4, 5, 8, 12, 17, 20, 28, 38, 40, 41
- LTE bands disabled: 6, 7, 66 (problematic bands)
- NR bands enabled: 1, 3, 5, 8, 20, 28, 38, 41, 77, 78
- NR bands disabled: 7, 66
- Rooted Android device with KernelSU
- Network Signal Guru (NSG) installed
- Termux installed (for Python)
adb push module /data/adb/modules/bandctl
adb shell "chmod -R 755 /data/adb/modules/bandctl"adb shell "nohup /data/data/com.termux/files/usr/bin/python3 /data/adb/modules/bandctl/web/server.py > /dev/null 2>&1 &"Open http://localhost:8080 on the phone (or use adb forward tcp:8080 tcp:8080 from Mac).
curl http://localhost:8080/api/read?action=readResponse: {"lte":["1","2","3",...],"nr":["77","1","78",...]}
curl -X POST -H 'Content-Type: application/json' \
-d '{"lte":["1","2","3","4","5","8","12","17","20","28","38","40","41"],"nr":["77","1","78","3","5","38","28","8","41","20"]}' \
http://localhost:8080/api/write?action=write- Web UI writes to
/data/data/com.qtrun.QuickTest/shared_prefs/force_qualcomm.xml - Web UI force-stops NSG:
am force-stop com.qtrun.QuickTest - Web UI relaunches NSG:
am start -n com.qtrun.QuickTest/com.qtrun.nsg.LauncherActivity - NSG reads config, opens diag, applies band preferences to modem
Important: TEST_ACTION broadcast stops NSG, doesn't restart it. Always use force-stop + relaunch.
Bands are encoded as a 64-bit bitmask:
- Bit 0 = Band 1
- Bit 1 = Band 2
- ...
- Bit 65 = Band 66
Example: Bands 1, 2, 3 = 0x0000000000000007
- NSG dependency: Requires NSG installed for modem communication
- Band enforcement unverified: Only B4/B12 visible in test area, cannot confirm disabled bands are rejected
- NV persistence assumed: Modem likely stores band prefs in NV 06828, but not directly confirmed
- Build standalone diag tool (remove NSG dependency)
- Verify band enforcement in area with disabled bands
- Confirm NV persistence across power cycles
- Add NR band control to web UI
MIT