Page 1 of 4

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

Posted: 2014-06-06, 12:13 UTC
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.

Posted: 2014-06-09, 08:45 UTC
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.

Posted: 2014-06-12, 14:31 UTC
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".

Posted: 2014-06-13, 09:06 UTC
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.

Posted: 2014-06-16, 09:37 UTC
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.

Posted: 2014-06-16, 09:45 UTC
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!

Posted: 2014-06-16, 09:49 UTC
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.

Posted: 2014-06-16, 13:10 UTC
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.

Posted: 2014-06-19, 09:45 UTC
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.

Posted: 2014-06-19, 10:41 UTC
by NoSubstitute
Ok, I'll see if I can figure this out tonight or tomorrow.

Posted: 2014-06-20, 01:19 UTC
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

Posted: 2014-06-23, 09:53 UTC
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

Posted: 2014-06-23, 13:45 UTC
by TheByteSmasher
I'll try it, but having to input my own command sorta defeats the purpose of a GUI...

Posted: 2014-06-23, 15:37 UTC
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

Posted: 2014-06-23, 19:19 UTC
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.