No longer able to copy files to /System - Google Pixel Questions & Answers

Recently had some issues with my device that caused me to to come back from a soft brick. Since then I have not been able to copy or replace files in the /System directory.
Items that have been tried and do not result in access:
Re-flash ROM (RR)
Taken back to stock image and then Re-flashed ROM (RR)
Flashed a new version of Magisk
Tried mounting the /system and making rw
Used RootExplorer and ES to change permissions to rw (chmod 777)
With all these, I try and overwrite files in system and they fail. Items with non conflicting names will appeared moved, but upon reboot all files are missing.
Ultimately what I am trying to do is move additional .ogg files into the media folder within system.
Any and all help appreciated.
Edit: Finally was able to mount /system and replace/add files after fully uninstalling Magisk and then flashing Magisk-v16.1(1610).zip

If I understand correctly, you can't modify /System with Magisk. With SuperSU, you can.

shopealope said:
If I understand correctly, you can't modify /System with Magisk. With SuperSU, you can.
Click to expand...
Click to collapse
yes you can modify /system with magisk. I do it all the time. Usually delete some aosp apps I don't need and they are in system/apps.

Related

[Q] how to enable system write

I installed several kernels with system write protection disabled but every time i try to edit an xml file i cant save it i cant copy files to system its just not enabled i try to enable it through es file explorer but it says everythings already r/w i tried fixing permissions in twrp i have a kernel installed with write protection disabled but still no luck any help would be greatly appreciated thank you
power950 said:
I installed several kernels with system write protection disabled but every time i try to edit an xml file i cant save it i cant copy files to system its just not enabled i try to enable it through es file explorer but it says everythings already r/w i tried fixing permissions in twrp i have a kernel installed with write protection disabled but still no luck any help would be greatly appreciated thank you
Click to expand...
Click to collapse
Need more information.. What base are you on? 1.55.605.2? Which kernel did you flash? What mod exactly are you trying to do?
nicholi2789 said:
Need more information.. What base are you on? 1.55.605.2? Which kernel did you flash? What mod exactly are you trying to do?
Click to expand...
Click to collapse
clean rom 1.1 http://forum.xda-developers.com/showthread.php?t=2732877
checkm8 team code craft says it disables write protection http://forum.xda-developers.com/showthread.php?t=2716686
as for the base how do i check i was on the latest update when i s offed and rooted and flashed everything around may 5th i think it was the latest base but how do i check i can let you know? im just trying to edit my default.xml in system/customize/ACC/ and i cant i just wanna write to system copy files to the root of the system etc
power950 said:
clean rom 1.1 http://forum.xda-developers.com/showthread.php?t=2732877
checkm8 team code craft says it disables write protection http://forum.xda-developers.com/showthread.php?t=2716686
as for the base how do i check i was on the latest update when i s offed and rooted and flashed everything around may 5th i think it was the latest base but how do i check i can let you know? im just trying to edit my default.xml in system/customize/ACC/ and i cant i just wanna write to system copy files to the root of the system etc
Click to expand...
Click to collapse
Yes you can check by going into settings>aabout phone>software information>software number. If your on Cleanrom v1.1 it will be 1.55.605.2 which is the latest base. What mod are you trying to do by editing your default . XML? There are a lot of things you can tweak in there.
Also, Cleanrom v1.1 has system r/w enabled by default. So you didn't need to flash that kernel to have it.
"Pre Rooted with SuperSU and Busybox pre-installed
Writeable /system partition
Unsecured kernel with ADB remount capabilities"
My advice would be to re-flash the rom, or restore a nandroid backup to get the roms stock kernel back. You could just dirty flash the rom and only wipe cache and davlik. You should be fine.
But once again, what mod are you trying to do in your default.xml? It may be I can help you sort it out, or at least tell you why it's not working.
nicholi2789 said:
Yes you can check by going into settings>aabout phone>software information>software number. If your on Cleanrom v1.1 it will be 1.55.605.2 which is the latest base. What mod are you trying to do by editing your default . XML? There are a lot of things you can tweak in there.
Also, Cleanrom v1.1 has system r/w enabled by default. So you didn't need to flash that kernel to have it.
"Pre Rooted with SuperSU and Busybox pre-installed
Writeable /system partition
Unsecured kernel with ADB remount capabilities"
My advice would be to re-flash the rom, or restore a nandroid backup to get the roms stock kernel back. You could just dirty flash the rom and only wipe cache and davlik. You should be fine.
But once again, what mod are you trying to do in your default.xml? It may be I can help you sort it out, or at least tell you why it's not working.
Click to expand...
Click to collapse
i would just like to write to system for future purposes for the mean time i used adb to pull the default xml then i modified the file on my pc to enable harman kardon and music channel then went to recovery mounted system and pushed it back its just a pain seeing i can't write to system when i want to yes it says 1.55.605.2 so i should be able to write to system and you suggest a fresh install? or should i just pull the kernel image out of the rom zip and flash through fastboot?
CleanROM has this capability without any 3rd party kernels or other modifications. I use ES File Explorer on a clean install of CleanROM 1.1 to write to the /system partition. You do need to enable R/W permission in the ES File Explorer app by clicking the upper left icon, going to Tools, enabling the toggle for Root Explorer, clicking on the words Root Explorer, clicking on Mount R/W, and enabling RW permission on whatever directory you want to.
shortstuff_mt said:
CleanROM has this capability without any 3rd party kernels or other modifications. I use ES File Explorer on a clean install of CleanROM 1.1 to write to the /system partition. You do need to enable R/W permission in the ES File Explorer app by clicking the upper left icon, going to Tools, enabling the toggle for Root Explorer, clicking on the words Root Explorer, clicking on Mount R/W, and enabling RW permission on whatever directory you want to.
Click to expand...
Click to collapse
was trying to avoid i clean install but i'll give it a go i did enable r/w with es file explorer and made sure all the bubbles were checked with still no luck ill do a fresh install without flashing any other files but clean rom and see what happens i'll let you guys know after i do it thanks
okay so I did a fresh install i factory reset x3 wiped data i know this wasn't necessary but i typed yes and wiped data x3 i went into advanced wipe and and checked every box except usb otg after backing up sd cards and then swiped to format x3 i then powered off the phone ejected my sd card put clean rom 1.1 on it and flashed it with no other files rebooted my phone went through the setup installed es file explorer enebled root access clicked on root access clicked on mount r/w and made sure everything was bubbled in on the right side mount r/w and i still cannot right to system im ready to give up
power950 said:
okay so I did a fresh install i factory reset x3 wiped data i know this wasn't necessary but i typed yes and wiped data x3 i went into advanced wipe and and checked every box except usb otg after backing up sd cards and then swiped to format x3 i then powered off the phone ejected my sd card put clean rom 1.1 on it and flashed it with no other files rebooted my phone went through the setup installed es file explorer enebled root access clicked on root access clicked on mount r/w and made sure everything was bubbled in on the right side mount r/w and i still cannot right to system im ready to give up
Click to expand...
Click to collapse
Why not make a copy of the files you want to edit... fix them up how you like.. then copy them back into place using file explorer function of TWRP (make sure you mount system).... OR put them in a flashable zip template and flash them. The changes will stick. You are likely trying to change files in use.
doh
dottat said:
Why not make a copy of the files you want to edit... fix them up how you like.. then copy them back into place using file explorer function of TWRP (make sure you mount system).... OR put them in a flashable zip template and flash them. The changes will stick. You are likely trying to change files in use.
Click to expand...
Click to collapse
oh lol your'e right i just copied a file over from my sd to the system to test it wow I should of known that thanks so much this issue is solved I'm disappointed in myself gotta give myself 10 minutes time out now thanks tho

stuck in boolloop after installing layers

Hello
i installed layers and applied a theme and performed a reboot and the device is stuck . any ideas ?
Hello,
please reflash your ROM.
No need to reflash your ROM, OP. Reboot to recovery (a custom one, of course), and either by using adb shell or twrp's built in file manager, remove what you will from /system/vendor/overlay.
a hammerhead wrote this.
beekay201 said:
No need to reflash your ROM, OP. Reboot to recovery (a custom one, of course), and either by using adb shell or twrp's built in file manager, remove what you will from /system/vendor/overlay.
a hammerhead wrote this.
Click to expand...
Click to collapse
What of there's no /system/vendor/overlay/, just /system/bin/? Also, I see just /vendor in the root. It contains firmware and lib folders. Also, I have /sdcard/Overlays and it contains Backup folder(which is empty) and vividcolorwhite.zip. Nothing more.
drago06 said:
What of there's no /system/vendor/overlay/, just /system/bin/? Also, I see just /vendor in the root. It contains firmware and lib folders. Also, I have /sdcard/Overlays and it contains Backup folder(which is empty) and vividcolorwhite.zip. Nothing more.
Click to expand...
Click to collapse
vividcolorwhite.zip: is this the overlay that's giving you grief? delete/move it.
drago06 said:
What of there's no /system/vendor/overlay/, just /system/bin/? Also, I see just /vendor in the root. It contains firmware and lib folders. Also, I have /sdcard/Overlays and it contains Backup folder(which is empty) and vividcolorwhite.zip. Nothing more.
Click to expand...
Click to collapse
You have to mount your system partition. Just boot into twrp recovery, go to mount, mount system. After you mount the system partition you should be able to see all the system folders.
Mr.FREE_Bird said:
You have to mount your system partition. Just boot into twrp recovery, go to mount, mount system. After you mount the system partition you should be able to see al the system folders.
Click to expand...
Click to collapse
THANKS! This is exactly what I was looking for.

I'm rooted, trying to install Xposed Framework, how do I delete a file from /system/?

I tried installing it with both Flashify and Magisk, but both methods failed.
When I tried installing it via the included Xposed Installer, it also failed, but gave me the message:
> Error: Xposed_Framework.jar already exists in /system/framework
I'm guessing a previous installation failed, but left the file there.
My next idea is to delete that file from /system/framework and try again, but since it's in an RO directory I don't have permission.
I tried using a terminal emulator to mount the drive in rw mode, and also tried using a root file explorer, but either both methods don't work, or I just couldn't figure it out.
Anyone have an idea of how to remove or rename that file so I can try to install the .zip ?
-Thanks
Highfiverobot said:
I tried installing it with both Flashify and Magisk, but both methods failed.
When I tried installing it via the included Xposed Installer, it also failed, but gave me the message:
> Error: Xposed_Framework.jar already exists in /system/framework
I'm guessing a previous installation failed, but left the file there.
My next idea is to delete that file from /system/framework and try again, but since it's in an RO directory I don't have permission.
I tried using a terminal emulator to mount the drive in rw mode, and also tried using a root file explorer, but either both methods don't work, or I just couldn't figure it out.
Anyone have an idea of how to remove or rename that file so I can try to install the .zip ?
-Thanks
Click to expand...
Click to collapse
In the Xposed app you should be able to just run the uninstaller script. If that doesn't work, boot TRWP and delete it from there.
D3RP_ said:
In the Xposed app you should be able to just run the uninstaller script. If that doesn't work, boot TRWP and delete it from there.
Click to expand...
Click to collapse
Unfortunately, the uninstaller also fails.
It says it can't remove that file from a read only directory..
Highfiverobot said:
Unfortunately, the uninstaller also fails.
It says it can't remove that file from a read only directory..
Click to expand...
Click to collapse
flash installer or uninstaller through TWRP
wmcdrugs said:
flash installer or uninstaller through TWRP
Click to expand...
Click to collapse
Root Explorer....
This app does wonders, it allows you to modify directories in /system and other root folders. You can even change permissions of specific folders/files from read/write/read-only....etc. I've had this app since the earliest of android days and it has been my go to file explorer. Root Explorer of course requires root....but it completely unlocks your phone and allows you to modify any system file that is set to any permission. Of course there are other file explorers that allow you to modify system files, but this is the one that i have the most experience with. You should be able to access the system folder where the Xposed file remains and modify it so it can fix your problem.
djer34 said:
Root Explorer....
This app does wonders, it allows you to modify directories in /system and other root folders. You can even change permissions of specific folders/files from read/write/read-only....etc. I've had this app since the earliest of android days and it has been my go to file explorer. Root Explorer of course requires root....but it completely unlocks your phone and allows you to modify and system file that is set to any permission. Of course there are other file explorers that allow you to modify system files, but this is the one that i have the most experience with. You should be able to access the system folder where the Xposed file remains and modify it so it can fix your problem.
Click to expand...
Click to collapse
This!. I've used it for years. Not muss no fuss. It's not bloated like a certain couple others I know of. It just does what it does and does it well. Manages files. No extra garbage.Give it a try. I'd be surprised if you can't delete it with Root Explorer. If you do try it, go to the folder you want to delete the file from. Once in there, look at the top right of the screen. Somewhere up there It will say MOUNT R/W. Touch that and you should be able to do whatever you want to within that folder.
Do you have the magisk DNSCrypt module installed? If so, thats why you cant modify anything in /system. Not sure why or how it breaks it, but it does. Took me for ever to figure out what was causing it. Now that i removed the module, i can modify anything i want again.
Sent from my [device_name] using XDA-Developers Legacy app

I Can't Get Root Back

I have a Motorola Edge (regular not +) running LineageOS 17.1 (20210528). I had it rooted and decided I wanted to use the hosts file for ad blocking. I couldn't figure out how to get the OS to allow me to modify the host file. While I was doing so, I some how corrupted to OS and couldn't boot into it. That was easily fixed by flashing the the OS, but now I can't get root back. When I reboot after I flash the patched boot.img (to both partitions), I get "Can't load Android system. Your data maybe corrupt..." (This happens when I try to boot into both partitions). Before I see the error message, it goes into a bootloop.
I'd also like to know how to modify the hosts file.
Thanks
Heat84 said:
I'd also like to know how to modify the hosts file.
Click to expand...
Click to collapse
Once phone is rooted
1. You mount Android's directory /system/etc as RW
2. Pull out the hosts file what is located therein to PC
3. Edit the hosts file according to your needs
4. Make sure hosts file gets saved in UNIX-file format
5. Push back the hosts file to Android's /system/etc directory
6. Make hosts file RW
Thanks. Any clue about the rooting problem?
I forgot to mention that I patched boot.img with Magisk.
TWRP has a file system repair function. Does that have anything to do with this?

help fix platform xml

I was manually trying to modify platform.xml to change "WRITE_EXTERNAL_STORAGE", but now apps cannot write/modify to internal memory. Only the Play store can install apps.
I tried changing the permission through X-plore and chmod 644, but it didn't work. I restored a backup of the platform.xml, but that too didn't work.
I also tried flashing this, but it didn't work :
[FIX][LEAKED 4.4]External Sdcard Mount Perms fix
Okay, so one of the issues currently with the leaked firmware is that some apps (e.g titanium backup, file explorers, etc) cannot save files to the extsdcard due to a incorrect parameter in the platforms.xml So here is the fix: Method 1 1.)...
forum.xda-developers.com
[FIX]Fix external SD Card permissions (updated 2012-02-05)
NOTE: Please see the following post for the original modification (as far as I'm aware) and the manual method of doing the same thing: http://forum.xda-developers.com/showpost.php?p=20869996&postcount=7 This "update.zip" style installer...
forum.xda-developers.com
I'm on 5.1, rooted, twrp. My phone is a Lenovo Vibe P1m.
EDIT: I tried restoring platform.xml from a TWRP backup, but it didn't work.

Categories

Resources