WiFiAnalyzer is an Android application for analyzing WiFi networks. It helps users:
- Identify nearby Access Points
- Graph channel signal strength
- Analyze Wi-Fi networks to rate channels
- Support 2.4 GHz, 5 GHz and 6 GHz Wi-Fi bands
- Export access point details
Important: WiFiAnalyzer is NOT a Wi-Fi password cracking or phishing tool.
| Component | Technology |
|---|---|
| Language | Kotlin |
| Platform | Android |
| Build Tool | Gradle |
| Testing | JUnit, Mockito, Robolectric, Espresso |
| Code Style | ktlint |
| License | GNU General Public License v3.0 (GPLv3) |
clearAdditional repository-specific versions and toolchain (source-of-truth files shown):
- Kotlin: 2.3.20 (top-level
build.gradleext.kotlin_version) - Android Gradle Plugin (AGP): 9.1.1 (top-level
build.gradleclasspathcom.android.tools.build:gradle:9.1.1) - Note: the top-level
build.gradlealso addsgradlePluginPortal()to repositories and includes additional classpath entries used by the build:org.jetbrains.kotlin:kotlin-allopen:$kotlin_versioncom.github.ben-manes:gradle-versions-plugin:0.53.0
- Gradle wrapper: 9.4.1 (
gradle/wrapper/gradle-wrapper.propertiesdistributionUrl) - JDK: 21 is used in CI and repository setup (
.github/actions/common-setup/action.ymland.github/workflows/*use setup-java withjava-version: 21). Note: projectcompileOptionsandkotlinOptions.jvmTargetare set to Java 17 inapp/build.gradle. - Android compile/target SDK: compileSdk = 36, minSdk = 24 (see
app/build.gradle).
app/src/main/kotlin/ # Main application source code
app/src/test/kotlin/ # Unit tests
app/src/androidTest/kotlin/ # Android instrumentation tests
All source files must include the GPLv3 license header:
/*
* WiFiAnalyzer
* Copyright (C) 2015 - {current_year} VREM Software Development <VREMSoftwareDevelopment@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/- Use descriptive names for classes, methods, and variables
- Follow Kotlin naming conventions: camelCase for variables/methods, PascalCase for classes
Use ktlint for code formatting:
- Check:
./gradlew ktlintCheck - Format:
./gradlew ktlintFormat
Repository-specific ktlint notes:
- Plugin configured in
app/build.gradleasorg.jlleitschuh.gradle.ktlint(version14.2.0). - Baseline and rules: see
app/config/ktlint/baseline.xmland project.editorconfigfor formatting rules.
All new features and bug fixes MUST include unit tests.
Test files use several patterns, including but not limited to:
[ClassName]Test.kt[ClassName]InstrumentedTest.kt[ClassName]IntegrationTest.kt[ClassName]ParameterizedTest.kt[ClassName]TestUtil.kt
Use the pattern that best describes the test's purpose. Document any deviations from these patterns in your code or pull request to maintain clarity.
@Test
fun shouldReturnCorrectVersionNumber() {
// Arrange: Set up test data and mocks
// Act: Execute the code being tested
// Assert: Verify the results
}// Example imports for test files:
import org.mockito.kotlin.mock
import org.mockito.kotlin.verify
import org.mockito.kotlin.whenever// Example imports for assertions:
import org.assertj.core.api.Assertions.assertThat
assertThat(actual).isEqualTo(expected)
assertThat(actual).isTrue
assertThat(actual).isNotNull()Test teardown pattern:
@After
fun tearDown() {
verifyNoMoreInteractions(dependency1, dependency2)
}Robolectric for Android components (use RobolectricUtil helper):
import com.vrem.wifianalyzer.RobolectricUtil
private val mainActivity = RobolectricUtil.INSTANCE.activity
// For fragments:
RobolectricUtil.INSTANCE.startFragment(fragment)- Instrumentation test files are located in
app/src/androidTest/kotlin/. - File names typically follow the pattern
[ClassName]InstrumentedTest.kt. - Use the
@RunWith(AndroidJUnit4::class)annotation for instrumentation tests. - Access UI components using Espresso or Robolectric as appropriate.
- Example instrumentation test structure:
@RunWith(AndroidJUnit4::class)
class MainActivityInstrumentedTest {
@Test
fun shouldDisplayMainScreen() {
// Arrange: Launch activity
// Act: Interact with UI
// Assert: Verify UI state
}
}| Task | Command |
|---|---|
| Check code style | ./gradlew ktlintCheck |
| Format code | ./gradlew ktlintFormat |
| Run lint | ./gradlew lintDebug |
| Run unit tests | ./gradlew testDebugUnitTest |
| Run tests with coverage | ./gradlew jacocoTestCoverageVerification |
| Run instrumented tests | ./gradlew connectedDebugAndroidTest |
-
Workflows:
.github/workflows/android-ci.yml— main Android CI pipeline (jobs: ktlint, lint, test, coverage, build-apk, emulator-test). Runners useubuntu-24.04/ubuntu-latestand a composite action.github/actions/common-setupto install JDK 21 and Gradle..github/workflows/codeql-analysis.yml— CodeQL analysis (language:java-kotlin, uses JDK 21).
-
Important CI details and artifact/report locations (useful for reproducing or debugging locally):
- ktlint report:
app/build/reports/ktlint(CI uploads asktlint-report). - lint report:
app/build/reports/lint-results*.*(CI uploads aslint-report). - unit test reports:
app/build/reports/tests(CI uploads astest-results). The unit test task invoked is:app:testDebugUnitTest/./gradlew testDebugUnitTest. - JaCoCo report (CI expects the XML):
app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml(uploaded to Codecov usingsecrets.CODECOV_TOKEN). - APK artifact:
app/build/outputs/apk/debug(uploaded asartifact-apk). - Instrumentation / emulator test outputs:
app/build/reports/androidTestsandapp/build/outputs/androidTest-results/connected/**/*.xmlfor JUnit XMLs.
- ktlint report:
-
Emulator job notes: the GitHub Action enables KVM, caches AVD (
~/.android/avd/*) and runs./gradlew connectedDebugAndroidTest. Emulator caching and KVM are required for theemulator-testjob inandroid-ci.yml.
- No Data Collection: WiFiAnalyzer does not collect any personal/device information
- No Internet: The app does not require internet access
- Minimal Permissions: Use only necessary Android permissions
- No Secrets: Never commit API keys, passwords, or other secrets