Android app that automates captive portal login for institutional WiFi networks. Connects to the network gateway, fetches the login form, and submits credentials via HTTP.
- Automatic gateway discovery – Uses Android LinkProperties to detect the captive portal gateway IP from the network routing table
- Captive portal integration – Registers as a captive portal handler; Android can open the app when a portal is detected
- Background service – Periodic login attempts (every 30 minutes) when WiFixing is enabled
- Credential persistence – Username and password stored locally in SharedPreferences
- Debug logs – In-app log viewer (tap logo) with a 100-entry circular buffer
- Network status – Shows gateway IP, connection state, and captive portal detection
- Android 7.0+ (API 24)
- Android Studio or compatible IDE
- JDK 11
- Install Android Studio or the Android SDK command-line tools
- Set
ANDROID_HOMEor ensure the SDK is at the default location - Accept licenses:
sdkmanager --licenses
# Debug APK
./gradlew assembleDebug
# Release APK
./gradlew assembleRelease
# Install on connected device
./gradlew installDebug./gradlew test
./gradlew connectedAndroidTest./gradlew cleanapp/src/main/java/team/codialo/wifix/
├── MainActivity.kt
├── CaptivePortalActivity.kt
├── logic/
│ ├── login_logic.kt
│ └── WifiFixBackgroundService.kt
└── ui/
├── screens/
│ ├── home.kt
│ └── logs_modal.kt
└── theme/
The app targets captive portals that use the common form fields 4Tredir, magic, username, and password. Gateway discovery uses LinkProperties when available; otherwise it falls back to a known gateway (e.g. 172.16.222.1 for IIIT networks).
Portal URLs and query parameters may need adjustment for other networks. See login_logic.kt for the current endpoint format.
INTERNET– Login and connectivity checksACCESS_NETWORK_STATE– Network monitoringACCESS_WIFI_STATE– WiFi statusCHANGE_WIFI_STATE– Network refresh
GPL-3.0. See LICENSE for details. If you fork or modify this project, you must release your changes under the same license.