A Kotlin-based Android application for scanning and exploring SMB (Server Message Block) network devices. This app allows users to discover SMB devices on their local network, browse shared folders, and download files to local storage.
- π SMB Device Scanning: Automatically discover SMB devices on the local network
- π± Material Design UI: Modern, intuitive user interface with Material Design components
- π Folder Navigation: Browse SMB shared folders with breadcrumb navigation
- πΎ File Downloads: Download files from SMB shares to local device storage
- π Permission Handling: Proper runtime permission requests for network and storage access
- π‘οΈ Error Handling: Comprehensive error handling with user-friendly messages
- π File Information: Display file sizes, modification dates, and types
- MainActivity: Main screen with device scanning and discovery
- FileBrowserActivity: SMB share browsing and file management
- SmbNetworkUtils: Network operations using jcifs-ng library
- Data Models:
SmbDeviceandSmbFilefor representing network resources - RecyclerView Adapters: For displaying device and file lists
- jcifs-ng: SMB/CIFS protocol implementation for Java/Kotlin
- AndroidX: Core Android Jetpack libraries
- Material Components: Google's Material Design components
- Kotlin Coroutines: Asynchronous programming support
- View Binding: Type-safe view references
- Android Studio Arctic Fox (2020.3.1) or newer
- Android SDK API 33
- Kotlin 1.8.10 or newer
- Gradle 7.4.2
- Target Android devices running API 24 (Android 7.0) or higher
-
Clone the Repository
git clone https://github.com/The3211/NetworkExplorer-Android.git cd NetworkExplorer-Android -
Open in Android Studio
- Launch Android Studio
- Click "Open an Existing Project"
- Navigate to the cloned repository folder
- Select the project and click "OK"
-
Sync Project
- Android Studio will automatically sync the project
- If not, click "Sync Project with Gradle Files" in the toolbar
-
Build the Project
./gradlew assembleDebug
-
Run on Device/Emulator
- Connect an Android device or start an emulator
- Click the "Run" button or use
./gradlew installDebug
The app requires the following permissions:
INTERNET: Required for SMB network communicationACCESS_NETWORK_STATE: Check network connectivityACCESS_WIFI_STATE: Access WiFi network information
READ_EXTERNAL_STORAGE: Read files from external storageWRITE_EXTERNAL_STORAGE: Download files to device storage (API β€ 28)READ_MEDIA_*: Media access permissions for Android 13+ (API 33+)
- Open the app and grant necessary permissions
- Tap "Scan for SMB Devices" button
- The app will scan the local network (typically 192.168.x.x range)
- Discovered devices will appear in the list
- Tap on any discovered SMB device
- Navigate through shared folders by tapping on directory items
- Use the back button or navigation to move up in the directory structure
- View file information including size, type, and modification date
- In the file browser, locate the file you want to download
- Tap the download button next to the file
- Monitor download progress in the dialog
- Files are saved to
Downloads/NetworkExplorer/folder
The app uses the following default SMB configurations (configurable in SmbNetworkUtils.kt):
// SMB Protocol versions
setProperty("jcifs.smb.client.minVersion", "SMB202")
setProperty("jcifs.smb.client.maxVersion", "SMB311")
// Timeouts
setProperty("jcifs.smb.client.responseTimeout", "5000")
setProperty("jcifs.smb.client.soTimeout", "5000")- Default port: 445 (SMB)
- Scan timeout: 3 seconds per device
- IP range: Automatically detected from local IP (assumes /24 subnet)
The codebase includes numerous TODO comments for future enhancements:
// TODO: Add support for authentication (username/password)
// TODO: Add support for different SMB versions (SMB1, SMB2, SMB3)// TODO: Implement more sophisticated network discovery
// TODO: Add support for mDNS/Bonjour discovery
// TODO: Add support for NetBIOS name resolution// TODO: Add support for file upload to SMB shares
// TODO: Add file operations (delete, rename, create folder)
// TODO: Add multi-select for batch downloads
// TODO: Add resume capability for interrupted downloads// TODO: Add search functionality within shares
// TODO: Add file preview capabilities
// TODO: Add download queue management
// TODO: Add device favorites/bookmarksapp/
βββ src/main/
β βββ java/com/networkexplorer/
β β βββ MainActivity.kt # Main activity with device scanning
β β βββ FileBrowserActivity.kt # SMB share browser
β β βββ adapter/
β β β βββ SmbDeviceAdapter.kt # Device list adapter
β β β βββ SmbFileAdapter.kt # File list adapter
β β βββ model/
β β β βββ SmbModels.kt # Data models
β β βββ utils/
β β βββ SmbNetworkUtils.kt # SMB network operations
β βββ res/
β β βββ layout/ # UI layouts
β β βββ values/ # Colors, strings, themes
β β βββ drawable/ # Icons and drawables
β βββ AndroidManifest.xml # App permissions and components
βββ build.gradle # Module build configuration
βββ proguard-rules.pro # ProGuard configuration
-
No devices found during scan
- Ensure you're on the same network as SMB devices
- Check that SMB devices have file sharing enabled
- Verify firewall settings on target devices
-
Connection failed
- SMB device may require authentication
- Network may block SMB traffic (port 445)
- Device may not support the SMB version being used
-
Download failures
- Check storage permissions
- Ensure sufficient device storage space
- Verify network connectivity stability
-
Build errors
- Ensure all dependencies are synced
- Check Android SDK installation
- Verify internet connection for dependency downloads
- Local network access (WiFi or Ethernet)
- SMB/CIFS enabled on target devices
- Port 445 accessible between devices
- No network firewalls blocking SMB traffic
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- The app currently supports guest access only
- Future versions should implement proper authentication
- Network scanning may be detected by security software
- SMB traffic is not encrypted by default (consider SMBv3)
This project is open source and available under the MIT License.
For issues, questions, or contributions, please use the GitHub issues page.
Note: This is a starter implementation designed for educational and development purposes. Production use should include additional security measures, authentication, and error handling.