An open API service indexing awesome lists of open source software.

https://github.com/hxreborn/remember-my-sort

An Xposed module that forces the native Android file picker to remember your sorting preferences.
https://github.com/hxreborn/remember-my-sort

android lsposed lsposed-module root scoped-storage storage-access-framework xposed xposed-module

Last synced: about 2 months ago
JSON representation

An Xposed module that forces the native Android file picker to remember your sorting preferences.

Awesome Lists containing this project

README

          

# Remember My Sort

An Xposed module that forces the Android file picker to remember your sorting preferences.

![Android CI](https://github.com/hxreborn/remember-my-sort/actions/workflows/android.yml/badge.svg)
![Kotlin](https://img.shields.io/badge/Kotlin-2.3.20-7F52FF?style=flat&logo=kotlin&logoColor=white)
![Android](https://img.shields.io/badge/API-30%2B-3DDC84?logo=android&logoColor=white)


Get it on F-Droid
Get it on IzzyOnDroid
Get it on GitHub
Get it on Obtainium

## Overview

Starting with Android 11's [scoped storage](https://developer.android.com/about/versions/11/privacy/storage#scoped-storage), all apps that need file access must use the system file picker. This picker fails to persist sort preferences across directories. Sort order is kept in the root view, but navigating into any subdirectory resets it to filename A-Z. Users must manually change the sort every time they browse into a folder, regardless of how many times they've set it before.

Users have [reported the issue since 2021](https://xdaforums.com/t/google-files-default-sort.4309799/) with no fix from Google.

## Usage

From the file picker's sort menu:

- Normal tap: Updates the global sort for all folders.
- Long-press: Saves a custom sort for the current folder only. Clear it by changing sort without long-press.

> [!NOTE]
> Per-folder sorting quirks:
> 1. Recent view can't have per-folder sort. Long-pressing there updates the global sort instead.
> 2. Sort settings are stored per content provider. The same folder reached through different entry points may be treated separately (e.g., Downloads via quick access vs. via root storage).

## Requirements

Requires an LSPosed Manager version with API 101 support and Android 11+. Works on Pixel and AOSP-based ROMs. OEM-modified ROMs are untested.

## Installation

1. Install APK and enable in LSPosed Manager
2. Add recommended DocumentsUI packages to scope
- Pixel: `com.google.android.documentsui`
- AOSP: `com.android.documentsui`
3. Force stop DocumentsUI

## Build

1. Install JDK 21, Android SDK

2. Configure SDK path in `local.properties`

```properties
sdk.dir=/path/to/android/sdk
```

3. Build APK

```bash
./gradlew assembleRelease
```

## License

GPLv3

This project is licensed under the GNU General Public License v3.0. See [LICENSE](LICENSE) for details.