Page 2 of 3

Posted: 2017-06-12, 20:01 UTC
by Dharmendra
even if I move Total Commander app to /system/app and give it root rights, it doesn't make any difference. it still uses copy and delete commands to move a file. why my default file manager can use move command on sd and TC can't ?

Posted: 2017-06-15, 08:42 UTC
by ghisler(Author)
Are you on Android 7? Older Android versions do NOT have the move function.

The default file manager is a system app signed either by Google or the device manufacturer. System apps do not have the ricdiculous restrictions imposed on installed apps.

Posted: 2017-06-21, 08:28 UTC
by Dharmendra
I am on Android 6.0, my default Android file manager provided with rom can move files without any problem but I've tried all popular file managers in play store and they all use copy and delete to move files even if I move them to /system/app

Posted: 2017-06-21, 08:32 UTC
by Dharmendra
how can I remove these restrictions from TC? is there any work around for rooted phone?

Posted: 2017-06-22, 08:32 UTC
by ghisler(Author)
You probably can't - "system" is on a different partition of the flash memory than the user data, so the files need to be copied then deleted.

Posted: 2017-06-22, 16:45 UTC
by Dharmendra
it looks like you misunderstood my comment. by saying move to /system/app I ment to say that I made them system app, ofcourse data and system are different partitions so we need to copy and delete, but as my OS is rooted I moved all popular file managers from market to system partition in the hope that it might remove the restriction you mentioned earlier, but it doesn't. moving a file from external sd card to some other folder in external sd card also uses copy and delete command even when TC is system app (only my defaults file manager supplied with ROM does the magic and can move it).

anyway it may be because they are not signed with some system certificate as you said. thank you for your valuable time.

Posted: 2017-06-26, 13:57 UTC
by ghisler(Author)
Giving the Total Commander apk root rights doesn't help at all - it's just a zip containing java byte code and a few C libraries, not executable code. TC usually calls the shell via "su" and then uses the shell command "mv" to move the file, something like this:
sendShellRequest("mv \""+escapeName(fullsrc)+"\" \""+escapeName(fulltrg)+"\"")

Does "rename" within the same folder work? It uses the same command.

Posted: 2017-06-26, 20:23 UTC
by Dharmendra
Yes, I've tried moving 1 GB file and renaming within same folder works fine, but moving to other folder takes one minute as it uses copy and delete. I also have tried 'mv' command using a terminal emulator and it can move files within external sd without any problem (within folder and to the other folders). looks like TC is not using same command, otherwise it would give me same result...!

Posted: 2017-06-29, 08:38 UTC
by ghisler(Author)
OK, I will check it in the debugger.

Posted: 2018-01-22, 15:46 UTC
by beholder
This issue still persists, samsung galaxy j3, android 5.11.

I have tried moving large files from sd to same sd with the stock "My Files" app and it was instant. Total cmd copies and deletes instead, making the "moving' extremely slow. Please look into it, a lot of people have samyong phones.

Posted: 2018-01-22, 15:54 UTC
by ghisler(Author)
"My Files" is a system app, it has more rights than user-installed apps. Moving files on SD card is only possible on Android 7 and newer, sorry.

Posted: 2018-01-22, 16:54 UTC
by beholder
I see, was pondering about the same thing. Can't you just issue some kind of terminal request which would take care of moving? Perhaps I am too spoiled from Windows though.

Posted: 2018-01-25, 10:06 UTC
by ghisler(Author)
No, unfortunately there isn't any such command. :(

Posted: 2018-07-01, 10:31 UTC
by SimpleThunder

Posted: 2018-07-02, 07:57 UTC
by ghisler(Author)
Normal Java file functions cannot write on external SD card. You need to use the Documents API, DocumentsContract.

Reaming is done with renameDocument. It does NOT work between two folders, only within the same folder.

Moving is done with moveDocument. But this is only supported in Android 7 (API Level 24) and newer.