Page 1 of 1

Root availability check

Posted: 2016-10-19, 04:31 UTC
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?

Posted: 2016-10-19, 11:24 UTC
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 :? .

Posted: 2016-10-19, 20:28 UTC
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.

Posted: 2016-10-20, 07:48 UTC
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 :) .

Posted: 2016-10-20, 13:00 UTC
by ghisler(Author)
They are probably links, not directories - try looking for them at the end, among the files.

Posted: 2016-10-20, 14:08 UTC
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?

Posted: 2016-10-20, 14:23 UTC
by sjlouis
If "cp -a" or "toolbox cp -a" doesn't keep timestamps, rsync can do it :shock: . Very strange.

Posted: 2016-10-21, 07:33 UTC
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 :) .

Posted: 2016-10-21, 16:07 UTC
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.

Posted: 2016-10-21, 18:47 UTC
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?

Posted: 2016-10-21, 19:37 UTC
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 .

Posted: 2016-10-22, 13:54 UTC
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.