Searching for someone to test File Browser's Root Mode on SFOS 4.4

I disabled sandboxing for File Browser’s root starter and implemented that you now have to enter your device lock code to start the app as root.

My phone is not yet updated to SFOS 4.x though, so I was hoping someone could test whether everything works as intended. Namely:

  1. install “harbour-file-browser-root” (v1.2.1): armv7hl rpm or from the link below
  2. install the Harbour store version of File Browser: armv7hl rpm or from below
  3. start File Browser normally to check if it starts
  4. start File Browser from the root mode icon (“File Br. (Root)” in the launcher)
    All highlight colors should be blue now, and you should get asked for your security code. Enter your code, confirm. You should now see the contents of /root.
  5. uninstall File Browser from the launcher (long press → “x”)
  6. install the OpenRepos version of File Browser: armv7hl rpm or from below
  7. repeat steps 3 and 4 with the OpenRepos version

All packages (for all architectures) are available here: Release v2.5.1-2 (root mode tests) · ichthyosaurus/harbour-file-browser · GitHub

If you want to go back to the released version from either Jolla’s Harbour store or from OpenRepos, you have to uninstall the app first.

2 Likes

Both work, but as I don’t have a code it start but without permissions to read /root (highlight is different though)

1 Like

Tried on XA2 Ultra, on 4.4.0.58

No password prompt. Installed both versions from your first two links. Regular browser app opens fine and allows me to browse around.

Root browser on the other hand opens to the root directory, but is empty and I get no prompt. Says “No permissions to read the folder.”

2 Likes

XA2, 4.4.0.58

Same as previous post, but I can browse most top-level folders (permissions at least 755) and view files like /opt/alien/build.prop - good enough for me. Thanks!

2 Likes

4.4 XA2 Dual EN-UK
Thank you for updating.
Here, RFB doesn’t look different than FB, no special highlight.
I can’t read protected directories like /boot/ or /root/. I says “no permission to read the folder”.
No password/pin either.

1 Like

After closer inspection and a lot of coffee the only difference between normal and root is the start-up directory - both versions run as defaultuser.

It’s the same for XA2, 10 II and GS290/Volla.

I also checked the PinePhone running 4.3.0.15: the only difference is that the Root version must be installed after the normal one.

1 Like

Thank you all very much for your efforts! As @Ahtisilli says, it appears that the “root starter” fails to actually start the app with root privileges, even though the app sometimes (?) thinks it is running as root.

What is a bit puzzling as well, is that the device lock prompt does not work for all (?) of you. In fact, the app should show a page “authentication not possible” if it cannot authenticate the user but instead it seems to happily show the normal folder view.

This might be a hint that it doesn’t even think it is running as root. Then again, why would it start at /root instead of /home/... if the user is not root? This is weird…

I had hoped that it would work by simply disabling sandboxing for the “root starter” (root mode + Harbour version), or for both the starter and the actual app (root mode + OpenRepos version). There must be a way to make sure the “root starter” can start the app without sandboxing. I’ll need to investigate this further.

Thanks again, everyone! :slight_smile:

1 Like

Any time! Hope to see this resolved, and let me know if/when you need future testing :smiley:

1 Like

I tried qCommand and bash scripts but had two problems: how to pass the password (my efforts asked for my password first and then the intended unlock code; the easier solution is to configure sudo to not ask for passwords but I’m not comfortable with that) and use the user’s environment (root can’t launch UI programs).

Not elegant but this really works:

  1. install sudo (or use the one you installed the day you got your phone) and configure /etc/sudoers and/or /etc/group
  2. save this in a file somewhere (I use /usr/local/bin), replace userpassword with your password and make the file executable with chmod +x

echo userpassword | sudo -S -E env XDG_RUNTIME_DIR=/run/user/100000 WAYLAND_DISPLAY=…/…/display/wayland-0 harbour-file-browser

  1. copy (as root) /usr/share/applications/harbour-file-browser-root.desktop and edit it:
  • change the Name (also the translated one) so you can tell this one from the original
  • change the Exec line to
    Exec=invoker --type=generic -s sh -c “/path/to/your/file”
  1. tap on the new icon

Optional: try the command in qCommand and Terminal.

2 Likes

My workaround works well, just two issues:

  • user and root share the same settings: both start in the user directory and share their bookmarks
  • I’d like to start in Places, not the user (or root) directory

Any news about how to have working root file manager in SFOS 4.5 (I’ve an Xperia 10 III and SFOS 4.5.0.21), maybe without security issues that can occur with the (good but…) @Ahtisilli’s workaround?

Not yet, sorry… I’d prefer something simpler than that workaround but I didn’t find a solution yet.

Sailfish OS hasn’t a way to show an interactive message where to insert the administrator password similar of what @nephros with Toggle XPeria 10III Cameras or Blocky by @ilpianista did? (Maybe it’s different because both require the screen lock code instead of administrator password? :thinking:)
If there’s a way to do the above, there would be a way to correctly execute, as administrator, the env XDG_RUNTIME_DIR=/run/user/100000 WAYLAND_DISPLAY=../../display/wayland-0 harbour-file-browser command, so we could get the root for your file browser again.

1 Like

File Browser already asks for the screen lock code when started as root. The problem is that it appears to be running as root but somehow doesn’t get root privileges. Asking for the lock code doesn’t grant any privileges either, it’s just a way to block access to the app.

I had a quick look at the camera patch you mentioned but I didn’t see how it is asking for the lock code. I’ll have to look at this and Blocky in more detail…

1 Like

I briefly looked at both source codes and also found nothing :frowning_face:.
Maybe it’s possible to contact the owner and ask them help?! :thinking:
There is a way to edit your start-root and, instead of system("su -c 'mkdir -p /run/user/0/dconf' && su -c 'invoker --type=silica-qt5 -n /usr/bin/harbour-file-browser'"); command, call the above one?

1 Like

That prompt is done (automatically) via polkit when you do a dbus call that requires authentication.

That doesn’t help or apply to this case here though.

1 Like

Of course; I think I already tried that. I’m not quite sure at the moment, though, so I’ll check that again!

Ah I see, thanks for clarifying! Too bad we can’t use that here…

1 Like

Quoting Seb Vettel: “Ich bin sehr happeee” with the root browser.

It’s easier to put the command in qCommand and let it create the .desktop file. Creating the file in ~/.local/share/applications/ doesn’t require root.

Feature requests (user and root):

  • open with editor (I use nano), or even better, open ro/open rw
  • create/paste symlink
  • open terminal in current directory
  • if file exists, Overwrite/Rename old/Rename new/Cancel
3 Likes

… but it bugs me that it’s just a workaround :wink:

These are already implemented but not yet released (changelog).

On my wishlist as well! Both will be implemented soon™.

5 Likes

Root mode is fixed with version 1.3.0 that I just released on Openrepos :partying_face:

These features (and much more, like editing the target of symlinks) are now released in version 3.0.0 that I just published. The harbour version will probably take long to be approved (holidays), but the Openrepos version is public now.

6 Likes