Question Unable to copy file to system/priv-app - Google Pixel 6 Pro

Hey - Sorry if this is the wrong forum, but I'm stuck. I've installed an app via Google Play, and I'd like to move it from /data/app to /system/priv-app (I was instructed to do this to enable extra features on the app). I can browse to /data/app and I see a big list of crazy-character folders, and I locate the one with the folder inside I need. I try and cut/paste that file into system/priv-app using Root Explorer. It prompts me "The current file system is read-only. Do you want to remount as read-write and continue?" I click yes, and then the move fails.
I'm using Magisk and I've granted Root Explorer superuser permissions.
Am I missing something painfully obvious here?

Try it from the console and see what error it gives you. You can also provide output of a couple of commands, "mount" (show the mount parameters for all mounted filesystems) and "df -h" (show free space).
This a factory system image or AOSP?

system partition is write protected.
You might have luck using Magisk module for privileged apps

Yep, someone in another thread in this section had the same or similar problem, but I believe it was completely solved by a magisk module. I haven't used that module, and can't remember what it's called, so I can't be more specific.

While is is possible to edit the system partition, I highly recommend you don't do that. In order to do that, you would need to edit the super and vbmeta partitions. There is a scripted solution to do that (here), but I've never used it.
A much easier solution would be to use Magisk's mirror partitions that allow you to virtually override/add/remove elements for the system/vendor/product partitions. Create a simple Magisk module or use /data/adb/magisk (read the Magisk documentation)

Related

[Q] Access /data from HTC Sense?

Am wondering if there is a application or something that gives me access to /data while the phone is booted into the OS.
I know i can mount /data from recovery and remove/add files and stuff from there, but am wondering if this is possible to do while the phone is booted into the OS?
Nitrius said:
Am wondering if there is a application or something that gives me access to /data while the phone is booted into the OS.
I know i can mount /data from recovery and remove/add files and stuff from there, but am wondering if this is possible to do while the phone is booted into the OS?
Click to expand...
Click to collapse
You need to flash the modified Hboot by AlphaRev to provide you with S-OFF (Securiy Off) for NAND unlock and to provide you with full root access, while the phone is powered on (booted into the OS). Search the Desire Android Development section of the forum.
Okay, let's say i do this, how do i access /data when am booted into the OS then?
Depending on what you want to do, you can use a File Explorer app to make modifications while the OS is running, and use apps like MetaMorph that require full system privileges to make r/w changes to the system partition, for example.
EDIT: Here is the thread I was referring to: http://forum.xda-developers.com/showthread.php?t=794314
Well i've tried out s-off, and it looks like i can see the content on the /system folder with Astro, but the Data folder is empty, but i know there should be an bootanimation.zip file there, as i've seen it while the /data was mounted in recovery.
Maybe i need another file explorer than Astro? Or?
Nitrius said:
Well i've tried out s-off, and it looks like i can see the content on the /system folder with Astro, but the Data folder is empty, but i know there should be an bootanimation.zip file there, as i've seen it while the /data was mounted in recovery.
Maybe i need another file explorer than Astro? Or?
Click to expand...
Click to collapse
What to do is, download EStrong File Explorer from the Marketplace. Once installed, open EStrong File Explorer and select the Menu button, then choose 'Settings'. Scroll down to 'Root Options' and select it. In Root Options, enable Root Explorer and choose the relevant option. Also choose the 'Mount File System' option as the /system partition was in read-only mode before and the files were hidden. Now, when you go to /data/local (i think), here you will find the location of the bootanimation.zip
Didn't work, looks like i have to have a CM rom or HiAPK rom. Any other idea?
And thanks for the help so far =)
Edit: There is an app in the market that's called "Root Explorer" that says it should give me access to the "elusive /data" folder, maybe that will work?
You don't need to be s-off to access /data. Or at least I didn't have to be.
Try putting bootanimation.zip in /data/local anyway and see if it works.
This overrides the existing bootanimation that is stored elsewhere.
Sent from my HTC Desire using XDA App
Trying out a different rom, and bought Root Explorer and now am able to see the content in the /data folder at least.

Can't delete folder - permissions [SOLVED]

Hi
I recently restored my Nexus with the toolkit but when it put the files back, I think a permissions problem has occurred. I can rename folders, but I can't delete them. I have a rather large folder that I can't get rid of. When I try in various programs, it says delete failed, or no permissions, etc.
I am rooted, and have installed Terminal emulator, but am not terribly familiar with how to use it.
Any tips would be helpful.
Thanks
warlock257 said:
Hi
I recently restored my Nexus with the toolkit but when it put the files back, I think a permissions problem has occurred. I can rename folders, but I can't delete them. I have a rather large folder that I can't get rid of. When I try in various programs, it says delete failed, or no permissions, etc.
I am rooted, and have installed Terminal emulator, but am not terribly familiar with how to use it.
Any tips would be helpful.
Thanks
Click to expand...
Click to collapse
Simple solution might just be that your file explorer app doesn't have root access. Force stop it in apps->settings, check your superuser app and clear any saved entries for it, and launch the app again. It should request root privileges.
Where are the files/folders in question located? If they're in a secure place like /system/ then it's more likely to be the above scenario. If they're just in your sdcard folder, are they user made, or at all special?
Edit: Also in the future, this sort of thing is what the Q&A forum is for.
JoeSyr said:
Simple solution might just be that your file explorer app doesn't have root access. Force stop it in apps->settings, check your superuser app and clear any saved entries for it, and launch the app again. It should request root privileges.
Where are the files/folders in question located? If they're in a secure place like /system/ then it's more likely to be the above scenario. If they're just in your sdcard folder, are they user made, or at all special?
Edit: Also in the future, this sort of thing is what the Q&A forum is for.
Click to expand...
Click to collapse
I was using Root explorer, and have granted it root access
It is in /SDcard, so it shouldn't be anything that's protected
warlock257 said:
I was using Root explorer, and have granted it root access
It is in /SDcard, so it shouldn't be anything that's protected
Click to expand...
Click to collapse
Did you check the permissions for what you're trying to delete? They're displayed right in the normal view in root explorer, and you can edit them from the long press menu.
Anything unusual about the files/folders themselves? Were they created on the phone? By you? By apps? Copied and pasted over USB from a computer? You could try deleting from your computer over USB.
As for command line options, you can try 'rm -r [path]' for a folder and just 'rm [path]' for a file. rm is the delete(remove) command, -r is the recursive flag to apply the action to all items in the directory if a directory is the target. Pretty sure that you can do that straight from terminal emulator on your phone, and from a command prompt over usb you'd need to use 'adb shell' first.
JoeSyr said:
Did you check the permissions for what you're trying to delete? They're displayed right in the normal view in root explorer, and you can edit them from the long press menu.
Anything unusual about the files/folders themselves? Were they created on the phone? By you? By apps? Copied and pasted over USB from a computer? You could try deleting from your computer over USB.
As for command line options, you can try 'rm -r [path]' for a folder and just 'rm [path]' for a file. rm is the delete(remove) command, -r is the recursive flag to apply the action to all items in the directory if a directory is the target. Pretty sure that you can do that straight from terminal emulator on your phone, and from a command prompt over usb you'd need to use 'adb shell' first.
Click to expand...
Click to collapse
In root explorer the info under the folder says
rwxrwxr -x
I'm pretty sure that the problem started when I restored from the nexus toolkit on pc. I had a similar problem with my camera in that it couldn't save pictures to a folder, but all I did was rename the folder, and the camera app created a new one.
rm -r [path] in terminal emulator says "permission denied"
EDIT
upon further googleing, the 'chmod' command might be what I want, but I'm not sure which syntax is right.
warlock257 said:
In root explorer the info under the folder says
rwxrwxr -x
I'm pretty sure that the problem started when I restored from the nexus toolkit on pc. I had a similar problem with my camera in that it couldn't save pictures to a folder, but all I did was rename the folder, and the camera app created a new one.
rm -r [path] in terminal emulator says "permission denied"
EDIT
upon further googleing, the 'chmod' command might be what I want, but I'm not sure which syntax is right.
Click to expand...
Click to collapse
For chmod you want 'chmod [number] [path]', where number is a string that's a bit complicated to explain. You can learn about it by googling chmod probably better than I could type it out here on the fly. But if you use 777, it should assign full permissions, which would display as rwxrwxrwx in root explorer.
You can achieve the exact same effect in root explorer though, long press and choose permissions and you'll get a 3x3 grid. All boxes checked= full permissions, same as chmod 777. The three lower boxes for special permissions should be unchecked (fyi, they would turn chmod's numeric component into a 4 digit number, and as far as I know, android doesn't really use them at all).
Also, did you type su in terminal first? It doesn't innately have root (just like any app) so you need to do that and confirm the popup first. You'll need to do this before using chmod, and if you didn't do it before using rm, try it again.
Worth a try but just for reference, rwxrwxr-x is the normal permissions set for folders on the sdcard, so that's not immediately looking like a problem.
at the top of root explorer, theres a button that says mount r/w. press it, now it should say mount r/o. go ahead and delete that file now
simms22 said:
at the top of root explorer, theres a button that says mount r/w. press it, now it should say mount r/o. go ahead and delete that file now
Click to expand...
Click to collapse
Found the button, but didn't work
JoeSyr said:
For chmod you want 'chmod [number] [path]', where number is a string that's a bit complicated to explain. You can learn about it by googling chmod probably better than I could type it out here on the fly. But if you use 777, it should assign full permissions, which would display as rwxrwxrwx in root explorer.
You can achieve the exact same effect in root explorer though, long press and choose permissions and you'll get a 3x3 grid. All boxes checked= full permissions, same as chmod 777. The three lower boxes for special permissions should be unchecked (fyi, they would turn chmod's numeric component into a 4 digit number, and as far as I know, android doesn't really use them at all).
Also, did you type su in terminal first? It doesn't innately have root (just like any app) so you need to do that and confirm the popup first. You'll need to do this before using chmod, and if you didn't do it before using rm, try it again.
Worth a try but just for reference, rwxrwxr-x is the normal permissions set for folders on the sdcard, so that's not immediately looking like a problem.
Click to expand...
Click to collapse
it might be the files within the folder, rather than the folder itself. going into it, some of the files have a shield on them
When I go into its permissions, some of them were unchecked. I checked the 9 at the top, and it says:
"permissions change was not successful. Please note that some files systems (e.g. SD card) do now allow permission changes."
warlock257 said:
Found the button, but didn't work
it might be the files within the folder, rather than the folder itself. going into it, some of the files have a shield on them
When I go into its permissions, some of them were unchecked. I checked the 9 at the top, and it says:
"permissions change was not successful. Please note that some files systems (e.g. SD card) do now allow permission changes."
Click to expand...
Click to collapse
Well under normal circumstances, individual files on your sdcard should have permissions rw-rw-r--, and folders have rwxrwxr-x. (For reference, this is read as read, write, execute for Root, System, and Other, with dashes indicating that a permission is denied. So rwxrwxr-x means all permissions are granted to all three groups except for write to Other). This ties into larger aspects of the OS that basically exist to stop individual apps from reading or writing whatever they want without being included in groups.
The fact that you can't do something that shouldn't require elevated permissions, and you're getting that kind of error when you try to execute commands with higher permissions, suggests to me that your sdcard partition is using the wrong filesystem. Sort of sounds like a program tried to treat it like a real sdcard and formatted it to something else, in which case I have a hunch you're going to need to back up your data and do a full reset.
You might get a simpler solution if you ask in the thread for the toolkit you used. It's not something I have any experience with so good luck.
Out of curiosity, are you on Jellybean now? Jellybean changed the address for the sdcard partition, so if the toolkit wasn't updated to reflect this, it seems like the likely place things may have gone wrong.
---------- Post added at 07:04 PM ---------- Previous post was at 06:53 PM ----------
Actually if you want to check if it's using the right filesystem, run the command 'mount' from terminal. It'll give you a bunch of information, probably towards the bottom will be a line that mentions sdcard. Mine reads as
/dev/fuse /storage/sdcard0 fuse [more info about how it's currently mounted]
Yours -should- say that if you're on JB. If you're not, it should say something instead of /storage/sdcard0 (maybe /mnt/sdcard? I forget how it was on ICS). If it says something in place of fuse that may be the problem.
..I actually think mount used to say that the sdcard block was formatted as yaffs2, while everything else was formatted as ext4. Or maybe I just looked up that it was yaffs2 online, not from terminal on my phone? I wonder if this whole thing is the reason why some people seem bootloop-prone when flashing JB roms, if the changes have cut out access to important information about the filesystem, it may be triggering a really long error scan if their sdcard partition is large.
yes, backed up in ICS, and went to Jellybean.
doing a 'mount', I believe the line reads
/dev/fuse /storage/sdcard0 fuse rw,nosuid,nodev,realtime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
The files that have the shield icon have permissions:
rw-rw-r--
Yeah so everything that I can think of for you to check seems to be displaying as though normal. Although I don't know what aspect of these files root explorer is reading to mark them as protected and put the little shield on them.
You've tried these methods (rm, chmod) on individual files within the folder too, right? I guess this comes more from experience deleting protected files in windows, but I've found that sometimes a folder will deny deletion as long as it contains protected files, but it's relatively easy to give yourself permission to delete the individual files one by one, after which the folder goes down too. Possibly time consuming without a batch function, but easy.
My understanding of the fuse filesystem, by the way, is that it's just a virtual layer that allows the sdcard block to be treated differently than everything else on the phone, which is important for what happens when you plug it into a computer and the device is read. And I believe that the sdcard is supposed to be formatted as yaffs2 (everything else is ext4). Not sure how to check that directly, but it's possible that it has been changed to something else. But unless you can't delete -anything- on the sdcard, this seems unlikely.
JoeSyr said:
Yeah so everything that I can think of for you to check seems to be displaying as though normal. Although I don't know what aspect of these files root explorer is reading to mark them as protected and put the little shield on them.
You've tried these methods (rm, chmod) on individual files within the folder too, right? I guess this comes more from experience deleting protected files in windows, but I've found that sometimes a folder will deny deletion as long as it contains protected files, but it's relatively easy to give yourself permission to delete the individual files one by one, after which the folder goes down too. Possibly time consuming without a batch function, but easy.
My understanding of the fuse filesystem, by the way, is that it's just a virtual layer that allows the sdcard block to be treated differently than everything else on the phone, which is important for what happens when you plug it into a computer and the device is read. And I believe that the sdcard is supposed to be formatted as yaffs2 (everything else is ext4). Not sure how to check that directly, but it's possible that it has been changed to something else. But unless you can't delete -anything- on the sdcard, this seems unlikely.
Click to expand...
Click to collapse
yeah, I tried deleting files individually on the phone, and in windows. Wont let me do anything.
I guess the only sure fire method of clearing these files at the moment is to do a factory reset.
I can back up my stuff with titanium, so not that big a deal.
Your assistance has been much appreciated
:good:
warlock257 said:
yeah, I tried deleting files individually on the phone, and in windows. Wont let me do anything.
I guess the only sure fire method of clearing these files at the moment is to do a factory reset.
I can back up my stuff with titanium, so not that big a deal.
Your assistance has been much appreciated
:good:
Click to expand...
Click to collapse
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
That worked :laugh:
It's gone from all those folders.
Thanks very much!!!!!
warlock257 said:
That worked :laugh:
It's gone from all those folders.
Thanks very much!!!!!
Click to expand...
Click to collapse
+1 This worked for me as well. Thanks for posting...:good:
Had the same problem. Deleting through the /media path worked.
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
+4 You Sir are a genius! Thanks given!
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Sent from my Galaxy Nexus
Click to expand...
Click to collapse
Sorry to necro this thread almost 4 years later, but I had the exact same issue with deleting a folder on internal storage (Android Lollipop). Regardless if you're still here on XDA or not: thanks for this solution.
So.. Not really a I9250, but I guess my problem on i9100 is the same.
For some weird reason this just happened to WhatsApp directory.. But whatever.
After digging deeper and deeper in recovery, it seems like the folder wasn't own by media_rw group, but root
I just had to run
Code:
chown -R 1023:1023 <folder-path>
For some weird reason neither chown nor ls -l were correctly working when booted on normal system
Cilraaz said:
Try deleting them directly from /data/media instead. If you're able to delete them there, reboot afterwards to ensure /storage/sdcard0, /sdcard, and /mnt/sdcard are updated properly.
Click to expand...
Click to collapse
@Cilraaz, I have no idea if you're still on XDA but after at least a week of intense searching I found your advice which solved my problem! Thank you.
My problem was on i9500 (still) running stock Lollipop. I've been preparing to install a custom recovery, and did a TWRP (2.8.7.0) nandroid backup. Problem was I then couldn't find the TWRP backup folder. It would only show in TWRP's file manager. Root Browser didn't show it with SU privileges, nor ES File Browser and connecting it to the PC didn't help either. It's only after looking in /data/media/0 that I could find the TWRP folder.

unable to delete persistent file - Syntax error: "(" unexpected

hi, pls help. any advise thks.
any ideas how to get rid (delete) pre-load app file name EzLinkAndroid_v1.0_(2).apk.
it give this syntax error: "(" unexpected when i try to manual remove it (in system/app folder).
i use "root uninstall" app to removed most of pre-load apps tat i dun need.
left this persistent app tat cant be delete.
manually try to delete under "su", cant delete.
cant change filename, cant chmod, came out with syntax error: "(" unexpected.
stock GB 2.3.6, kernel 2.6.35.7 dxlm3.
LOL SBS doesn't want you to remove its stuff. Anyway, check if you mounted R/W. Try other root uninstaller like ES File Explorer. Try Terminal Emulator.
iDelta said:
LOL SBS doesn't want you to remove its stuff. Anyway, check if you mounted R/W. Try other root uninstaller like ES File Explorer. Try Terminal Emulator.
Click to expand...
Click to collapse
i tried with several root uninstaller apps, manually terminal emulator too.
now try to access phone root with pc/android commander but not able to get root with the program need to hard root the phone with boot.img hack.
my phone is already rooted, i removed several pre-loaded apps, only one left.
saintsoh said:
i tried with several root uninstaller apps, manually terminal emulator too.
now try to access phone root with pc/android commander but not able to get root with the program need to hard root the phone with boot.img hack.
my phone is already rooted, i removed several pre-loaded apps, only one left.
Click to expand...
Click to collapse
Seems like your filesystem got corrupted somehow. Probably formating the system partition and restoring a backup or reflashing the rom will be the only solution that will work.
thks anyway.
i suspect its the font of the file name tat causes the syntax error.
happen b4 on other files which i was working on, those i can correct by renaming it.
in this case, i just leave it be. since i had ridden most of unwanted apps my phone.
my phone is running faultlessly.
thks guys.

Can't Mount /system R/W with Magisk

So I run my own custom builds of Lineage with a bunch of cherry picks to bring back the blue and grey Pixel theme, bypass SafetyNet, disable dm-verity and many other tweaks (they are many of the same cherry picks in Invisiblek's builds).
I'm noticing a strange issue now though. I switched over to Magisk (the modded Pixel version found here on XDA) from my many years of using SuperSU because it can pass SafetyNet, however I just I noticed now that I am unable to mount /system as RW. No app that mounts /system is able to do it and if I try it manually through ADB or the terminal app, I get an error saying "/system not found in /proc/mounts".
Does anyone know how I can fix this to mount /system as RW. Realistically, I don't need to mount it for any reason since I don't include any apps I don't want in my own builds but it just kind of bothers me that I can't do it if I wanted to.
admiralspeedy said:
So I run my own custom builds of Lineage with a bunch of cherry picks to bring back the blue and grey Pixel theme, bypass SafetyNet, disable dm-verity and many other tweaks (they are many of the same cherry picks in Invisiblek's builds).
I'm noticing a strange issue now though. I switched over to Magisk (the modded Pixel version found here on XDA) from my many years of using SuperSU because it can pass SafetyNet, however I just I noticed now that I am unable to mount /system as RW. No app that mounts /system is able to do it and if I try it manually through ADB or the terminal app, I get an error saying "/system not found in /proc/mounts".
Does anyone know how I can fix this to mount /system as RW. Realistically, I don't need to mount it for any reason since I don't include any apps I don't want in my own builds but it just kind of bothers me that I can't do it if I wanted to.
Click to expand...
Click to collapse
im actually having the same concern as you . im also trying to look on threads to see if there is a way to fix this mount issue with magisk, but still cant seem to find an answer till now...
reyscott said:
im actually having the same concern as you . im also trying to look on threads to see if there is a way to fix this mount issue with magisk, but still cant seem to find an answer till now...
Click to expand...
Click to collapse
Well, at least I'm not the only one
Magisk is systemless root, is it not? I don't know if that make a difference.
jova33 said:
Magisk is systemless root, is it not? I don't know if that make a difference.
Click to expand...
Click to collapse
That simply means it doesn't need to modify the system partition to provide root access. That doesn't stop the user/apps from mounting system and modifying it themselves.
This ended up biting me in the ass 'cause now I can't mount /system in TWRP and restore. :|
Root Explorer can mount System r/w. I do this once a month to move my Adguard HTTPS cert to System. Still passes SafetyNet, too.
This seems to be a major issue in the custom Magisk build for Pixel phones. I've seen a few threads about it and even started my own, but as far as I'm aware, there's no fix. The Magisk dev doesn't seem to want to officially support Pixel phones despite there already being pull requests on the project which implement A/B support. I'm pretty sure it's the same issue that stops Magisk modules from working if they touch /system to make file changes.
carlylemiii said:
Root Explorer can mount System r/w. I do this once a month to move my Adguard HTTPS cert to System. Still passes SafetyNet, too.
Click to expand...
Click to collapse
I've been modifying system from the jump with Root Explorer and FX file explorer works too with it's root addon
Quoting chainfire's writeup from when he first rooted the Pixel: "what we originally thought of as /system is now a subfolder inside that partition's filesystem... The system partition is now mounted to /system_root, with the /system directory symlinked to /system_root/system. This move is blatantly stolen from the stock recovery mechanism."
I don't feel like re-rooting with superSu to check if it still works that way (i.e. if I can see a /system_root mount and/or see if /system is a link (IIRC one of this later changes was actually to change this to a bind mount).
When using Magisk, I haven't been able to find evidence of a /system (or /system_root) mount anywhere (using "mount" and "df" commands). Which leads me to guess that "/" is actually the mount point to the partition containing system (i.e. /system is actually just a straight-up sub folder of /) -- but I'm no expert at interpreting linux/unix mounts/disks/etc.
I have Root Explorer and I have to hit the "mount r/w" button while in "/" and NOT while in "/system", which leads me to guess that when these apps are giving rw access to /system that they're actually remounting (or something similar) the "/" as rw. BUT I have yet to determine what specific command one could run on the cmd line to reproduce this behavior.
Theoretically @goodwin_c or maybe @topjohnwu would know better what /system actually is at runtime...
I have this exact same issue using OnePlus One, so it might not be a Pixel XL-specific issue?
Magisk + MagiskSU are installed successfully.
TitaniumBackup is granted root privileges and functions normally.
But I found that other apps don't. For example:
1. it grants Wakelock Detector root privileges just fine, but when trying to "INSTALL AS A SYSTEM APP", it returns error "An error occurred mounting system rw. Aborted".
2. Similar case with GSam Battery Monitor (Root Companion), error message displayed is: "Unable to copy the file "yyy/aaaa/xxxxx.apk" to "/system/priv-app/gsamrootcompanion.apk".
You may need to try this manually using a tool such as Root Explorer.
3. Guess what. Root Explorer won't open either.
Anyone with any hints or tips for solving this would be greatly appreciated.
Nikola G. said:
I have this exact same issue using OnePlus One, so it might not be a Pixel XL-specific issue?
Magisk + MagiskSU are installed successfully.
TitaniumBackup is granted root privileges and functions normally.
But I found that other apps don't. For example:
1. it grants Wakelock Detector root privileges just fine, but when trying to "INSTALL AS A SYSTEM APP", it returns error "An error occurred mounting system rw. Aborted".
2. Similar case with GSam Battery Monitor (Root Companion), error message displayed is: "Unable to copy the file "yyy/aaaa/xxxxx.apk" to "/system/priv-app/gsamrootcompanion.apk".
You may need to try this manually using a tool such as Root Explorer.
3. Guess what. Root Explorer won't open either.
Anyone with any hints or tips for solving this would be greatly appreciated.
Click to expand...
Click to collapse
That's weird because I flash a new ROM about every five days and consistently replace the stock phone app in a few different ROMs by using root explorer to drop in the priv app folder
Nikola G. said:
I have this exact same issue using OnePlus One, so it might not be a Pixel XL-specific issue?
Click to expand...
Click to collapse
Unless it has the a/b setup and the same changes to the system partition (see my post above about what chainfire explained), then I wouldn't think it's related at all.
Pretty sure you've needed to set SELinux to permissive for TiBu to install/remove system apps for a while now.
----
Back to the Pixel. I reread chainfire's explanation of what his root method does for Pixels (https://plus.google.com/+Chainfire/posts/fvEPo42GKXS). I don't have much knowledge on partitions, mounts, Kernels, or Androids boot process, but I believe what he is saying is that supersu changes things such that "/" is actually from the boot partition rather than from the system partition (which then matches the way most/all other phones work). That makes sense to me why there is a /system_root mount and a /system bind mount (in other words, once you change "/" away from the system partition, you need to mount what it used to be somewhere to actually get to the system folder)
Now, just a guess here, but I'm thinking that Magisk isn't doing this at all. Which would mean that "/" is still actually mounted from the system partition and /system is still just a subfolder of that partition. This would explain why "/system" can't be mounted rw, since it's just a folder. And that would explain why I need to be in the "/" folder in Root Explorer to mount rw, since this folder would actually be the mount point.
Of course, if that is all accurate, I'm still curious to know what that remount command would actually be from the cmd line
Sent from my Pixel using Tapatalk
I have this exact same issue using Sony Xperia z5 Compact ! will a combination of SU and magisk work? just going to try it out. ( later removing the su)
Set seliux to permissive.
rori~ said:
Set seliux to permissive.
Click to expand...
Click to collapse
this doesnt fix the problem lol..the problem iswith googles implementation of tge new partition layout.. if u actually look in the fstab you will see the problem, system as we know it isnt there lol
if fact, what we would call root fs or / has the only "system" reference in the fstab.in fact, here are the procs/mounts in my fstab on my pixel 2 xl on los 15.1:
# Android fstab file.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/soc/1da4000.ufshc/by-name/system / ext4 ro,barrier=1 wait,slotselect,avb
/dev/block/platform/soc/1da4000.ufshc/by-name/userdata /data ext4 errors=panic,noatime,nosuid,nodev,barrier=1,noauto_da_alloc latemount,wait,check,formattable,fileencryption=ice:aes-256-heh,eraseblk=16777216,logicalblk=4096,quota
/dev/block/platform/soc/1da4000.ufshc/by-name/misc /misc emmc defaults defaults
/dev/block/platform/soc/1da4000.ufshc/by-name/modem /firmware vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=ubject_r:firmware_file:s0 wait,slotselect
/devices/soc/a800000.ssusb/a800000.dwc3* auto vfat defaults voldmanaged=usb:auto
/dev/block/zram0 none swap defaults zramsize=536870912,max_comp_streams=8
as u can see, what we knew as rootfs is now list as:
/dev/block/platform/soc/1da4000.ufshc/by-name/system / ext4 ro,barrier=1 wait,slotselect,avb
itvis ro and good ole avb
I do feel however system is more than just a folder now.. its almost like the "new" rootfs... like normally the default prop is contained in the boot.img, now it is in /system/etc/prop.default and is linked/appears as default prop in the root directory
to add, the vendor partition is more equal to system now.. the structure of these two are very similar.. heck, they even each hold portions of the sepolicy files.. supposedly this was intentional.. i can mount rw all day but in my experience my changes revert after a reboot lol.. im on a userdebug build with verity disabled,magisk, permissive etc etc and changes do not stick as the untouched img from the non used slot seems to be in play in my situation
this layout isnt goin away soon lol. with project treble and phones being released with oreo having to follow the same scheme we will simply need to find other ways im afraid.. the vendor partition is probably the most modified now as its oje of if not the only partition google is letting vendors update to streamline the process and to leave amajority of the os untouched/unmodified by vendors.. its actually quiye smart as it should allow for carriers to push out updates more quickly
also, looking at the boot process, since system and vendor have more power now and hold things like sepolicy they are actually mounted extremely early in the boot process and not allowed to be mounted again later on sort of like a "never allow" flag saying no matter what circumstances these partitions cannot be mounted after earlyfs
but anyone, ill close my rant by saying you cannot mount something that doesnt exist in the mount point/fstab
Piccit, you are absolutely right!
in terminal I replaced "/system" with "/" and it worked. thank you very much.
piccit said:
Unless it has the a/b setup and the same changes to the system partition (see my post above about what chainfire explained), then I wouldn't think it's related at all.
Pretty sure you've needed to set SELinux to permissive for TiBu to install/remove system apps for a while now.
----
Back to the Pixel. I reread chainfire's explanation of what his root method does for Pixels (https://plus.google.com/+Chainfire/posts/fvEPo42GKXS). I don't have much knowledge on partitions, mounts, Kernels, or Androids boot process, but I believe what he is saying is that supersu changes things such that "/" is actually from the boot partition rather than from the system partition (which then matches the way most/all other phones work). That makes sense to me why there is a /system_root mount and a /system bind mount (in other words, once you change "/" away from the system partition, you need to mount what it used to be somewhere to actually get to the system folder)
Now, just a guess here, but I'm thinking that Magisk isn't doing this at all. Which would mean that "/" is still actually mounted from the system partition and /system is still just a subfolder of that partition. This would explain why "/system" can't be mounted rw, since it's just a folder. And that would explain why I need to be in the "/" folder in Root Explorer to mount rw, since this folder would actually be the mount point.
Of course, if that is all accurate, I'm still curious to know what that remount command would actually be from the cmd line
Sent from my Pixel using Tapatalk
Click to expand...
Click to collapse
If anyone is still reading this thread....I successfully got rw access with:
Code:
mount -o rw,remount /
fritz.barnes said:
If anyone is still reading this thread....I successfully got rw access with:
Code:
mount -o rw,remount /
Click to expand...
Click to collapse
I got error while trying to mount /system folder.
alioth:/ # mount -o remount,rw /system
mount: '/system' not in /proc/mounts
Click to expand...
Click to collapse
dRakeNNNN said:
I got error while trying to mount /system folder.
Click to expand...
Click to collapse
Thank you for this helpful comment. Do you have any idea why this would allow me to modify my system/app folder but *not* my system/priv-app? Ostensibly they should both have r/w access, yet when I try to remove facebook's apps from my priv-app folder I get this message:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I tried specifically to remount /system/priv-app but get the same proc/mount error. I actually went further and just tried /system/priv-app/FBServices but this is now giving me a separate error:
Do you have any idea how I might go about resolving this? Other apps that attempt to change r/w access in my /priv-app folder are encountering errors as well.

Problem writing in /system/sbin/.magisk/mirror/system_root/system

Hello There. I rooted with magisk today. Evrrything worked fine until I tried to change something in /system folder.
I have read in the internet that u wont have access to system folder if you are on root with magisk. It says u need to modify the .mirror folder. In this ./system/media I try to change the bootanimation. zip, but I cant change or delete the stock one. I think I do not have root acess in this folder. But I can use apps like Greenify without problems. Have I done something wrong? I gave different file exporer full root access I am using:
Mi10t Lite
MIUI 12.0.8 (GLOBAL)
Android 10
Gauguin
Magisk Version is the newest: 21.4
Magisk Manager: 8.0.7
I think i found the answer...:
System partition locked to read only in Android 10
Help, I don't know what I did but after installing a custom ROM, I noticed that my system partition cannot be mounted as read/write. I tried "mount -o rw,remount /system" command on a terminal
android.stackexchange.com
Create a Magisk module to modify files in /system partition.
_mysiak_ said:
Create a Magisk module to modify files in /system partition.
Click to expand...
Click to collapse
How do I do that?
Francescohub said:
How do I do that?
Click to expand...
Click to collapse
Either create your own module from scratch following the Magisk guide, or adapt one of the existing ones.
You're trying the mount -o rw,remount as root (means: you did a "su" before the "mount")?
Maybe a "blockdev --setrw /dev/block/dm-X" helps (see which dm- is mounted as system for the X).
Greetz
Kurt
hello
also i tried to modify mixer_paths_cdp.xml in / vendor / etc, but i am not able to get myself a magisk module
You can use for example this very simple Magisk module as a template.
Create desired folder structure in the zip file, add your xml files for modification, remove the AOD overlay apk/folder and try to flash it.
Keep TWRP at hand if you mess up something so you can delete the module from recovery if necessary.
I stumbled upon this solution for RW system partition in Android 10+. Someone brave enough might give it a try. https://forum.xda-developers.com/t/script-mount-system-as-read-write-android-10.4240703/
_mysiak_ said:
I stumbled upon this solution for RW system partition in Android 10+. Someone brave enough might give it a try. https://forum.xda-developers.com/t/script-mount-system-as-read-write-android-10.4240703/
Click to expand...
Click to collapse
i can't download it
carabot said:
i can't download it
Click to expand...
Click to collapse
Works for me.. Anyway, you should provide your feedback/complaints to the author.
download ok
I hope not to do any damage

Categories

Resources