TC not copying files to /system with android 10 and UI2.5

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
jfmacqueen
Junior Member
Junior Member
Posts: 4
Joined: 2020-11-14, 13:41 UTC

TC not copying files to /system with android 10 and UI2.5

Post by *jfmacqueen »

Our family has two very similar Samsung Galaxy phones -

One is an S10 ... running Android 10 and UI2.0 rooted with Magisk and using Total Commander
Two is an S20 ... running Android 10 and UI2.5 rooted with Magisk and using Total Commander

With the S10 (under UI2.0), I can use TC (and other root browsers) to copy files without any difficulty from internal or external storage into /system and /system/media ; I am doing this to personalise the Boot Animation screen show.

With the S20 (under UI2.5), I cannot use TC (or any other root browsers) to copy files into these root directories ... instead, when I attempt the operation, I get a message asking me to remount the drive as read/write and when this has been done the copy operation fails ... with a message 'could not create target file , error :34' and no file transfer has occurred.

I have checked the root status of both phones ... and they are properly rooted. I have checked the permissions on the relevant directories (they are RWXR-XR-X) normally (and copy fails) so I change them to RWXRWXRWX and the copy still fails.

Has any one else experienced this or has anybody got ideas about how to put the problem right ... ?
User avatar
nsp
Power Member
Power Member
Posts: 1816
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Moved: TC not copying files to /system with android 10 and UI2.5

Post by *nsp »

-- moved to TC Android thread. --
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC not copying files to /system with android 10 and UI2.5

Post by *ghisler(Author) »

You could try to copy the files directly to the Magisk overlay folder instead of /system, TC may get confused by some mounts files.
Author of Total Commander
https://www.ghisler.com
jfmacqueen
Junior Member
Junior Member
Posts: 4
Joined: 2020-11-14, 13:41 UTC

Re: TC not copying files to /system with android 10 and UI2.5

Post by *jfmacqueen »

Thanks for your reply ...

I'm not sure what or where the Magisk overlay folder is ... I downloaded and tried to install the module Overlay_Mount_Fix_v2.4 (which sees appropriate in the light of your reply) only to get the following message ...

'No overlay mounts detected! No need for this module! Aborting! Installation failed!'

Is there a path to the Magisk overlay folder that you mentioned and which I could follow ... ?

Regards ... JFM
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC not copying files to /system with android 10 and UI2.5

Post by *ghisler(Author) »

It seems to depend on the Android version. On Android 9, it's under
/sbin/.magisk/mirror
e.g. for the system folder it would be
/sbin/.magisk/mirror/system

When I copy a file to /system on a device with Magisk, it is copied to /sbin/.magisk/mirror/system as a kind of overlay file system. So when I copy a file to /sbin/.magisk/mirror/system instead, it also appears in /system.
Author of Total Commander
https://www.ghisler.com
jfmacqueen
Junior Member
Junior Member
Posts: 4
Joined: 2020-11-14, 13:41 UTC

Re: TC not copying files to /system with android 10 and UI2.5

Post by *jfmacqueen »

Thanks ... I can understand what you mean ... so I tried to go down that mirror track as now desceibed...

It turns out hat on my S20 with Android 10 (and UI 2.5) the Magisk overlay file is /sbin/.magisk/mirror/system_root/system ... However when I try to copy a file from either internal or external storage to that location ... the operations fails as before ...

I think I shall try to install Magisk on this phone (the S20 with Android 10) using the systemless recovery approach .. ie install TWRP and then Magisk ... this worked on my S10+ and the root browsers do the right thing. I'll tell you how it goes.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC not copying files to /system with android 10 and UI2.5

Post by *ghisler(Author) »

You could try to re-mount the partition to read/write manually, either with a button with function type "Internal command", command nr. 119, or with function type "Send system command" with command set to su and the mount command in the parameters.
Author of Total Commander
https://www.ghisler.com
xTMODx
New Member
New Member
Posts: 1
Joined: 2020-11-25, 08:09 UTC

Re: TC not copying files to /system with android 10 and UI2.5

Post by *xTMODx »

Hi I can confirm i have the same Problem with my Note 20 Ultra Android 10 and One Ui 2.5.
I couldnt fix with magisk overlay method and still looking for a solution.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC not copying files to /system with android 10 and UI2.5

Post by *ghisler(Author) »

Unfortunately I don't currently have any rooted Android 10 to test with. It's possible that Magisk had to make changes for Android 10 which don't allow the old copy method. The newest Android version I could test with is Android 9, where there is a port to Android X86.
Author of Total Commander
https://www.ghisler.com
jfmacqueen
Junior Member
Junior Member
Posts: 4
Joined: 2020-11-14, 13:41 UTC

Re: TC not copying files to /system with android 10 and UI2.5

Post by *jfmacqueen »

My plan to install TWRP on the S20 with Android 10 and then install Magisk root did not have the desired effect ... I had hoped to finish p with a system in which

a) Normal power on opened non-rooted system
b) Power on with Vol up opened up Magisk rooted system
c) Power on with long-press Vol up lead to recovery (TWRP)

What actually happened was that a) opened Magisk root system; option b) opened stock recovery and (sometimes) option c) opened TWRP recovery.

from topjohnwu (Magisk guru) which I have copied in the following extract:

So I gave up ... and surfed the net for more info where I came across the following info from

topjohnwu (https://github.com/topjohnwu
specifically to be found in the link
https://github.com/topjohnwu/magisk_files/blob/6510533d6a8bb751152539919f57bb616c2405af/notes.md)

This might be relevant to my problem of copying files (gaining root access) to /system; topjohnwu writes:

<< =========================================================================================>>
Starting with v19.4, Magisk will follow how Google has designed system-as-root: mounting system actually to / (root). This implies several MASSIVE consequences for system-as-root devices:

1) /system is no longer a valid mount point. For existing root apps that remounts /system to rw, you will have to remount / instead of /system

2) The root directory (/) is no longer rootfs, but actually system. Remounting / to rw and modify files means you are writing to the actual system partition, NOT volatile storage as it used to be in rootfs. This is not recommended as user is not necessary aware that you are tampering an actual partition, sometimes dangerous if dm-verity/AVB-verity is enforced, or sometimes outright impossible since many devices now ship with read-only system partitions (e.g. EROFS, EXT4 dedup)

3) Several custom kernel rely on Magisk's root directory overlay system (overlay) for modifying /. This is no longer compatible with the new implementation. A new overlay system (overlay.d) will replace the existing one as an alternative (details in documentations). To provide backwards compatibility, Magisk will switch to "Compat Mode" when /overlay is detected, which simply reverts to the old system-as-root setup. Compat Mode will not work on Android 10 and will cause bootloop. Although things will still work as it used to, please upgrade to overlay.d ASAP.
<< =========================================================================================>>

I get the impression ... but I am not sufficiently clued up about the file systems in Android ... that this means it is difficult if not impossible to gain root access to root (/) and /system. I have decided not go on with my attempts to change boot animation by copying replacement .qmg files into /system/media on my S20 ... I'll wait to see if any one else has ideas ...

TTFN ... jfmacqueen
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48118
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC not copying files to /system with android 10 and UI2.5

Post by *ghisler(Author) »

Total Commander will remount / if you try to write to /system, unless there is actually a mount point for /system too - then TC will try to remount /system.

If there is such a mount point for /system in /var/mounts, then you will have to go to / and remount it as read/write yourself using the remount button (command nr. 119). After re-mounting / manually, you should be able to write to /system.
Author of Total Commander
https://www.ghisler.com
Post Reply