diff --git a/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageActivity.kt b/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageActivity.kt
index 198d0f5..ca743c6 100644
--- a/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageActivity.kt
+++ b/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageActivity.kt
@@ -31,12 +31,13 @@
      */
     private val openDocumentTree = registerForActivityResult(OpenPersistableDocumentTree()) { uri ->
         if (uri != null) {
-            Log.e(TAG, "OpenDocumentTree: $uri")
             val authority = uri.authority ?: throw AssertionError("No authority in $uri")
+            // we are most likely not allowed to resolve storage roots,
+            // but being the optimists we are, we are still trying...
             val storageRoot = StorageRootResolver.getStorageRoots(this, authority).getOrNull(0)
             if (storageRoot == null) {
-                viewModel.onSafOptionChosen(
-                    StorageRootResolver.getFakeStorageRootForUri(this, uri))
+                val fakeRoot = StorageRootResolver.getFakeStorageRootForUri(this, uri)
+                viewModel.onSafOptionChosen(fakeRoot)
                 viewModel.onUriPermissionResultReceived(uri)
             } else {
                 viewModel.onSafOptionChosen(storageRoot)
@@ -58,11 +59,11 @@
         }
         viewModel.isSetupWizard = isSetupWizard()
 
-        viewModel.locationSet.observeEvent(this, {
+        viewModel.locationSet.observeEvent(this) {
             showFragment(StorageCheckFragment.newInstance(getCheckFragmentTitle()), true)
-        })
+        }
 
-        viewModel.locationChecked.observeEvent(this, { result ->
+        viewModel.locationChecked.observeEvent(this) { result ->
             val errorMsg = result.errorMsg
             if (errorMsg == null) {
                 setResult(RESULT_OK)
@@ -70,7 +71,7 @@
             } else {
                 onInvalidLocation(errorMsg)
             }
-        })
+        }
 
         if (savedInstanceState == null) {
             if (canUseStorageRootsFragment()) {
diff --git a/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageOptionsFragment.kt b/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageOptionsFragment.kt
index 6214633..fc84248 100644
--- a/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageOptionsFragment.kt
+++ b/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageOptionsFragment.kt
@@ -95,9 +95,9 @@
 
         listView.adapter = adapter
 
-        viewModel.storageOptions.observe(viewLifecycleOwner, { roots ->
+        viewModel.storageOptions.observe(viewLifecycleOwner) { roots ->
             onRootsLoaded(roots)
-        })
+        }
     }
 
     override fun onStart() {
diff --git a/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageRootResolver.kt b/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageRootResolver.kt
index 57cfdf6..9db71b6 100644
--- a/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageRootResolver.kt
+++ b/app/src/main/java/com/stevesoltys/seedvault/ui/storage/StorageRootResolver.kt
@@ -1,5 +1,6 @@
 package com.stevesoltys.seedvault.ui.storage
 
+import android.Manifest.permission.MANAGE_DOCUMENTS
 import android.content.Context
 import android.database.Cursor
 import android.graphics.drawable.Drawable
@@ -58,18 +59,22 @@
         return roots
     }
 
+    /**
+     * Used for getting a SafOption when we lack [MANAGE_DOCUMENTS],
+     * since we are not allowed to use [getStorageRoots] in this case.
+     */
     fun getFakeStorageRootForUri(context: Context, uri: Uri): SafOption {
+        val authority = uri.authority ?: throw AssertionError("No authority in $uri")
         return SafOption(
-            authority = AUTHORITY_STORAGE,
-            rootId = "fake",
-            documentId = "fake",
-            // TODO: Use something other than the USB icon?
-            icon = getIcon(context, AUTHORITY_STORAGE, "usb", 0),
+            authority = authority,
+            rootId = ROOT_ID_DEVICE,
+            documentId = DocumentsContract.getTreeDocumentId(uri),
+            icon = getIcon(context, authority, ROOT_ID_DEVICE, 0),
             title = context.getString(R.string.storage_user_selected_location_title),
-            summary = context.getString(R.string.storage_user_selected_location_summary),
+            summary = "Please open a bug if you see this",
             availableBytes = null,
-            isUsb = false, // TODO: Check this if possible instead of forcing false
-            requiresNetwork = false, // TODO: Check this if possible instead of forcing false
+            isUsb = false, // FIXME not supported without MANAGE_DOCUMENTS permission
+            requiresNetwork = authority != AUTHORITY_STORAGE && authority != AUTHORITY_DOWNLOADS,
         )
     }
 
@@ -123,15 +128,19 @@
             authority == AUTHORITY_STORAGE && rootId == ROOT_ID_DEVICE -> {
                 context.getDrawable(R.drawable.ic_phone_android)
             }
+
             authority == AUTHORITY_STORAGE && rootId != ROOT_ID_HOME -> {
                 context.getDrawable(R.drawable.ic_usb)
             }
+
             authority == AUTHORITY_NEXTCLOUD -> {
                 context.getDrawable(R.drawable.nextcloud)
             }
+
             authority == AUTHORITY_DAVX5 -> {
                 context.getDrawable(R.drawable.davx5)
             }
+
             else -> null
         }
     }
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index fa1b561..502ba39 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -59,7 +59,6 @@
     <string name="storage_fragment_warning">People with access to your storage location can learn which apps you use, but do not get access to the apps\' data.</string>
     <string name="storage_fragment_warning_delete">Existing backups in this location will be deleted.</string>
     <string name="storage_user_selected_location_title">User-chosen location</string>
-    <string name="storage_user_selected_location_summary">Chosen using the folder browser</string>
     <string name="storage_fake_drive_title">USB flash drive</string>
     <string name="storage_fake_drive_summary">Needs to be plugged in</string>
     <string name="storage_available_bytes"><xliff:g example="1 GB" id="size">%1$s</xliff:g> free</string>
