### Install rclone-mount Magisk Module Source: https://context7.com/piyushgarg/rclone-mount/llms.txt This snippet outlines the manual installation process for the rclone-mount Magisk module using the Magisk Manager. It details the steps to download the zip file, install it via Magisk Manager, and shows the expected output during the installation, including architecture detection and binary extraction. ```bash # Install via Magisk Manager # 1. Download the module zip file # 2. Open Magisk Manager # 3. Go to Modules section # 4. Tap "Install from storage" # 5. Select the downloaded zip file # The installer will output: # ******************************* # * rclone-mount * # * Magisk Module * # * by: piyushgarg * # ******************************* # *rclone: (v1.47.0) mod: (v1.3)* # ******************************* # * Detected arch: arm64 # + Extracting package contents... # + Extracting rclone-arm64 to $MODPATH/rclone # + Extracting fusermount-arm64 to $MODPATH/fusermount # + Extracting rclone-mount script to $MODPATH/rclone-mount ``` -------------------------------- ### Configure rclone.conf for Cloud Authentication Source: https://context7.com/piyushgarg/rclone-mount/llms.txt This section details how to set up the rclone configuration file (`rclone.conf`) on an Android device for authenticating with cloud storage providers. It shows the necessary directory creation, an example `rclone.conf` structure for Google Drive, Dropbox, and OneDrive, and the command to set appropriate file permissions. ```bash # Create the configuration directory mkdir -p /sdcard/.rclone/ # Copy your rclone.conf to the device # Example rclone.conf structure: cat > /sdcard/.rclone/rclone.conf << 'EOF' [gdrive] type = drive client_id = your_client_id client_secret = your_client_secret scope = drive token = {"access_token":"...","token_type":"Bearer","refresh_token":"...","expiry":"..."} root_folder_id = [dropbox] type = dropbox token = {"access_token":"...","token_type":"bearer","expiry":"0001-01-01T00:00:00Z"} [onedrive] type = onedrive token = {"access_token":"...","token_type":"Bearer","refresh_token":"...","expiry":"..."} drive_id = drive_type = personal EOF # Set proper permissions chmod 600 /sdcard/.rclone/rclone.conf # Reboot device or run mount command manually rclone-mount ``` -------------------------------- ### Accessing Mounted Cloud Storage Source: https://context7.com/piyushgarg/rclone-mount/llms.txt Demonstrates how to access and interact with mounted cloud storage directories on an Android device. Files are accessible via `/mnt/cloud/REMOTENAME` and symlinked to `/storage/cloud/REMOTENAME`. Includes examples for listing files, copying, streaming, and checking disk usage. ```bash # List files in a mounted Google Drive ls /mnt/cloud/gdrive/ # Copy a file from cloud to local storage cp /mnt/cloud/gdrive/Documents/report.pdf /sdcard/Download/ # Stream video directly (recommended: mpv player) # In mpv player, navigate to: /storage/cloud/gdrive/Videos/ # Access from any file explorer app # Path: /storage/cloud/ # For apps that support custom paths: # Use: /mnt/cloud/REMOTENAME/path/to/folder # Or: /storage/cloud/REMOTENAME/path/to/folder # Check available space (shows remote capacity) df -h /mnt/cloud/gdrive/ # Example output for Google Drive: # Filesystem Size Used Avail Use% Mounted on # gdrive: 15G 8.2G 6.8G 55% /mnt/cloud/gdrive ``` -------------------------------- ### Manual Mount Command for rclone-mount Source: https://context7.com/piyushgarg/rclone-mount/llms.txt Manually triggers the mounting of cloud storage remotes via ADB shell. This command is useful for testing or re-mounting after initial setup. It requires root access (su) and executes the rclone-mount script. ```bash # Connect via ADB and run mount command adb shell su rclone-mount # Output: # mounting... gdrive # mounting... dropbox # mounting... onedrive # ...done # Verify mounts are active ls /mnt/cloud/ # gdrive dropbox onedrive # Also accessible via storage symlink ls /storage/cloud/ # gdrive dropbox onedrive # Check mount status with rclone rclone listremotes --config /sdcard/.rclone/rclone.conf # gdrive: # dropbox: # onedrive: # View mount logs for debugging cat /sdcard/rclone.log ``` -------------------------------- ### Define Custom rclone Parameters Per Remote Source: https://context7.com/piyushgarg/rclone-mount/llms.txt This snippet demonstrates how to configure custom rclone parameters for individual cloud remotes by creating `.REMOTENAME.param` files. It provides an example for setting parameters like `BUFFERSIZE`, `CACHEMAXSIZE`, and `CACHEMODE` for a 'gdrive' remote, and also shows how to disable caching for media streaming with a '.media.param' file. ```bash # Create custom params for a specific remote (e.g., "gdrive") cat > /sdcard/.rclone/.gdrive.param << 'EOF' BUFFERSIZE=16M CACHEMAXSIZE=512M DIRCACHETIME=48h READAHEAD=256k CACHEMODE=writes EOF # Available parameters and their defaults: # BUFFERSIZE=8M - In-memory buffer size for data transfers # CACHEMAXSIZE=256M - Maximum size of the VFS cache # DIRCACHETIME=24h - How long to cache directory listings # READAHEAD=128k - Read ahead buffer size # CACHEMODE=writes - VFS cache mode (off, minimal, writes, full) # CACHE=/data/rclone/cache - VFS cache directory # CACHE_BACKEND=/data/rclone/cache-backend - Backend cache directory # For media streaming with VLC, use an alias with caching disabled: cat > /sdcard/.rclone/.media.param << 'EOF' CACHEMODE=off EOF ``` -------------------------------- ### Control Global VFS Cache Mode with Marker Files Source: https://context7.com/piyushgarg/rclone-mount/llms.txt This section explains how to control the global VFS cache mode for all rclone remotes using simple marker files in the configuration directory. It provides commands to create marker files for disabling caching (`.nocache`), enabling minimal caching (`.mincache`), write caching (`.writecache`), and full caching (`.fullcache`). ```bash # Disable caching globally (for streaming) touch /sdcard/.rclone/.nocache # Enable minimal caching touch /sdcard/.rclone/.mincache # Enable write caching (default) touch /sdcard/.rclone/.writecache # Enable full caching touch /sdcard/.rclone/.fullcache # Cache modes explained: # off - No caching, direct streaming (best for media playback) # minimal - Cache only file metadata # writes - Cache writes and reads for modified files (default) # full - Full caching of all read/write operations # Only one marker file should exist at a time ``` -------------------------------- ### Cache File Management Source: https://context7.com/piyushgarg/rclone-mount/llms.txt Manages cache files for rclone-mount by removing existing cache files and creating a new write cache file. This is typically done before or after mounting operations to ensure proper cache behavior. ```bash # Remove others when setting a new mode: rm -f /sdcard/.rclone/.nocache /sdcard/.rclone/.mincache /sdcard/.rclone/.fullcache touch /sdcard/.rclone/.writecache ``` -------------------------------- ### Unmounting Remotes with disable.sh Script Source: https://context7.com/piyushgarg/rclone-mount/llms.txt Safely unmounts all configured cloud storage remotes using the provided disable script. This is crucial before removing the module or freeing up resources. It's executed via ADB shell with root privileges. ```bash # Run the disable/unmount script adb shell su # Navigate to module directory and run disable script cd /data/adb/modules/com.piyushgarg.rclone/common/ sh disable.sh # Output: # UNmounting remotes... # UNmounting... gdrive # UNmounting... dropbox # UNmounting... onedrive # ...done # Verify mounts are removed ls /mnt/cloud/ # (empty or shows unmounted directories) # Manual unmount of specific remote umount -f /mnt/cloud/gdrive ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.