Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,32 @@
/.project
/lint.xml
/project.properties

.gradle/
**/build/

.idea/
*.iml
*.ipr
*.iws

local.properties

captures/
.externalNativeBuild/
.cxx/

*.apk
*.ap_
*.aab

*.dex
*.class

out/

*.log
*.hprof

.DS_Store
Thumbs.db
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
17 changes: 17 additions & 0 deletions AGENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# AGENT.md

This document provides context and instructions for AI agents working on this project.

## Project Background
This project is a fork of the original CyanogenMod / LineageOS File Manager, which was "frozen" for over 10 years. It has been recently revived and modified to support modern requirements and specific integration features for the **BSLauncher** ecosystem.

## Key Modifications
- **Modern SDK targeting**: Updated to target Android SDK 33.
- **BSLauncher Integration**: Added support for mode cycling and deep integration with the BSLauncher application.
- **Intent Features**: Enhanced intent handling, including automatic home directory setting when navigating to specific folders via `resource/folder` intents.
- **Legacy Storage Support**: Maintained compatibility with legacy storage modes where necessary.

## Development Guidelines
- Always refer to `INTENTS.md` for information on supported URI schemes and intent extras.
- Use `CHANGELOG.md` to track new features and version bumps.
- Maintain compatibility with both legacy (AOSP-like) environments and modern Android versions (up to SDK 33).
43 changes: 28 additions & 15 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<original-package android:name="com.cyanogenmod.filemanager" />

<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="23" />


<uses-feature android:name="android.software.leanback"
android:required="false" />
Expand All @@ -34,8 +34,7 @@

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_MEDIA_STORAGE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.SET_PREFERRED_APPLICATIONS" />
<uses-permission android:name="android.permission.ACCESS_SUPERUSER"/>
<uses-permission android:name="android.permission.NFC"/>
Expand All @@ -44,10 +43,10 @@
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="com.cyanogenmod.filemanager.permissions.READ_THEME"/>

<application
<application android:requestLegacyExternalStorage="true"
android:name="FileManagerApplication"
android:description="@string/app_description"
android:icon="@mipmap/ic_launcher_filemanager"
android:icon="@drawable/ic_launcher_bs_red"
android:banner="@drawable/banner"
android:label="@string/app_name"
android:largeHeap="true"
Expand All @@ -60,35 +59,37 @@

<provider
android:name=".providers.RecentSearchesContentProvider"
android:authorities="com.cyanogenmod.filemanager.providers.recentsearches"
android:authorities="${applicationId}.providers.recentsearches"
android:exported="false" />

<provider
android:name=".providers.BookmarksContentProvider"
android:authorities="com.cyanogenmod.filemanager.providers.bookmarks"
android:authorities="${applicationId}.providers.bookmarks"
android:exported="false" />

<provider
android:name=".providers.SecureResourceProvider"
android:authorities="com.cyanogenmod.filemanager.providers.resources"
android:authorities="${applicationId}.providers.resources"
android:grantUriPermissions="true"
android:exported="true" />

<provider
android:authorities="com.cyanogenmod.filemanager.providers.index"
android:authorities="${applicationId}.providers.index"
android:name=".providers.MimeTypeIndexProvider"/>

<service
android:name=".service.MimeTypeIndexService"
android:label="@string/app_name">
android:label="@string/app_name"
android:exported="false">
<intent-filter>
<action android:name="com.cyanogenmod.filemanager.ACTION_START_INDEX"/>
<action android:name="${applicationId}.ACTION_START_INDEX"/>
</intent-filter>
</service>

<activity
android:name=".activities.NavigationActivity"
android:label="@string/app_name"
android:icon="@drawable/ic_launcher_bs_red"
android:launchMode="singleTop"
android:uiOptions="none"
android:theme="@style/FileManager.Theme.Material.Light.NoActionBar"
Expand All @@ -98,8 +99,10 @@
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
Expand All @@ -114,6 +117,13 @@
<data android:scheme="folder" />
<data android:scheme="directory" />
</intent-filter>
<intent-filter>
<action android:name="${applicationId}.ACTION_SET_HOME" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:scheme="folder" />
<data android:scheme="directory" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:value=".activities.SearchActivity"
Expand Down Expand Up @@ -191,7 +201,8 @@
<activity
android:name=".activities.EditorActivity"
android:label="@string/editor"
android:configChanges="orientation|keyboardHidden|screenSize">
android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" />
Expand Down Expand Up @@ -230,11 +241,13 @@
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<service android:name=".providers.secure.SecureCacheCleanupService">
<service
android:name=".providers.secure.SecureCacheCleanupService"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="com.cyanogenmod.filemanager.ACTION_START_CLEANUP"/>
<action android:name="${applicationId}.ACTION_START_CLEANUP"/>
</intent-filter>
</service>

Expand Down
17 changes: 17 additions & 0 deletions CALUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# CALUDE.md

This document serves as a guide for AI assistants (specifically Claude) working on the File Manager project.

## Project Context
The **LineageOS File Manager (Volo Fork)** is an updated version of a legacy file manager that remained unchanged for over a decade. The current maintainers have unfrozen the project to implement mission-critical features for modern Android devices and auxiliary launchers.

## Architecture & Integration
- **Package Name**: `com.cyanogenmod.filemanager` (subject to change in specific builds).
- **Core Strategy**: Enhance the existing stable platform with new intent-based controls.
- **Key Files**:
- `AndroidManifest.xml`: Watch for intent-filter updates.
- `src/com/cyanogenmod/filemanager/activities/NavigationActivity.java`: Core navigation logic.
- `INTENTS.md`: Source of truth for external command interfaces.

## Modification History
Refer to the `README.md` and `CHANGELOG.md` for details on the "unfreezing" process and the transition from a 10-year freeze to active development.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
LineageOS File Manager
========================
Version 3.5.1
-------------
* Automatically set home folder when opening directory via intent with "resource/folder" type.
* Bump version to 3.5.1.

Version 3.0.1
-------------
* Initial forked version for BSLauncher.
* Integration with BSLauncher mode cycling.

Version 2.0.0
-------------
Expand Down
104 changes: 104 additions & 0 deletions INTENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# CMFileManager Intents Documentation

This document describes the Intent Actions supported by the CMFileManager application.

## 1. Open a Folder
To open a specific directory in the file manager.

**Action:** `android.intent.action.VIEW`

**Supported Schemes:** `file://`, `folder://`, `directory://`

**MIME Type:** `resource/folder`

**Data URI:** `file:///absolute/path/to/directory`

**Example (ADB):**
```bash
# Open using file scheme
adb shell am start -a android.intent.action.VIEW -d "file:///sdcard/Download" -n com.cyanogenmod.filemanager.dev/com.cyanogenmod.filemanager.activities.NavigationActivity

# Open using folder scheme (Will automatically set /sdcard/Download as Home)
adb shell am start -a android.intent.action.VIEW -d "folder:///sdcard/Download" -t "resource/folder" -n com.cyanogenmod.filemanager.dev/com.cyanogenmod.filemanager.activities.NavigationActivity
```

> **Note:** When opening a folder with MIME type `resource/folder`, the application will automatically save that directory as the new "Home" directory.

**Alternative (using Extras):**
* **Extra Key:** `extra_navigate_to` (String)
* **Value:** `/absolute/path/to/directory`
* **Extra Key:** `extra_add_to_history` (Boolean)
* **Default:** `true`
* **Description:** Whether to add this navigation to the history list.

---

## 2. Set Home Directory
To change the default "Home" directory of the application via intent. This will persist in the application settings.

**Action:** `${applicationId}.ACTION_SET_HOME`
*(e.g., `com.cyanogenmod.filemanager.ACTION_SET_HOME` or `com.cyanogenmod.filemanager.dev.ACTION_SET_HOME` for debug build)*

**Supported Schemes:** `file://`, `folder://`, `directory://`

**Data URI:** `file:///absolute/path/to/new/home`

**Example (ADB):**
```bash
adb shell am start -a com.cyanogenmod.filemanager.dev.ACTION_SET_HOME -d "file:///sdcard/Music" -n com.cyanogenmod.filemanager.dev/com.cyanogenmod.filemanager.activities.NavigationActivity
```

**Alternative (using Extra):**
* **Extra Key:** `extra_navigate_to` (String)
* **Value:** `/absolute/path/to/new/home`

---

## 3. Pick a File
To select a file and return its URI to the calling application.

**Action:** `android.intent.action.GET_CONTENT` or `android.intent.action.PICK`

**MIME Type:** `*/*` (or specific mime type)

**Category:** `android.intent.category.OPENABLE`

**Example (ADB):**
```bash
adb shell am start -a android.intent.action.GET_CONTENT -t "*/*" -n com.cyanogenmod.filemanager.dev/com.cyanogenmod.filemanager.activities.PickerActivity
```

---

## 4. Pick a Folder
To select a directory and return its path to the calling application.

**Action:** `com.android.fileexplorer.action.DIR_SEL`

**Example (ADB):**
```bash
adb shell am start -a com.android.fileexplorer.action.DIR_SEL -n com.cyanogenmod.filemanager.dev/com.cyanogenmod.filemanager.activities.PickerActivity
```

**Return Extra:**
* `def_file_manager_result_dir` (String): The absolute path of the selected folder.

---

## 5. Search
To initiate a search within a directory.

**Action:** `android.intent.action.SEARCH`

**Extras:**
* **Extra Key:** `query` (String)
* **Value:** The search term.
* **Extra Key:** `app_data` (Bundle)
* **Content:** Can contain application-specific data.

---

## 6. Other Internal Actions
* `${applicationId}.ACTION_START_INDEX`: Starts indexing service.
* `${applicationId}.ACTION_START_CLEANUP`: Starts cache cleanup service.

53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,59 @@ LineageOS File Manager
A file manager for AOSP, focused on rooted devices and specially designed
for the LineageOS Project.

## Project Status & History

This project (the "Volo" fork) represents a revival of the classic CyanogenMod/LineageOS File Manager. After more than **10 years of freeze**, the codebase has been modified and updated to address modern requirements and new features.

Key updates since the "unfreeze":
- Integration with the **BSLauncher** ecosystem.
- Enhanced **Intent Support** for automated navigation and folder handling.
- Modernized build system and SDK targeting (up to Android 13 / SDK 33).
- Critical bug fixes and feature enhancements to support specialized use cases.


## Requirements

- Java 17
- Android SDK with platform API 33 installed (compileSdkVersion is 33)

## Building

### Command line (Windows)

Debug APK:

```
./gradlew.bat assembleDebug
```

Release APK:

```
./gradlew.bat assembleRelease
```

APK outputs:

- `build/outputs/apk/debug/`
- `build/outputs/apk/release/`

### Android Studio

- Open the project folder.
- Let Gradle sync.
- Use the `debug` or `release` build variant.

## Documentation

- [Intents Documentation](INTENTS.md) - Details on supported Intent actions and parameters.

## Notes

- minSdkVersion: 23
- targetSdkVersion: 33
- This app requests legacy external storage behavior via `android:requestLegacyExternalStorage="true"`.

This source was released under the terms of
[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html) license.

Expand Down
8 changes: 8 additions & 0 deletions android_packages_apps_CMFileManager_volo.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}
Loading