TC on rooted KitKat can write to / but not delete!
Moderators: Hacker, petermad, Stefan2, white
- NoSubstitute
- Junior Member
- Posts: 47
- Joined: 2012-02-08, 10:45 UTC
- Location: Malmö, Sweden
TC on rooted KitKat can write to / but not delete!
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.
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.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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.
Now you can make the partition read/write to delete files.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- NoSubstitute
- Junior Member
- Posts: 47
- Joined: 2012-02-08, 10:45 UTC
- Location: Malmö, Sweden
I have always had that option checked, but never before, and not now, have I seen a "mount button".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.
- NoSubstitute
- Junior Member
- Posts: 47
- Joined: 2012-02-08, 10:45 UTC
- Location: Malmö, Sweden
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.
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.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
- NoSubstitute
- Junior Member
- Posts: 47
- Joined: 2012-02-08, 10:45 UTC
- Location: Malmö, Sweden
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
- NoSubstitute
- Junior Member
- Posts: 47
- Joined: 2012-02-08, 10:45 UTC
- Location: Malmö, Sweden
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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.
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
https://www.ghisler.com
- NoSubstitute
- Junior Member
- Posts: 47
- Joined: 2012-02-08, 10:45 UTC
- Location: Malmö, Sweden
-
- Junior Member
- Posts: 39
- Joined: 2012-09-27, 23:27 UTC
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
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
https://www.ghisler.com
-
- Junior Member
- Posts: 39
- Joined: 2012-09-27, 23:27 UTC
-
- Junior Member
- Posts: 39
- Joined: 2012-09-27, 23:27 UTC