This commit is contained in:
1 parent
9d6e59c285
commit
0f6adefcae
13 files changed
+799
-12
No files matched your search
@@ -1,25 +1,51 @@
|
||||
# SMB Explorer
|
||||
|
||||
Android 9+ SMB explorer. The first implementation is a Phase 0 compatibility probe for a real Samba share.
|
||||
An Android app for browsing SMB2/3 shares on a local network. It has a dark interface, encrypted saved connections, folder search and sorting, and an image viewer for photos and animated GIFs.
|
||||
|
||||
## Run the probe
|
||||
The app is under active development. See [PLAN.md](PLAN.md) for the planned file actions, video playback, and further performance work.
|
||||
|
||||
Open the project in Android Studio, or run `./gradlew assembleDebug` with a JDK and Android SDK configured. Install `app/build/outputs/apk/debug/app-debug.apk` on the Galaxy S24. Enter the NAS host, share, credentials, and an optional folder path. Enter a large file path relative to the share to test three 64 KiB reads at the beginning, middle, and end. The screen reports listing time, entry count, byte counts, and hashes; it does not save credentials or downloaded content.
|
||||
## What works now
|
||||
|
||||
Repeat after switching Wi-Fi off and back on. Record the Samba version, dialect, signing/encryption settings, Wi-Fi conditions, listing latency, and whether each range read succeeded. The probe opens a fresh connection for each run.
|
||||
- Save multiple SMB connections after testing them. Credentials are encrypted with a device-bound Android Keystore key; app backup is disabled.
|
||||
- Browse folders, use breadcrumbs, search the current folder, filter by file type, sort by name/date/size, and refresh a listing.
|
||||
- Open images and animated GIFs, then swipe through images in the same folder. The viewer reads at most 64 MB per file.
|
||||
- Reuse an SMB session while browsing, keep up to 20 recent folder listings in memory, and preload the next image in the viewer.
|
||||
|
||||
Use **Test & save** to authenticate, list the selected folder, and save the share. When shares are saved, the app opens to a compact share list. Tap a share to browse it, **Edit** to change its connection fields, or **Add share** to open the new connection form. **Remove** deletes a saved entry after confirmation. The connection list, including passwords, is encrypted with a device-bound Android Keystore key. App backup is disabled because the key cannot be restored on another device.
|
||||
Video playback, downloads, deletion, thumbnails, and offline files are not implemented yet. Other files currently show their details.
|
||||
|
||||
Tap a saved share to browse it. Folder rows open subfolders; the breadcrumb buttons navigate to parent folders or the root. Search filters the current listing, Sort cycles through name, date, and size with folders first, Show filters by file type, and Refresh reloads the current folder. Tap an image to open the full-screen viewer; swipe left or right to move through images and animated GIFs in the same folder. The viewer limits downloads to 64 MB per image. Other file rows show details; video viewing and file actions are later phases.
|
||||
## Install
|
||||
|
||||
The share list opens without waiting for credential decryption on the UI thread. While browsing, the app reuses the SMB connection and keeps up to 20 recent folder listings in memory so returning to a folder shows its files immediately while the listing refreshes. Search and sorting run off the UI thread. Image viewing uses a separate persistent connection, a 24 MB in-memory read cache, and prefetches the next image.
|
||||
Download the APK from the latest [Gitea release](https://codealvin.xyz/Alvin-Zilverstand/smb-explorer/releases). Without release signing secrets, the workflow attaches a debug-signed test APK; with them, it attaches a release-signed APK. Android 9 or newer is required.
|
||||
|
||||
The current environment has not supplied a NAS address or credentials, so live compatibility and reconnect results remain to be measured on the device.
|
||||
On first launch, enter the NAS address, share name, and credentials, then tap **Test & save connection**. The device must be able to reach the SMB server, usually on port 445. Open the saved share from the home screen. The connection menu (`⋮`) contains **Edit connection** and **Remove connection**.
|
||||
|
||||
Implementation plan: [PLAN.md](PLAN.md).
|
||||
## Build from source
|
||||
|
||||
## Gitea Actions
|
||||
Requirements: JDK 17, Android SDK platform 37, and Android build tools 36.0.0. Set `ANDROID_HOME` or create a local `local.properties` pointing to the SDK.
|
||||
|
||||
Every branch push runs `.gitea/workflows/android-build.yml` on the runner labelled `debian`. It creates a Gitea pre-release tagged `build-<run ID>-<attempt>` with an installable APK attached. The `android-apks` artifact on the Actions run also contains the debug APK and an unsigned release APK by default. The workflow installs JDK 17 and the required Android SDK packages, so the runner needs outbound access to the action repositories, Gradle, Maven, and Google Android downloads. Repository Actions permissions must allow the job token to write releases.
|
||||
```bash
|
||||
./gradlew :app:assembleDebug
|
||||
```
|
||||
|
||||
For a signed release APK, add these repository Actions secrets: `ANDROID_KEYSTORE_BASE64` (base64 encoding of your release `.jks` file), `ANDROID_KEYSTORE_PASSWORD`, `ANDROID_KEY_ALIAS`, and `ANDROID_KEY_PASSWORD`. When all are present, the workflow attaches the signed release APK. Without them, it attaches the installable debug APK instead. Keep the keystore and its passwords backed up outside the repository; future updates need the same signing key. Never commit the keystore or passwords.
|
||||
On Windows, run `gradlew.bat :app:assembleDebug`. The APK is written to `app/build/outputs/apk/debug/app-debug.apk`. Install it with `adb install -r app/build/outputs/apk/debug/app-debug.apk`.
|
||||
|
||||
The optional **Advanced connection test** reads three 64 KiB ranges of a selected file and reports their hashes. It is a diagnostic tool, not part of normal browsing.
|
||||
|
||||
## Gitea builds and releases
|
||||
|
||||
Every branch push runs [the Android workflow](.gitea/workflows/android-build.yml) on a runner labelled `debian`. The job builds debug and release APKs, uploads them as an Actions artifact, and creates a Gitea pre-release tagged `build-<run ID>-<attempt>` with one installable APK. The runner needs outbound access to the action repositories, Gradle, Maven, and Android SDK downloads. The repository must allow the job token to write releases.
|
||||
|
||||
To attach a signed release APK instead of a debug APK, configure these repository Actions secrets:
|
||||
|
||||
| Secret | Value |
|
||||
| --- | --- |
|
||||
| `ANDROID_KEYSTORE_BASE64` | Base64-encoded release `.jks` keystore |
|
||||
| `ANDROID_KEYSTORE_PASSWORD` | Keystore password |
|
||||
| `ANDROID_KEY_ALIAS` | Key alias |
|
||||
| `ANDROID_KEY_PASSWORD` | Key password |
|
||||
|
||||
Keep the keystore and passwords backed up outside the repository. Android updates must use the same signing key. Never commit credentials, keystores, or `local.properties`.
|
||||
|
||||
## Contributing and license
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md) for development and issue guidance. Copyright (C) 2026 Alvin Zilverstand. SMB Explorer is licensed under the [GNU General Public License, version 3 only](LICENSE) (`GPL-3.0-only`).
|
||||
Reference in new issue
Block a user