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:
install “harbour-file-browser-root” (v1.2.1): armv7hl rpm or from the link below
install the Harbour store version of File Browser: armv7hl rpm or from below
start File Browser normally to check if it starts
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.
uninstall File Browser from the launcher (long press → “x”)
install the OpenRepos version of File Browser: armv7hl rpm or from below
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!
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.
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.
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:
install sudo (or use the one you installed the day you got your phone) and configure /etc/sudoers and/or /etc/group
save this in a file somewhere (I use /usr/local/bin), replace userpassword with your password and make the file executable with chmod +x
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?
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? )
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.
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…
I briefly looked at both source codes and also found nothing .
Maybe it’s possible to contact the owner and ask them help?!
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?
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
Root mode is fixed with version 1.3.0 that I just released on Openrepos
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.