$ show 1hakr/AnExplorer
AnExplorer is a native Android file-manager application (package dev.dworks.apps.anexplorer) that exposes a Storage Access Framework-compatible DocumentsProvider layer over many storage backends: external/internal storage, USB OTG, root shell, FTP/FTPS, cloud storage (Google Drive, Dropbox, OneDrive, Box via CloudRail), app management, zip archives, recent files, and a note editor. It is a heavily customized fork of AOSP DocumentsUI: the core browsing state-machine, document stack, roots cache, recents persistence, and loader/cursor stack are AOSP-derived, with substantial product-specific additions for monetization, multiple build flavors, PIN security, settings, and Wear OS/TV support. The marketing site in web/ is a static Firebase-hosted page, not part of the application logic. The architecture is a classic Android monolith: Activities and Fragments drive the UI, Loaders and custom Cursor wrappers feed RecyclerView adapters, and each storage backend is implemented as a DocumentsProvider ContentProvider. Main entry points are DocumentsActivity and StandaloneActivity for browsing, plus the provider authority intents for the Storage Access Framework. External dependencies include AndroidX, Firebase Analytics/AdMob/Crashlytics, CloudRail, libaums for USB, Apache Commons Net for FTP, and an in-app billing library. Quality is mixed. The provider and cursor abstractions are reasonably flexible and a few utility components are genuinely reusable, but the codebase carries heavy technical drift: AGP 3.3 alpha, targetSdk 28, deprecated android.app.Fragment/AsyncTask/PreferenceActivity usage, duplicated flavor-specific classes, hardcoded ad and analytics identifiers, and third-party SDKs that are no longer actively maintained. It remains a functional, feature-complete consumer app rather than a modern engineering showcase.
The LLM identified 3 files worth highlighting for reuse:
This class wraps an Android Cursor and applies a Comparator in memory, allowing directory listings to be sorted without changing the underlying query or provider. It demonstrates a clean decorator pattern: the wrapper exposes standard cursor semantics while swapping ordering logic at runtime. It depends primarily on the android.database Cursor API and a Comparator, so it could be extracted into any Android project needing client-side cursor sorting without paging or SQL changes.
Contains general file-utility logic, including the AOSP-derived buildValidExtFilename and buildValidFatFilename functions that sanitize arbitrary user-supplied names into filesystem-safe ones, plus copy/move/compress helpers. The validation functions are pure, self-contained operations that prevent invalid filenames and path-injection issues; they can be lifted into any file-handling codebase with minimal adaptation.
Provides image downsampling, EXIF orientation correction, and thumbnail generation for image/video files, with an InputStreamFactory abstraction that allows re-opening a stream when multiple passes are needed (e.g., first for bounds, then for full decode). This addresses a common Android image-handling pain point in a contained utility that could be repurposed for any thumbnail loader or image-processing pipeline.