This forum uses cookies. Click X button to hide this message. What is stored? 
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unable to edit files in /system

 
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander for Android Printable version
View previous topic :: View next topic  
Author Message
benboggart
Junior Member
Junior Member


Joined: 18 Apr 2017
Posts: 7

PostPosted: Tue Apr 18, 2017 7:40 am    Post subject: Unable to edit files in /system Reply with quote

I am unable to save changes to /system/etc/media_paths.xml, always getting
Quote:
Fehler beim Schreiben in Datei

Temporarily, access rights of the file - and for good measure also those of /system and /system/etc - are all set to 777.
/system is rw-mounted via the dedicated button in TC, or via the respective automatic dialoge - both being followed by "Re-Mount erfolgreich"

I'm quite the noob regarding android, but familiar with other linuxes. This is a first, and I'm running a stable but unofficial Lineage OS (Nougat 7.1.1) with root access being enabled via the developer option tick. (For reference, the bloated ES File Explorer is capabable of editing the file in question. And TC is capable of, e.g., creating a new folder in /system/etc))

When trying to figure out what's not working, I stumbled across something which may or may not have something to do with it. In a terminal emulator, and before enabling rw, the response to mount is
as user:
Quote:
/dev/block/platform/msm_sdcc.1/by-name/system/ on /system type ext4 (ro,seclabel,relatime)

as su:
Quote:
/dev/block/mmcblk0p21 on /system type ext4 (ro,seclabel,relatime)

After enabling rw via the TC button, the response is
as user:
Quote:
/dev/block/platform/msm_sdcc.1/by-name/system/ on /system type ext4 (ro,seclabel,relatime)

as su:
Quote:
/dev/block/mmcblk0p21 on /system type ext4 (rw,seclabel,relatime)

Disabling rw via TC set me back to the initial state. And a mount -o remount,rw /system from the terminal emulator gives me the same results.

I have no clue, whether these dual (?) mount points are default android behvaiour, and whether this may disturb TC, but I'll be grateful for any hints on how to solve the problem at hand. Thanks!
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34715
Location: Switzerland

PostPosted: Tue Apr 18, 2017 7:56 am    Post subject: Reply with quote

Try the latest beta. Android 7 doesn't accept the usual remount command, it requires a slightly different parameter:
mount -o rw,remount /system
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
benboggart
Junior Member
Junior Member


Joined: 18 Apr 2017
Posts: 7

PostPosted: Tue Apr 18, 2017 8:15 am    Post subject: Reply with quote

Thanks for the quick reply!
Are you sure about the parameter order change? Because when entered via Terminal Emulator, -o remount,rw or -o rw,remount do not produce different results for either su or user - and thus the exact same result as the released TC. At least it appears so from the output of mount. Where should differences become visible?

ps: In the meantime I try to figure out, how a beta can be installed. I gues Play Store isn't the way to go, right?
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34715
Location: Switzerland

PostPosted: Tue Apr 18, 2017 8:33 am    Post subject: Reply with quote

It may depend on the manufacturer and ROM, but in general Android 7 only accepts the new parameter order.

To get the beta from play store, click here:
https://play.google.com/apps/testing/com.ghisler.android.TotalCommander
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
benboggart
Junior Member
Junior Member


Joined: 18 Apr 2017
Posts: 7

PostPosted: Tue Apr 18, 2017 9:57 am    Post subject: Reply with quote

I've just installed the beta. As tested in the Terminal Emulator command line before, for TC too, the behaviour remains exactly as described in the initial post.

I don't think this is an issue of the command itself. It does mount with rw privileges for su as it's supposed to. These privilege changes are just not extended to the user/editor who apparently sees /system via a different mount point where it remains read-only.

Is this "dual" mount point approach standard for android?
Back to top
View user's profile Send private message
benboggart
Junior Member
Junior Member


Joined: 18 Apr 2017
Posts: 7

PostPosted: Thu Apr 20, 2017 2:57 am    Post subject: Reply with quote

Sorry to bother you - but do you agree with my explanation or do you suspect something else?

If this will be adressed in the forseeable future, I'm absolutely willing to wait this out and install/deinstall ES File Explorer whenever I need to edit system files, but otherwise I'd try to get comfortable with some alternative.

Thanks!
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34715
Location: Switzerland

PostPosted: Thu Apr 20, 2017 6:52 am    Post subject: Reply with quote

Which editor do you use? The built-in editor does request root rights too to write to such a system file. What you can try is check and (if necessary) change the file permissions (via properties). If this file is set to read only, saving it will fail.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
benboggart
Junior Member
Junior Member


Joined: 18 Apr 2017
Posts: 7

PostPosted: Thu Apr 20, 2017 1:55 pm    Post subject: Reply with quote

This is not the issue here; please see to my initial post:
Quote:
access rights of the file - and for good measure also those of /system and /system/etc - are all set to 777.

The editor (yes, the built-in) cannot save despite all rights being set to 777.

Fact is, the TC rw-button does only provide su with rw-access to /system, while the user (and thus the editor) remains with ro-access. As detailed above, my guess is this occurs due to the dual mount points, but I know too little about android to be certain.
Back to top
View user's profile Send private message
benboggart
Junior Member
Junior Member


Joined: 18 Apr 2017
Posts: 7

PostPosted: Sun Apr 23, 2017 3:21 pm    Post subject: Reply with quote

Hi! Again, I'm sorry to bother you, but I still very much like to know whether you agree with my explanation or suspect something else.

I am in no way pushing for you to solve anything; at this point I'd just like to know whether you're aware of and understand the actual issue, and whether this will be adressed in the forseeable future of TC.
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34715
Location: Switzerland

PostPosted: Mon Apr 24, 2017 6:38 am    Post subject: Reply with quote

I don't know why it fails for you. Maybe the parent directory is set to read only...
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
benboggart
Junior Member
Junior Member


Joined: 18 Apr 2017
Posts: 7

PostPosted: Mon Apr 24, 2017 3:48 pm    Post subject: Reply with quote

Actually, I would really appreciate if you could just for once give your opinion on my explanation with the dual mount points.

I've addressed your last suggestion "Maybe the parent directory is set to read only" as well as the previous one "change the file permissions" already in the opening post, so you have me feel a bit stupid now. Assuming, you are really in a hurry and just skimming through the respective last post of this thread I could once more reply with that quote
Quote:
access rights of the file - and for good measure also those of /system and /system/etc - are all set to 777

but again, I would really appreciate if you'd just take the time to consider my explanation and give your opinion on it.

I'll reurgitate said explanation to make is as easy as possible:
  1. We're talking /system/etc/media_paths.xml (example only). Access rights of file and complete path-dirs are set to 777.
  2. Per default, su has /system mounted via /dev/block/mmcblk0p21, whereas user has /system mounted via /dev/block/platform/msm_sdcc.1/by-name/system.
  3. TC's RW-button initiates the remount command with su-rights. The rw-remount of /dev/block/mmcblk0p21 onto /system is successful, and su gains write access.
  4. The remount does not affect the mount point /dev/block/platform/msm_sdcc.1/by-name/system, and thus the user does not gain write access to /system.
  5. TC's editor does not gain write access, since it is operating with user rights.

Please let me know if you want me to detail any of the points, or if you find them plausible and agree the remount does not work as intended.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Total Commander for Android All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group