Timestamps not kept when copying on USB key + diverse points

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Timestamps not kept when copying on USB key + diverse points

Post by *sjlouis »

Hi,

Since I updated to AICP 11.1 and Marshmallow in October 2016, I have timestamps problems with the file managers I used (ES Explorer and Script Manager). Then I discovered Total Commander on xdadevelopers and I use it fine since a few months :P . But I have some problems.

First, AICP was based on Cyanogenmod and probably now on Lineage OS.

If TC keeps well timestamps between the internal memory and the external SD card, it doesn't keep them from phone to USB key. And I can't delete a file on USB key.

And quickly after the update, TC couldn't keep timestamps. I've done a lot of AICP rom flash until I could keep timestamps between the internal memory and the external SD card but it was impossible to delete a file on USB key. There were the same problems with Cyanogenmod.

This week-end I updated to AICP 12.1 and Nougat and I now it is possible to delete a file on USB key.

I have the same problem with timestamps from phone to USB key, it's good from USB key to phone (I don't remember if I could do it with the previous version). And if we can copy files, we can't move them (even if it's not very annoying).


Other notes :

I don't know if you can help me but with Marshmallow, when TC took SU right, a "#" displays in notification bar. It was convenient. Now with Nougat a window with "Total Commander is granted Superuser rights" displays a few seconds. I have to wait to see under the window, it's annoying. Do you know how to stop it or reduce it?

Why TC displays "USB" for the external SD card? It can be confusing.

Why TC displays numbers and letters for external SD card and USB keys? It's Androïd which returns them? It's not convenient.

In the parameters, I've chosen "Long press on return" to exit TC but it returns to parent directory. The 2 other choices works well.


Thank you very much for this good little product :P .
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

How do you access the USB key? Which path is shown?
I don't know if you can help me but with Marshmallow, when TC took SU right, a "#" displays in notification bar. It was convenient. Now with Nougat a window with "Total Commander is granted Superuser rights" displays a few seconds. I have to wait to see under the window, it's annoying. Do you know how to stop it or reduce it?
This isn't Total Commander's doing, but the su tool you use (probably SuperSU or SuperUser). Check its settings.
Why TC displays "USB" for the external SD card? It can be confusing.
You may want to try the beta. In the release version, TC sees the numeric name and assumes that it's a USB device, because on older Android versions, only USB sticks had these numeric names.
Why TC displays numbers and letters for external SD card and USB keys?
You can rename them in the beta.
In the parameters, I've chosen "Long press on return" to exit TC but it returns to parent directory. The 2 other choices works well.
This may not work in all Android versions.
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 »

When I connect an USB key the first time, I have (sorry, it's in French but you understand it very well :wink: ) :

"Location définie par l'utilisateur
carte SD, USB..."

I choice the key in the menu and after I have an SD card icon and "2C9E-6AE0" in the directories tree.

A little comment "location" is not the good word in French, I think you wanted to use "Localisation" or "Emplacement". The second one seems to me more comprehensive.

*****************

For the displays with "USB" and serial numbers, It seems to me it appeared with Androïd 6.1. Previously there was SDcard1 for external SD card and USB for all USB keys.

If you want, I can test beta version.

*****************

I shall see to Super User.

*****************

Long press doesn't work only with Nougat? Do you think you can correct it?

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

Post by *ghisler(Author) »

I see - unfortunately there is no functionn to set the timestamp with this new access scheme. :(

TC needs a real path in the file system like /mnt/usb0 or so to use root functions to set the file time. Please check whether the USB key appears under /mnt or /media or so. If yes, use that location to access it.
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 »

Ok. I haven't "/media", only "/storage" and under storage, there is only "emulated", "6162-3265" which is external SD card and "self". I don't know what is the interest of "self".

When I click on "SD card", I have this path : "/storage/emulated/0" in the left high corner.
With external SD card : "/storage/6162-3265".
With USB key : "///_2C9E-6AE0" where "2C9E-6AE0" is the USB serial number.

Is it possible to do something to add USB key under "/storage"? Is it a Nougat problem? Cyanogenmod (or Lineage OS) problem?

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

Post by *ghisler(Author) »

Yes, you would need to mount the USB drive in the traditional Unix/Linux way with the mount command. But you need to find out the device name for that. Then create a directory, e.g. "usb" under /storage, and a button with
Command: su
Parameters: mount /dev/devicename /storage/usb

To unmount, add a button like this:
Command: su
Parameters: umount /storage/usb

There seem to be a few USB mount tools in the play store, but I haven't tried them.
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 »

Is its name its serial number as "2C9E-6AE0"? TC sees this name.

Or the name I gave it : "CLE-FICHIERS"? Standard parameters in storage sees this name.

Why it is not automatically mounted as previously?
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

Even if I don't know very well Unix, sometimes I use Kubuntu on my PC or in my satellite box. So I'm surprised I don't find "/media" and "/dev" directories. And I don't find sda1, sda2, sdb1...

If I can see the USB key in "system parameters/storage", that means the key is mounted, isn't it?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's not mounted, it's accessed in a way that the Linux file system can't see it.
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 »

And ist it a Nougat problem? A Cyanogenmod problem?

And how can I get the USB key name? There is no sdxx in /dev.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Actually this new access method was introduced with Andoid 6 (Marshmallow). However, if rooted you should still be able to mount the USB stick to a real path in the file system.
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 had the same problem with Marshmallow but I don't know how to mount the key, I haven't found /dev and sdxx.
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

It's good. I've searched for "sda*" from "/" and it was created in "/dev/block" after I inserted the key. There is no sdxx without key, then no sdxx for external sd card.

Then I created "/storage/usbkey" and I tested "mount -t vfat /dev/block/sda1 /storage/usbkey" and it works. If I take this link, I can keep timestamps when I copy a file on the USB key and I see the key with Script Manager. So I hope I should use again my backup script with rsync.

Thank you very much ghisler :P but I don't understand why Google have reduce this possibility :( .
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

Just a little problem. I unmounted the key and I connected it again but this time, it was sdb1 :? .
sjlouis
Junior Member
Junior Member
Posts: 34
Joined: 2016-10-19, 11:04 UTC

Post by *sjlouis »

As it increments the device every time I insert the key, so I can have successively sda1, sdb1, sdc1, sdf1... I wrote a script to get its device name. I don't know if it's "very pretty" but it works :

cd /dev/block
fichier=`ls sd*1`

for fichier in $fichier
do
mount -t vfat $fichier /storage/usbkey
done

where usbkey is the directory I've created under /storage. But this directory doesn't exist any more after a phone restart. I don't know why.

Thank you ghisler :D .
Post Reply