Page 1 of 2

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

Posted: 2020-05-19, 01:47 UTC
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

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

Posted: 2020-05-19, 06:40 UTC
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.

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

Posted: 2020-05-19, 17:05 UTC
by mrle

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

Posted: 2020-05-21, 01:37 UTC
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?

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

Posted: 2020-05-21, 19:18 UTC
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.

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

Posted: 2020-05-22, 14:09 UTC
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?

to ghisler(Author)

Posted: 2020-05-22, 14:55 UTC
by AndriusS
What is wrong about "Overwrite" functionality (see my post above)?

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

Posted: 2020-05-24, 16:11 UTC
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

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

Posted: 2020-05-26, 13:46 UTC
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?

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

Posted: 2020-05-26, 14:06 UTC
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.

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

Posted: 2020-07-26, 09:44 UTC
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.

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

Posted: 2020-07-28, 08:11 UTC
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.

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

Posted: 2020-07-28, 10:22 UTC
by Digika
is build available anywhere?

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

Posted: 2020-07-29, 14:30 UTC
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).

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

Posted: 2020-07-29, 16:43 UTC
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.