Root availability check

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
tag
Junior Member
Junior Member
Posts: 61
Joined: 2014-12-11, 11:03 UTC

Root availability check

Post by *tag »

On xda someone has the problem the timestamp is not copied, although he believes to have root with AICP ROM 11

http://forum.xda-developers.com/android/general/guide-timestamp-attributes-correct-t2960935/page10

Now my questions are:
1. Is the test fine which I recommended: If /sbin is not visible, root access is not working?
2. Does there exist a more general test for TC root availability? Some logfile where TC is telling if root is available? Some button that is only displayed if TC successfully gets root access? Does the 'remount system RW' button change its color if available?

In another Explorer /sbin is visible, but not in TC, although he gets displayed root access was granted for TC. If root is not available, what must be fulfilled to get it working?
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

I'm the one which have this problem. Thank's tag :) .

I've just done a migration on AICP 11 which is based on CyanogenMod 13. Previously, I was with AICP 10 (CyanogenMod 12).

When I use other applications which use "root", I have "#" in the notification bar. With Total Commander, it appears very quickly in the bar when I activate "root" in Options. Is it normal or doest it means I'm not really in "root"?

Tag asks me to do tests with "root" and "cp -p" to preserve attributes. I've done tests with :
- SManager (Script Manager) but the timestamps were not kept,
- Terminal Emulator but the timestamps were not also kept.

I'm afraid this is a CyanogenMod bug :? .
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Are you able to enter protected paths like /data/data? If not, then TC doesn't recognize root correctly. If yes, then setting timestamps via root must be failing.
Author of Total Commander
https://www.ghisler.com
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

Yes I can, but I don't see theses directories with TC :
"/sbin"
"/oem"
"res"

With Script Manger I can also see in the tree under "/" :
"bin -> /system/bin/"
"d -> /sys/kernel/debug"
"etc -> /system/etc"
"sdcard -> /storage/self/primary"
"tombstones -> /data/tombstones"
"vendor -> /system/vendor"
"charger -> /sbin/healthd"

With Cheetah File Manger, I see the 3 directories of the first group and for the second group, "charger" and "tombstones" haven't a directory icon but a grey icon with "?". There are a lot of files with this icon.

I've asked about the "#" which doesn't appear in the notification bar. Is it normal?

Thank you :) .
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

They are probably links, not directories - try looking for them at the end, among the files.
Author of Total Commander
https://www.ghisler.com
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

Yes all the files with "->" are with the files but I haven't the 3 first directories.

I don't know if it's the same problem but I've just seen if I can copy a file between internal memory and external sdcard, I can't move it, I haven't the button "move", in fact "déplacer" in my language.

Do you prefer I write in French?
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

If "cp -a" or "toolbox cp -a" doesn't keep timestamps, rsync can do it :shock: . Very strange.
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

I've installed CyanogenMod 13 and the first time it takes the previous system and user data and parameters, then TC didn't keep time stamps. I installed again CM 13 after formatting system and user data and then TC kept timestamps.

There is only a little bug, from external sdcard to internal memory with copy, I have to refresh the screen to see the original date, otherwise I see the date and hour of the "now" moment.

Then, I have to reinstall all my rom to avoid interaction with "old" parameters.

Thank you ghisler :) .
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48075
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It may be a file system permission problem: That's the reason why setting timestamps via Java fails too: The user doesn't have permission to set timestamps.
Author of Total Commander
https://www.ghisler.com
tag
Junior Member
Junior Member
Posts: 61
Joined: 2014-12-11, 11:03 UTC

Post by *tag »

sjlouis was told to do su before the cp -a to make copy timestamp with superuser rights. Did you always do that, sjlouis?
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

Yes, I'm root but in some case, if I can do copy, I can't do move :shock: . The only way to keep timestamps is to use TC. Other file manager and internal commands don't work. It's incredible and I don't know how you do :shock: :P .
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

I've reinstalled Busybox in /sbin as another guy asks me and I add "cp" and "mv" from Busybox. They keeps timestamps while while standard and toybox commands don't do it. It's a good thing for my scripts .

And now I can see /sbin with TC.
Post Reply