Skip to content
Matthias Urhahn edited this page Mar 31, 2023 · 39 revisions

Setting up SD Maid SE

Information about different SD Maid SE setup steps.

Manage Storage

// TODO

Usage statistics

// TODO

Storage Access Framework

SD Maid uses the Android Storage Access framework (SAF) to gain access to additional storage areas. SD Maid will ask you to grant access to specific paths that are not accessible by just having the "Manage storage" permission (Just Android Things™️).

  • Press the Grant access button
  • A new window opens
  • If the correct path is already selected, otherwise you have to navigate to the path that SD Maid wants.
  • Then press the Use this folder button, the setup entry for this path will unlock and be colored green.

Repeat this process until all paths are green.

Troubleshooting

For when things don't go as planned.

OPEN_DOCUMENT_TREE ActivityNotFoundException

Granting access to paths via the Storage Access Framework requires an app that lets the user confirm the paths to which access will be granted. This app is the "Documents" app. It's a system app that is built into every Android device since Android 5.0 (com.android.documentsui or com.google.android.documentsui). If you get this error, then either someone deleted or disabled this app. In most cases someone ran an overzealous "de-bloating" tool that disabled it. You can re-enable it via ADB:

adb shell pm enable com.android.documentsui
or
adb shell pm enable com.google.android.documentsui

Empty window

If the window used to grant access to paths is empty, then your external storage provider package (com.android.externalstorage) is maybe disabled (likely through an overzealous "de-bloating tool). You can re-enable it via ADB:

adb shell pm enable com.android.externalstorage

Notifications

// TODO

Accessibility Service (ACS)

// TODO

ACS: Troubleshooting

ACS: AppOps Restrictions

Android 13+ may apply additional restrictions to apps that have been side-loaded. So if SD Maid is not installed from a known (to Google) source like Google Play or other app stores, then you from may not be able to directly grant some permissions to SD Maid, e.g. start an accessibility service.

To lift these restrictions open SD Maids app settings screen in the system. Open the menu in the top right corner and select Allow restricted settings, afterwards you can go back to the list of accessibility services and enable SD Maid's service.

Note: To improve usability (this is sarcasm), Google decided that this setting will only be visible if:

  • You at least saw the "Restricted setting" once after clicking SD Maids accessibility service entry
  • You have opened the system settings and navigated to SD Maid's settings page by hand, and not through another app or shortcuts.

😮‍💨

Some additional background info can be found here.

Root access

// TODO

Clone this wiki locally