NetSense is an Android application for collecting and analyzing cellular network data from LTE, 5G (NR), and legacy networks (GSM, WCDMA, CDMA, TD-SCDMA). The app enables researchers and network engineers to monitor cell tower information, detect potential fake base stations, and analyze mobile network performance.
- Multi-Network Support: Collects data from LTE, 5G NR, GSM, WCDMA, CDMA, and TD-SCDMA networks
- Real-Time Monitoring: Displays live cell tower information with automatic 3-second refresh intervals
- Cell Classification: Categorizes cells as Serving (primary), Secondary (carrier aggregation), or Neighboring
- Background Collection: Foreground service continues data collection when the app is backgrounded
- Data Export: Export collected data to CSV format for offline analysis
- Comprehensive Metrics: Captures signal strength, frequency, bandwidth, cell IDs, and network identifiers
- Android Studio: Arctic Fox or later recommended
- Kotlin: 1.9.24+
- Android Device: Physical device running Android 7.0 (API 24) or later with cellular connectivity
- Permissions: The app requires the following permissions:
ACCESS_FINE_LOCATION(required for Android 10+)ACCESS_COARSE_LOCATIONREAD_PHONE_STATEACCESS_BACKGROUND_LOCATION(Android 10+ for background collection)POST_NOTIFICATIONS(Android 13+ for foreground service notification)
- Clone the repository:
git clone <repository-url>
- Open the project in Android Studio.
- Sync the project to download dependencies.
- Build and run the app on a physical Android device (emulators may not support cellular data collection).
The app collects the following network metrics:
| Network Type | Parameter | Description |
|---|---|---|
| LTE | RSRP (Reference Signal Received Power) | Measures signal strength |
| RSRQ (Reference Signal Received Quality) | Measures signal quality | |
| SINR (Signal-to-Interference-plus-Noise Ratio) | Measures signal-to-noise ratio | |
| ECI, eNB, CID, TAC, PCI | Cell identification parameters | |
| Frequency, Bandwidth | Operating frequency and bandwidth | |
| 5G NR | SS-RSRP, SS-RSRQ, SS-SINR | Synchronization Signal metrics |
| CSI-RSRP, CSI-RSRQ, CSI-SINR | Channel State Information metrics | |
| NR-ARFCN | New Radio frequency channel number | |
| PCI (Physical Cell ID) | Cell tower identifier | |
| General | MCC (Mobile Country Code) | Country identifier |
| MNC (Mobile Network Code) | Network operator identifier | |
| Cell ID | Unique cell tower identifier | |
| Connection Status | Serving, Secondary, or Neighboring | |
| Signal Strength (RSSI) | Overall signal strength |
The app follows MVVM architecture with the following components:
- MainActivity: Single-activity host managing permissions and fragment navigation
- BackgroundService: Foreground service for continuous data collection
- CellInfoFragment: Real-time cell data visualization in a scrollable list
- CellLoggerFragment: Tabular view with export and data management features
- CellInfoViewModel: Core data collection logic using NetMonster library with Android API fallback
- Room Database: Persistent storage with CellInfoEntity and CellInfoDao
- CellDataCache: In-memory cache for real-time display performance
- The app uses the NetMonster library as the primary data source, with fallback to Android's native TelephonyManager APIs
- Cell data is collected every 3 seconds using a polling-based approach
- Data is cached in memory for real-time display and can be persisted to SQLite via Room
- A foreground service ensures continuous collection even when the app is in the background
- Users can export collected data to CSV format for offline analysis
- Launch the app on a physical Android device
- Grant the required permissions (location, phone state, notifications)
- The app will automatically start collecting cell data
- Cell Info Tab: View real-time cell tower information in a scrollable list
- Serving cells (primary connection) are displayed with their associated neighboring cells
- Data refreshes automatically every 3 seconds
- Cell Logger Tab: View collected data in a table format
- Use Export Data to save data as CSV to the Documents folder
- Use Delete Old Data to clear all cached cell information
- The app continues collecting data in the background via a foreground service notification
- Language: Kotlin 1.9.24
- Min SDK: API 24 (Android 7.0 Nougat)
- Target SDK: API 36 (Android 15)
- Architecture: MVVM with ViewBinding
- Database: Room 2.6.1
- UI: Material Design 3, RecyclerView, Navigation Component
- Lifecycle: ViewModel, LiveData 2.8.7
This project uses the NetMonster Library for collecting and processing cell tower data. Special thanks to Michal Mroček and the NetMonster team for providing a comprehensive tool for network information analysis.
The NetMonster Library is licensed under the Apache License 2.0.
- Fork the repository
- Create a new branch:
git checkout -b feature-name
- Commit your changes and push the branch:
git push origin feature-name
- Submit a pull request
This project is licensed under the MIT License.
For any issues or feature requests, please open an issue in the repository.