Skip to content

Releases: egdels/SambaLite

SambaLite v2.5.4

Choose a tag to compare

@github-actions github-actions released this 11 Jul 08:11

SambaLite v2.5.4

Downloads

  • APK: For direct installation (sideloading)
  • AAB: For Google Play Store and other app stores

Verification

Both files include SHA256 checksums for integrity verification.

Changelog

Fixed

  • Guest login fails (issue #32): Connections without username and password previously used AuthenticationContext.guest(), which sends the username Guest. Samba servers with a guest-accessible share but without map to guest = Bad User (the Samba default is map to guest = Never) reject this login with NT_STATUS_NO_SUCH_USER / NT_STATUS_LOGON_FAILURE. SambaLite now performs a true anonymous login (empty username and password), matching the behavior of mount.cifs -o guest.
  • SMB3 crash on anonymous sessions: Anonymous/guest connections are now restricted to SMB2 dialects (SMB 2.1 / 2.0.2). SMBJ 0.14.0 crashes with a NullPointerException when deriving SMB3 signing keys for anonymous sessions if the server does not set the IS_NULL/IS_GUEST session flags (hierynomus/smbj#792); SMB3 signing/encryption offers no protection for anonymous sessions anyway.

Added

  • Tests: New GuestLoginIntegrationTest reproducing the reporter's setup (Samba 4.23.x, guest-accessible share, no map to guest mapping) against a real Samba container, verifying that anonymous login succeeds where the old guest() login fails, and that the documented map to guest = Bad User workaround still works.

If you like this update, support SambaLite here: https://ko-fi.com/egdelshttps://www.paypal.com/paypalme/egdels

SambaLite v2.5.3

Choose a tag to compare

@github-actions github-actions released this 08 Jul 09:37

SambaLite v2.5.3

Downloads

  • APK: For direct installation (sideloading)
  • AAB: For Google Play Store and other app stores

Verification

Both files include SHA256 checksums for integrity verification.

Changelog

Added

  • Default folder per connection: Connections can now define an optional default folder inside the share (e.g. Photos/2024) that is opened automatically when connecting. The add/edit connection dialog validates the path (rejecting \ : * ? " < > |) and verifies on save that the folder actually exists on the server; if the existence check itself fails (e.g. server unreachable), the connection is still saved. The file browser navigates to the default folder only on a normal fresh start — not when opened from a notification or a Share handoff — and falls back to the share root with a hint if the folder no longer exists.
  • Timestamp preservation on downloads: Downloaded files now keep the remote file's last-modified timestamp where possible. The new MediaStorePathResolver resolves content:// URIs (MediaStore, external storage documents, file://) to real filesystem paths on which File.setLastModified() works, complementing the existing utimensat()-based SAF strategy in TimestampUtils. Authorities where both strategies fail are remembered per session to avoid repeated syscalls and warning spam during large syncs.
  • Translations for the new default folder strings in all 7 supported languages (EN, DE, ES, FR, NL, PL, ZH).

Changed

  • Faster SMB transfers: SMB read/write/transact buffers are now requested at 8 MB (capped by server negotiation), copy buffers were increased from 64 KB to 256 KB (transfers) and 1 MB (TransferWorker), and large files (≥ 16 MB) are downloaded with multiple concurrently outstanding, pipelined SMB READ requests (6 readers, 4 MB chunks) with a dedicated writer thread. Progress updates during folder uploads are throttled using the same scheme as regular transfers. New SmbRepository methods folderExists(...) and readFileBytes(...) support the default folder check and single-handle thumbnail downloads.
  • Thumbnail loading rework: Thumbnails are now downloaded once via a single SMB file handle (readFileBytes) and decoded from memory instead of streaming through the removed SmbInputStream. The disk cache is compressed (JPEG quality 85), trimmed at most once per minute on a dedicated executor, negative "no cover" markers expire after 7 days, and dropped queue tasks clear their pending marker so thumbnails can be requested again. View references are checked in a short-lived stack frame to avoid leaking Activity contexts from background threads.

Fixed

  • Duplicate "B (1)" folders during sync: Two sync workers could run concurrently for the same configuration (manual per-config sync vs. periodic/"sync all" worker) because WorkManager's unique work names differ. Sync runs are now serialized per configuration via process-wide locks. Additionally, directory creation guards against SAF providers silently deduplicating names: if a duplicate like B (1) is created, it is removed and the existing directory is reused.
  • Sync misses files with accented or differently-cased names: Local file lookups during sync now normalize names to Unicode NFC (SMB servers often deliver NFD) and fall back to a case-insensitive match (SMB is case-insensitive, HashMap lookups are not), preventing unnecessary re-downloads and duplicate entries.

If you like this update, support SambaLite here: https://ko-fi.com/egdelshttps://www.paypal.com/paypalme/egdels

Test build for release 2.5.3

Pre-release

Choose a tag to compare

@egdels egdels released this 07 Jul 15:38

Test build for release 2.5.3

SambaLite v2.5.2

Choose a tag to compare

@github-actions github-actions released this 25 Jun 06:14

SambaLite v2.5.2

Downloads

  • APK: For direct installation (sideloading)
  • AAB: For Google Play Store and other app stores

Verification

Both files include SHA256 checksums for integrity verification.

Changelog

Changed

  • Faster folder sync on high-latency connections (issue #21): When syncing local files to a remote share, SambaLite now fetches all remote file metadata for a directory in a single share.list() call instead of opening every remote file multiple times (existence check + timestamp read + size read). This mirrors the approach already used for remote-to-local sync and dramatically reduces the number of SMB round-trips, which dominate sync time over Wi-Fi or slow networks. Idle syncs (many files, few or no changes) that previously took minutes or hours now complete in seconds. The per-uploaded-file overhead is also reduced by avoiding redundant post-upload metadata reads.

If you like this update, support SambaLite here: https://ko-fi.com/egdelshttps://www.paypal.com/paypalme/egdels

SambaLite v2.5.1

Choose a tag to compare

@github-actions github-actions released this 20 May 11:27

SambaLite v2.5.1

Downloads

  • APK: For direct installation (sideloading)
  • AAB: For Google Play Store and other app stores

Verification

Both files include SHA256 checksums for integrity verification.

Changelog

Added

  • Battery Optimization Reminder Controls: The battery optimization reminder now offers a dedicated "Do not show again" action and snoozes the prompt for 14 days when users choose "Later". These choices are persisted so the reminder no longer appears on every launch when the app is still subject to Android battery optimization.
  • Modern Battery Optimization Dialog: Added a Material Design 3 custom dialog layout with a battery icon, subtitle, explanatory card, and full-width action buttons for better readability and touch handling.
  • Translations for the updated battery optimization reminder in all 7 supported languages (EN, DE, ES, FR, NL, PL, ZH).

Changed

  • Battery Optimization Messaging: The reminder text now explicitly covers background uploads, downloads, and scheduled syncs, while clarifying that users who mostly run manual sync can postpone or hide the reminder.

Fixed

  • Invalid SMB share names: The add/edit connection dialogs now reject share names containing path separators or characters that are invalid for SMB shares (/ \ : * ? " < > |). Existing saved connections with invalid share names are blocked from opening and guide users to edit the connection instead of failing later in the file browser.

If you like this update, support SambaLite here: https://ko-fi.com/egdelshttps://www.paypal.com/paypalme/egdels

SambaLite v2.5.0

Choose a tag to compare

@github-actions github-actions released this 05 May 15:55

SambaLite v2.5.0

Downloads

  • APK: For direct installation (sideloading)
  • AAB: For Google Play Store and other app stores

Verification

Both files include SHA256 checksums for integrity verification.

Changelog

Added

  • Mirror Sync Mode: One-way folder sync configurations (Local → Remote, Remote → Local) can now be run in mirror mode. After a successful sync, files and directories that previously existed on the source (tracked in the local sync state DB) but are no longer present in the source's current listing are removed on the target side as well. Mirror mode is implemented by the new MirrorSweeper class and is ignored for bidirectional sync.
  • Mirror Trash Safeguard: When mirror mode is enabled, removed entries are by default moved into a hidden, per-run trash folder (.sambalite-trash/<timestamp>/<relPath>) at the target root instead of being permanently deleted. If the storage provider does not support move, the entry is deleted as a fallback. The behavior can be toggled via the new "Move to trash folder" option.
  • Mirror Sweep Sanity Limits: To prevent catastrophic data loss from misconfigured shares or temporarily empty source listings, mirror sweeps abort automatically when the source listing is empty, or when the planned number of deletions exceeds 50% of the previously tracked entries AND more than 100 entries.
  • Mirror Action Logging: New action types in SyncActionLog (MIRROR_DELETED 🪞, MIRROR_TRASHED 🪞, MIRROR_ABORTED 🪞) and corresponding counters in the sync run summary.
  • UI for Mirror Mode: The sync setup and edit dialogs (dialog_sync_setup.xml) now offer a "Mirror mode" switch, a nested "Move to trash folder" switch, and a clear warning text explaining the destructive nature of the option. The sync configuration list (item_sync_config.xml) shows a "Mirror" indicator for configurations with mirror mode enabled.
  • Trash Exclusion: The sync engine now skips the .sambalite-trash folder during scans so that mirror trash from previous runs is never re-uploaded, re-downloaded, or counted against the sweep sanity limits.
  • Tests: New MirrorIntegrationTest (end-to-end mirror behavior against a Samba container) and TrashExclusionTest. SyncStateStore now exposes a public DAO-injection constructor to make mirror logic testable without the Android runtime.
  • Translations for all new mirror-mode strings in all 7 supported languages (EN, DE, ES, FR, NL, PL, ZH).

Changed

  • FolderSyncWorker rework: Significantly extended (~700 added lines) to integrate MirrorSweeper, track per-run state, log mirror actions, and exclude the trash folder from scans on both local and remote sides.
  • SyncManager.addSyncConfig signature: Extended with mirror and mirrorUseTrash parameters. The legacy 6-argument overload is preserved and now defaults mirror to false and mirrorUseTrash to true. Mirror is automatically disabled when the direction is BIDIRECTIONAL.
  • SyncRepository persistence: SyncConfig JSON serialization now persists mirror and mirrorUseTrash (default: mirror off, trash on).
  • Documentation: docs/sync_user_guide.md updated with a dedicated section on mirror mode, the trash safeguard, and the sanity limits.

Fixed

  • Docker API compatibility for integration tests: Testcontainers-based SMB tests previously failed against Docker Engine 29+ / OrbStack, which reject the default Docker Java client API version (1.32). The Docker API version is now pinned to 1.44 via app/src/test/resources/docker-java.properties, restoring CI and local integration test runs.
  • Unnecessary File List Refresh on Unrelated Uploads: FileBrowserActivity previously refreshed the currently displayed directory after every completed upload, even when the upload target was an entirely different folder (e.g. background sync or share uploads to another path). The refresh now only triggers when the upload's parent directory matches the directory currently shown in the browser. The new helper isUploadInDirectory(...) normalizes the broadcast remotePath, strips the share-name prefix, and compares it against the share-relative current path. The TransferWorker upload-success broadcast carries the EXTRA_REMOTE_PATH extra used for this comparison.

If you like this update, support SambaLite here: https://ko-fi.com/egdelshttps://www.paypal.com/paypalme/egdels

test-release-250

test-release-250 Pre-release
Pre-release

Choose a tag to compare

@egdels egdels released this 04 May 15:43

Test build for release 2.5.0

SambaLite v2.4.1

Choose a tag to compare

@github-actions github-actions released this 01 May 12:21

SambaLite v2.4.1

Downloads

  • APK: For direct installation (sideloading)
  • AAB: For Google Play Store and other app stores

Verification

Both files include SHA256 checksums for integrity verification.

Changelog

Fixed

  • Share upload to share root and duplicated path segments (Issue #27): When sharing files to SambaLite via the Android "Share" menu, uploads could fail or land at the wrong target if the share root or a subfolder with the same name as the share was selected. The share receiver incorrectly interpreted the first path segment as the connection name, producing paths such as share/share/... (e.g. AA/AA). The connection is now unambiguously referenced via the persisted connection ID, and the stored path is treated as a share-relative internal path (empty for the share root).
  • Wrong target for subfolders with the same name as the share in SmbRepositoryImpl: getPathWithoutShare() stripped the first path segment when it matched the active share name. For a subfolder with the same name as the share (e.g. share music containing a subfolder music), this caused delete, rename, and create operations to silently act on the share root instead of the subfolder. The method now only normalizes leading slashes and leaves the path otherwise unchanged.
  • Consistent persistence of the current folder in FileBrowserActivity: When changing the remote folder, the internal path (without the share prefix) is now stored together with the connection ID, so subsequent share handoffs can reconstruct the correct upload target.

Changed

  • Simplified share receiver flow: Heuristics for deriving the connection from the target path (getConnectionFromTargetPath, getConnectionNameFromTargetFolder, getPathFromTargetFolder) have been removed. The confirmation dialog still shows a readable "share/sub/path" label, composed from the connection ID and the internal path.
  • Tests: Extended and stabilized unit tests for ShareReceiverActivity, FileBrowserActivity (new path normalization and upload target helpers), and PathProcessingTest.

If you like this update, support SambaLite here: https://ko-fi.com/egdelshttps://www.paypal.com/paypalme/egdels

test-release-241

test-release-241 Pre-release
Pre-release

Choose a tag to compare

@egdels egdels released this 01 May 07:49

Test build for release 2.4.1

SambaLite v2.4.0

Choose a tag to compare

@github-actions github-actions released this 18 Apr 06:09

SambaLite v2.4.0

Downloads

  • APK: For direct installation (sideloading)
  • AAB: For Google Play Store and other app stores

Verification

Both files include SHA256 checksums for integrity verification.

Changelog

Added

  • Directory Multi-Select Operations: Directories can now be selected in multi-select mode. Multi-select delete supports directories with a confirmation warning, and multi-select download supports recursive directory downloads.
  • WiFi-Only Folder Sync: New wifiOnly option for folder sync configurations. When enabled, FolderSyncWorker checks the WiFi constraint before syncing, and SyncManager sets NetworkType.UNMETERED. A MaterialSwitch is available in the sync setup and edit dialogs, and the WiFi-Only status is displayed in the sync configuration overview.
  • SMB Port Support: Custom SMB port can now be configured per connection in the connection model and repository.
  • Connection Cleanup: New closeConnections() method in SmbRepository for explicit connection lifecycle management.
  • Testcontainers Integration: Added Testcontainers support with a Samba container for realistic SMB integration testing in CI.
  • Comprehensive Test Suite: New integration and unit tests for WiFi constraints, end-to-end sync workflows, transfer queue integration, error recovery, search functionality, and notification handling.
  • Translations for directory selection and WiFi-Only strings in all 7 supported languages (EN, DE, ES, FR, NL, PL, ZH).

Changed

  • Selection Subtitle: Toolbar subtitle now shows the count of selected files and directories separately during multi-select mode.
  • Disk Space Check Refactoring: Moved disk space check logic to EnhancedFileUtils for better separation of concerns.
  • Directory Download moved to TransferWorker: Recursive directory download logic moved from FileOperationsViewModel into TransferWorker. A single DOWNLOAD_DIRECTORY placeholder is enqueued, and the worker resolves directory contents using its own SMB connection — avoiding dependency on the (possibly closed) UI-layer SMB session.
  • TransferWorker Work Policy: Changed ExistingWorkPolicy from REPLACE to KEEP to prevent restarting an already running transfer worker when new transfers are enqueued.
  • Transfer Queue Scalability: Transfer list query now uses LIMIT 500 to prevent CursorWindow overflow on large queues. Status counts (Pending, Active, Completed, Failed, Total) are observed via separate lightweight COUNT queries for accurate stats display independent of the list limit.
  • Transfer Badge Performance: FileListController now uses lightweight path-only DAO queries (getActiveUploadPathsForConnection, getActiveDownloadPathsForConnection) instead of loading full PendingTransfer objects for UI badge indicators.
  • TransferItemAdapter Cleanup: Removed verbose Log.v debug logging from DiffUtil callbacks.
  • Test Infrastructure Overhaul: Reworked SmbTestHelper and SambaContainer, updated and stabilized existing repository tests, and updated test documentation with the new test structure.

Fixed

  • Disk Space Protection in TransferWorker: Added comprehensive disk space checks before, during, and after transfers. The worker now stops immediately when disk space is insufficient instead of retrying endlessly, and returns Result.failure() when disk is full.
  • Disk Space Protection in FolderSyncWorker: Added disk space checks before each sync config, before each file download, and periodically during downloads (every 10 MB). Sync aborts gracefully via InsufficientDiskSpaceException when disk space runs low.
  • SQLiteFullException Crash Prevention: SmartErrorHandler now catches SQLiteFullException on WorkManager threads (caused by WorkManager internal DB operations when disk is full) and swallows them to prevent app crashes.
  • Robust DB Error Handling in TransferWorker: Wrapped transfer status updates in try-catch to prevent secondary crashes when the database is full.
  • System Monitor Disk Info: SystemMonitorActivity now displays internal and external storage usage with free/total space and a low disk space warning.
  • Sort Dialog Crash in Landscape Mode: Fixed a NullPointerException crash when opening the sort dialog in landscape orientation. The landscape layout (dialog_sort.xml) was missing the show_thumbnails_checkbox, and getDirectoriesFirst().getValue() could return null causing an unboxing crash.
  • Upload Crash After ViewModel Cleared: Fixed a RejectedExecutionException crash in FileOperationsViewModel when tasks were submitted to the background executor after the ViewModel had been cleared. All executor submissions now use a safe wrapper that catches rejected tasks gracefully.
  • Battery Dialog Crash: Fixed a BadTokenException crash when showing the battery optimization dialog after the activity was already finishing or destroyed. Added lifecycle checks before displaying the dialog.
  • Unnecessary Refresh on Download: Removed redundant file list refreshes after each completed download. Since downloads don't modify the remote directory, the per-file refresh was wasting resources — especially during batch downloads with many small files. Refreshes now only occur after uploads.

If you like this update, support SambaLite here: https://ko-fi.com/egdelshttps://www.paypal.com/paypalme/egdels