[Bug, 3.0] Root access toast appears every time you navigate any root folder

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Digika
Junior Member
Junior Member
Posts: 41
Joined: 2019-05-26, 14:46 UTC

[Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *Digika »

"Total Commander was granted superuser rights" appears constantly. I can just open / and press refresh and it will appear again. That does not look very intended because it breaks navigation.
If you deny root if will show the same toast every navigation event but with different complaint.

Android 9 (MIUI)
Magisk 20.4
Root granted once per session
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *ghisler(Author) »

This warning is shown by Magisk, not Total Commander. It probably shows this warning every time Total Commander opens a root shell in the background. Total Commander doesn't keep the root shell open permanently, because that could be a security issue. Instead, it opens a new root shell for each group of operations:
1. Reading a directory
2. Copy/Move/Delete the selected files/folders (just one shell per operation, not per file)
3. Creating a new folder
4. Renaming a file/folder

Please check in the Magisk settings whether you can reduce these warnings, e.g. to once every 15 minutes or so.
Author of Total Commander
https://www.ghisler.com
Digika
Junior Member
Junior Member
Posts: 41
Joined: 2019-05-26, 14:46 UTC

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *Digika »

ghisler(Author) wrote: 2020-05-19, 06:40 UTC This warning is shown by Magisk, not Total Commander. It probably shows this warning every time Total Commander opens a root shell in the background. Total Commander doesn't keep the root shell open permanently, because that could be a security issue. Instead, it opens a new root shell for each group of operations:
1. Reading a directory
2. Copy/Move/Delete the selected files/folders (just one shell per operation, not per file)
3. Creating a new folder
4. Renaming a file/folder

Please check in the Magisk settings whether you can reduce these warnings, e.g. to once every 15 minutes or so.
Yeah, I know I can do that, I just didnt want to lose the ability to be notified about it since security of the rooted phone now relies on me more than ever.
ghisler(Author) wrote: 2020-05-19, 06:40 UTC Total Commander opens a root shell in the background. Total Commander doesn't keep the root shell open permanently, because that could be a security issue.
Speaking of security, when you try to modify any of the system/root partitions TC asks about remounting `/` for `rw`. According to 20.x Magisk release notes it is not longer recommended and deprecated:
https://github.com/topjohnwu/magisk_files/blob/2d7ddefbe4946806de1875a18247b724f5e7d4a0/notes.md

They now recommend to mount specific locations in magisk mirror. Do you plan to add option for that?
AndriusS
Junior Member
Junior Member
Posts: 11
Joined: 2020-03-03, 17:27 UTC

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *AndriusS »

I'm also facing an issue related to Root access, thus I'm not starting a new thread and I'm writing here...
My problem is as follows: I cannot overwrite files in system partition - the operation ends up with an error "Couldn't copy or move a file". So, I'm forced to execute the operation in two separate steps:
1. Firstly, to delete old file;
2. And then, to make an "copy/move" action.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *ghisler(Author) »

They now recommend to mount specific locations in magisk mirror. Do you plan to add option for that?
I cannot find any way to do this, is there any documentation?

As i understand it, you need to write a Magisk module for each file you want to replace?
Author of Total Commander
https://www.ghisler.com
AndriusS
Junior Member
Junior Member
Posts: 11
Joined: 2020-03-03, 17:27 UTC

to ghisler(Author)

Post by *AndriusS »

What is wrong about "Overwrite" functionality (see my post above)?
Digika
Junior Member
Junior Member
Posts: 41
Joined: 2019-05-26, 14:46 UTC

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *Digika »

ghisler(Author) wrote: 2020-05-22, 14:09 UTC
They now recommend to mount specific locations in magisk mirror. Do you plan to add option for that?
I cannot find any way to do this, is there any documentation?

As i understand it, you need to write a Magisk module for each file you want to replace?
No idea and never found anything explaining that, as if the Magisk devs consider it something obvious, go figure.
The only thing I found is some relevant info in the comments to this issue:
https://github.com/topjohnwu/Magisk/issues/1936
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *ghisler(Author) »

So have you tried going to
/sbin/.magisk/mirror/system_root/system
and putting files there?

Do they appear in normal system folder then?
Author of Total Commander
https://www.ghisler.com
Digika
Junior Member
Junior Member
Posts: 41
Joined: 2019-05-26, 14:46 UTC

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *Digika »

No, I didnt, I mean, the mounting if `/` still works, I just came across the news about Magisk and what they've changed in the light on these idiotic sporadic Android arch changes and felt like it might be worth to mention it to you since TC still remount `/` for rw to operate on root partitions/places.
Digika
Junior Member
Junior Member
Posts: 41
Joined: 2019-05-26, 14:46 UTC

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *Digika »

Consider using https://github.com/topjohnwu/libsu instead of requesting root shell every time:
An Android library that provides APIs to a Unix (root) shell.

Some poorly coded applications requests a new shell (call su, or worse su -c <commands>) for every single command, which is very inefficient. This library makes sharing a single, globally shared shell session in Android applications super easy: developers won't have to bother about concurrency issues, and with a rich selection of both synchronous and asynchronous APIs, it is much easier to create a powerful root app.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *ghisler(Author) »

TC 3.01 beta now caches the root shell as long as the app is in the foreground. Actually it uses separate shells for browsing directories and for file operations.
Author of Total Commander
https://www.ghisler.com
Digika
Junior Member
Junior Member
Posts: 41
Joined: 2019-05-26, 14:46 UTC

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *Digika »

is build available anywhere?
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *DrShark »

Digika wrote: 2020-07-28, 10:22 UTC is build available anywhere?
Currently beta 5 of v. 3.01 available: on Google Play or by direct download (both links are to newest available beta).
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Digika
Junior Member
Junior Member
Posts: 41
Joined: 2019-05-26, 14:46 UTC

Re: [Bug, 3.0] Root access toast appears every time you navigate any root folder

Post by *Digika »

Thanks.
This is a bit unrelated but any plans also port Yandex.Disk plugin from desktop?

Also, how does TC gets its list of installed apps? It is a bit weird tangled mix of user apps and system apps, but it is never quite correct. Ghost Commander manages to get them all, including all system apps but TC only gets like 40% of system apps.
Post Reply