TC on rooted KitKat can write to / but not delete!

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

User avatar
NoSubstitute
Junior Member
Junior Member
Posts: 47
Joined: 2012-02-08, 10:45 UTC
Location: Malmö, Sweden

TC on rooted KitKat can write to / but not delete!

Post by *NoSubstitute »

I couldn't' see whether Android bugs should be reported among regular bugs, so I posted here instead. Please, move the thread, if it's in the wrong place.

I just tried with both 204 and 205 and both apps can write to /root (mkdir test), but neither of them can delete (rmdir test).

I noted that when running the New dir process the app asked if it should remount / as rw, but it never did that when I tried to remove the dir. I'm guessing that process doesn't do the same check to see if the fs is indeed mounted rw. Instead it gave me this error message.

http://imgur.com/LHN9RyX

When I user the Terminal Emulator as su, running the remount command manually, I can do rmdir just fine.

Also, important to note, while the new File Commander from KitKat can edit content on the external SDcard, it can't access the real root ( / ) of the internal memory.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Please check the option "root functions everywhere" in the TC settings. This will add a mount button. Once it is there, please uncheck "root functions everywhere", it should only be left checked in case of problems.

Now you can make the partition read/write to delete files.
Author of Total Commander
https://www.ghisler.com
User avatar
NoSubstitute
Junior Member
Junior Member
Posts: 47
Joined: 2012-02-08, 10:45 UTC
Location: Malmö, Sweden

Post by *NoSubstitute »

ghisler(Author) wrote:Please check the option "root functions everywhere" in the TC settings. This will add a mount button. Once it is there, please uncheck "root functions everywhere", it should only be left checked in case of problems.

Now you can make the partition read/write to delete files.
I have always had that option checked, but never before, and not now, have I seen a "mount button".
User avatar
NoSubstitute
Junior Member
Junior Member
Posts: 47
Joined: 2012-02-08, 10:45 UTC
Location: Malmö, Sweden

Post by *NoSubstitute »

I found the button in landscape.

Ok, it only displays the little dialogue that it remounts as rw, but that doesn't actually happen. It remounts perfectly to read only, but it can't remount as write capable.

I verified this by doing it manually in Terminal Emulator, in which I can run rmdir after running "mount -o remount,rw -t rootfs rootfs /" (the exact command TC says it just ran. Checking with "mount" I can clearly see that / is still ro.

If I tell TC to remount as ro, after I mounted it rw with Terminal, it does so perfectly! Also, it seems that remounting / manually still doesn't allow TC to delete, so it seems those rights are kept in separate threads. Which I find most impressive; never knew that was possible.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Do you use a different mount command than my function? TC shows the mount command used when you tap on the button.
Author of Total Commander
https://www.ghisler.com
User avatar
NoSubstitute
Junior Member
Junior Member
Posts: 47
Joined: 2012-02-08, 10:45 UTC
Location: Malmö, Sweden

Post by *NoSubstitute »

No, I use the exact command that is displayed by TC.
Only difference is, when I do it manually in Terminal Emulator, it works.

TC can, for me, not remount to rw.
It can remount from rw to ro!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Do you send this command as root user or as normal user? On newer Android versions, these permissions are user-specific. TC sends them as root, so you then need to use root functions to write there.
Author of Total Commander
https://www.ghisler.com
User avatar
NoSubstitute
Junior Member
Junior Member
Posts: 47
Joined: 2012-02-08, 10:45 UTC
Location: Malmö, Sweden

Post by *NoSubstitute »

When I do it manually, I must first do "su". If I don't it's not allowed.

Problem is with TC. When it tries to run the remount-rw it appears as if it did (no error messages), but the file system is still read only.

When it runs remount-ro it DOES work! But not rw.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It sounds like something is making the partition read only when su ends. This does not happen on my device, so it may be something specific to your device or root tools.

Try this: Create a button in TC with command: su
and two pararameters: The first line would be the mount command, and the second line would be a command which requires root, e.g. a copy command to the system partition. Then try to execute this. If my theory is right, it will work because su is running both commands after each other.
Author of Total Commander
https://www.ghisler.com
User avatar
NoSubstitute
Junior Member
Junior Member
Posts: 47
Joined: 2012-02-08, 10:45 UTC
Location: Malmö, Sweden

Post by *NoSubstitute »

Ok, I'll see if I can figure this out tonight or tomorrow.
TheByteSmasher
Junior Member
Junior Member
Posts: 39
Joined: 2012-09-27, 23:27 UTC

Post by *TheByteSmasher »

Christian, I have the same issue. KitKat 4.4.2-4.4.3. Beta 2.. example: I cannot delete /system/media/bootanimation.zip. I cannot modify a part and have it repack. I can do all that on my SD(internal) though. CM file manager can do it all with no issue. I'm using AOKP for nexus 4. Thanks
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48028
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You can try the same as I suggested to user NoSubstitute:
1. Go to /system
2. Click on the remount button, write down the mount command
3. Create a new button in TC:
- Function type: System command
- Command: su
-Parameters: First line the above mount command, second line the delete command, e.g.
rm /system/media/bootanimation.zip
Author of Total Commander
https://www.ghisler.com
TheByteSmasher
Junior Member
Junior Member
Posts: 39
Joined: 2012-09-27, 23:27 UTC

Post by *TheByteSmasher »

I'll try it, but having to input my own command sorta defeats the purpose of a GUI...
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

TheByteSmasher wrote:I'll try it, but having to input my own command sorta defeats the purpose of a GUI...
No it doesn't
You do that only once
TheByteSmasher
Junior Member
Junior Member
Posts: 39
Joined: 2012-09-27, 23:27 UTC

Post by *TheByteSmasher »

I understand that, I mean, that means I need to define a button for everything root that I want to delete... I just want to select something and delete/move etc, it. That's what root privileges are for.
Post Reply