Can't Mount /system R/W with Magisk - Google Pixel XL Questions & Answers

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.

Related

FYI CWM With latest .14 ICS release

I went throught the process to root and install unlocked bootloader after upgrading from stock hc to stock 14 ics build. Everything seemed to work well untill trying to install CWM.
EVerytime I rebooted to try to get into CWM I got the old recovery. It seems I had to rename install-recovery.sh. However when I tried to rename with term emu apparently the easy root method no longer works and system remained ro. In order to resolve I had to mount -o remount, rw /system/ then rename install-recovery, then re-run the cwm script.
paronowitz said:
I went throught the process to root and install unlocked bootloader after upgrading from stock hc to stock 14 ics build. Everything seemed to work well untill trying to install CWM.
EVerytime I rebooted to try to get into CWM I got the old recovery. It seems I had to rename install-recovery.sh. However when I tried to rename with term emu apparently the easy root method no longer works and system remained ro. In order to resolve I had to mount -o remount, rw /system/ then rename install-recovery, then re-run the cwm script.
Click to expand...
Click to collapse
I'm confused. Even if the root script from ZN was installed successfully which I can confirm and many other members who have ran this rom have confirmed, you would still need to mount /system some how. Whether it is from rootexplorer, es file manager, or directly from the terminal emulator as you did. That script roots the tab and makes /system/ mountable in various apps it doesn't make /system/ RW constantly. I'm glad you got it taken care of though.
Yup that what I'm saying. I started with a freshly clean install. I tried running the an method several times. I was able to install unlocked boot loader howver I had no rw access to /system unless I manually remounted. Every time I reboot I have to remount again
Well I would think BEFORE updating to .014 you should remove bootloader.blob and anything else that relates to changing recovery from the .014 update before attempting to flash. Otherwise you would end up with a stock bootloader again.
don't forget to remove the installrecovery script from the etc folder too just a fyi
@paronowitz
You might want to try rooting again. I'm currently on Zeronull's release, and I can mount /system fine from root explorer without having to mount it first through terminal emu. I've gotten into the habit of re-rooting roms on the tab.
I had not problem accessing /system. I could not change or delete anything in is specifically the install_recovery.sh without remounting it rw
if memory serves me right the install package for twrp removed the install recoveryinstall script.
paronowitz said:
I had not problem accessing /system. I could not change or delete anything in is specifically the install_recovery.sh without remounting it rw
Click to expand...
Click to collapse
Well I apparently had no problems with root, until I tried to edit anything in /system. After re-rooting I could mount /system, AND edit/delete install_recovery.sh.
The OP had said he was renaming install-recovery.sh from the terminal emulator. Like I said in my post earlier the root script doesn't make /system/ rw constantly and the terminal emulator does not auto mount /system/ rw. So even if the script is working, you would have to use the same commands if you are using the termnal to rename. Also, by making /system/ rw you are making /system/etc rw, and this allows you to edit the file you were attempting to edit. So when I am referring to mounting /system/ as rw, we are talking about the same thing. /etc/ is a shortcut to /system/etc.
paronowitz said:
I went throught the process to root and install unlocked bootloader after upgrading from stock hc to stock 14 ics build. Everything seemed to work well untill trying to install CWM.
EVerytime I rebooted to try to get into CWM I got the old recovery. It seems I had to rename install-recovery.sh. However when I tried to rename with term emu apparently the easy root method no longer works and system remained ro. In order to resolve I had to mount -o remount, rw /system/ then rename install-recovery, then re-run the cwm script.
Click to expand...
Click to collapse
It sounds like you may want to just execute the commands by hand. The script will make assumptions that may not hold true for your current configuration.
Look HERE
Check out the Eew245's root method. It give you the most control since you do it by hand. If you don't have adb you can use the one supplied in the ZeroNull easy unlock package(careful to not run the scripts at the wrong time and such though). Anyway Im out of time today. It sounds like as others have said you probably just need to
su
mount -o remount,rw /system
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.BAK
Then reflash cwm if you overwrote recovery when you updated.
NoSudo said:
It sounds like you may want to just execute the commands by hand. The script will make assumptions that may not hold true for your current configuration.
Look HERE
Check out the Eew245's root method. It give you the most control since you do it by hand. If you don't have adb you can use the one supplied in the ZeroNull easy unlock package(careful to not run the scripts at the wrong time and such though). Anyway Im out of time today. It sounds like as others have said you probably just need to
su
mount -o remount,rw /system
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.BAK
Then reflash cwm if you overwrote recovery when you updated.
Click to expand...
Click to collapse
That's exactly what I had to do.
edit - miss-post

[HOW-TO]Full USB OTG on Media Players in Marshmallow

It's my first relevant post in here so please be benevolent and friendly to me .
Hello everyone,
After long hours of roaming around on the internet, Moto forums, PowerAMP forums (you wouldn't believe how many people posted this problem in there), huge exchange of emails and debugs to the Nexus Media Importer dev, and checking out many many topics here on XDA, I finally came across the only way to use an USB-OTG pendrive as a music library, and having Android detect it (through the Media Service) and build the music library for other media apps to use.
tl dr; Problem: You wanted loads of music without wasting precious internal memory. You tried using an USB pen but no mp3 apps were able to find the files, nor stickmount, nor whatever.
This is so far the only way to do this on android Marshmallow.​
Believe me, I've tried almost everything one can do, including using the Nexus Media Importer, Stickmount, OTG Helper, etc (spoiler alert, none of these worked).
Why is this happening, you ask? Well, Google changed things on Android 6.x.x so much regarding filesystems and USB support that full read/write on USB OTG with other apps no longer works, although I've never tested on previous versions of Android. But I finally managed to find a way to do it, and here I intend to share it with you guys.
Requirements - Rooted phone and permissive SELinux (what is that and how do I do it? don't worry, it's easy and I'll explain a bit later)
1st step - Verify that your phone is capable of using USB-OTG. If it is not, check on play store for other apps that supposedly can enable USB Host support on your phone, although I've never tried them because I never needed, so I can't say anything. My phone is a Moto X 2014 and it comes with OTG support embedded.
2nd step - Format your pendrive as NTFS. This is very important because...
If you use your pendrive as Fat32, Android will mount it to a folder in /data/media_rw/blablabla with GID and UID 1023 (media_rw), which most apps don't have permissions to access, thus they won't be able to find your pendrive and build a music library. Why? Well, glad you asked...
...Since Fat32 doesn't support the linux permissions system, Android mounts the pendrive with the FUSE fs wrapper, which cloaks a permission system hard-coded into some file in the Android system that I wasn't able to tell how could I modify it in order to set the pen permissions as 777 root root.
You can do so by plugging your pen on a Windows PC and right clicking -> Format. Remember to backup your data, otherwise you will lose everything. Your pen will still be able to be used on Windows pcs and Macs. You could also use other fileformats...
... like EXT4 or f2fs or exFAT or whatever, but do it at your own risk. I have no idea if those would work, despite them being able to use the linux permission system.
3rd step - Install the wonderful app Paragon HFS and NTFS mounter from appstore or whatever. They say it isn't compatible with marshmallow but it is, the only issue is that it can't mount a pendrive automatically but it's very easy to do it manually. In the settings menu, you can set SELinux as permissive. Since I'm not an android dev, only an ambicious amateur, I can't really explain what it does or what happens when you do that. So far, neither me or my phone died because of that, so.
Oh by the way, whenever you insert the pen , Android will say it's corrupted and ask you to format it. DO NOT DO IT! That happens because Android doesn't natively support NTFS (hence using an external app to solve that). Oh, and since we're talking about that, there is a way for Android to natively support NTFS...
..., just search it up on XDA. Beware that it's outdated and it won't work on Marshmallow either, unless you edit the copymodulecrc script, but that goes beyond my knowledge. For now, stick to the plan.
4th step - You need to choose the folder which you want to mount the pen to, which will be a folder in the root Android folder (I chose /pen so that I wouldn't forget)
You are now probably thinking, "That's insane! You need to edit init.rc in order to do that!" Well, you're kinda right, but there is a workaround for that. Why do I do this? Well...
... if you mount the pen in another random folder such as /storage/emulated/0/pen it won't work because all the folders underlying that one have certain permission issues that don't let other media apps be able to search for music files.
So here I'll show you two ways of accomplishing this.
4.1 Editing init.rc - This is very complex and NOT RECOMMENDED unless you're very comfortable with messing with boot files. PLEASE DO NOT DO THIS if you aren't sure of what you're doing, don't tell me I didn't warn you.
So in order to do this, well, I won't explain it to you. Search it up on the internet, it's very complex and too big for me to post here. But in the end what you want to do is edit the init.rc file, adding two lines:
"mkdir /pen" and "chmod 777 /pen".
4.2 Creating a script that runs on boot - This is the one method I recommend since it's harmless, but you have to install yet another app, that allows you to run scripts at boot. I used script manager. Then create a script that mounts the / folder as rw, creates the folder /pen, chmods it to 777. I used the following:
#!/system/bin/sh
su -c mount -o rw,remount /proc /
su -c mkdir /pen
su -c chmod 777 /pen
I tried other mount -o commands with rootfs instead of /proc but they didn't work. I don't know the difference but I hope it's harmless. Anyways, let's move on.
Run the script to see if it works, and to create the folder. Use a rooted file explorer to verify if the folder was created.
5th step - Reboot your phone if you had to set SELinux as permissive, and type on the Terminal "su -c getenforce" to confirm that your SELinux is permissive.
VERY IMPORTANT - On the Paragon app, open settings and disable FS access rights, otherwise it's the same as mounting a Fat32 pendrive - not what we want.
On the Paragon app, choose the folder we created before as the folder to mount the pen to, and mount the pendrive. If you followed all the previous steps correctly, the app won't have any issues mounting the pen.
6th step - Find a way to enforce Android building a media library with the new files in the USB OTG pendrive. There are many ways to do this and I recomment the one I used, but I will tell you other ways.
I used the app jetAudio which is a media player that can also forceably build a media library. On jetAudio settings menu, press "Rebuild media library" and point to the /pen folder. It will start reading all the files and Android now detects your pendrive as a media library.
Another way would be to use an app called FolderMount, and creat a symlink from the /pen to another folder in your emulated SD storage (you know, the only folder you have access to if you're not rooted), and wait for some time until hopefully Android detects your new music. If you don't want to use FolderMount, do a symlink with another method (like the ln command)
EDIT - Another cool way I found elsewhere on StackExchange is to run this command (through a script or whatever):
am broadcast -a android.intent.action.MEDIA_MOUNTED -n com.android.providers.media/.MediaScannerReceiver (-d file:///pen)
which forces Android to run a media scan. The part on parenthesis is optional, you can use it to choose the folder in which Android runs the media scan.
Hurray! Congrats for reaching this part of the post. If you did everything correctly, all media apps will finally be able to find the files. I posted some screenies to orientate you.
Feel free to ask anything and I will try to answer or explain. Remember that I'm no Android dev so my knowledge is limited. Feel free to thank me, if you want too.
reserved post
Why so compilcated? USB-OTG is supported on the fly by Android 6.0 / Marshmallow, but unfortunately most of the N7-kernels have a bug which lead to reboot on unmounting the OTG-Device. Nevertheless the next version of Android 6 AOSP on Grouper should have it fixed this issue ...
AndDiSa said:
Why so compilcated? USB-OTG is supported on the fly by Android 6.0 / Marshmallow, but unfortunately most of the N7-kernels have a bug which lead to reboot on unmounting the OTG-Device. Nevertheless the next version of Android 6 AOSP on Grouper should have it fixed this issue ...
Click to expand...
Click to collapse
It's not as straight-forward as you're saying.
Most media player apps that weren't updated to support Android 6's native USB OTG support will not be able to read a pen's contents. This topic that I made is aimed to circumvent the issue by mounting the pen in a different way. That bug you mentioned is not something I want to solve, and even if a new kernel solved the issue that I'm talking about, most manufacturers wouldn't update their devices...
Ok, you may be right with apps which are not yet updated to support Marshmallow, I didn't check that.
gaferreira13 said:
It's not as straight-forward as you're saying.
Most media player apps that weren't updated to support Android 6's native USB OTG support will not be able to read a pen's contents. This topic that I made is aimed to circumvent the issue by mounting the pen in a different way. That bug you mentioned is not something I want to solve, and even if a new kernel solved the issue that I'm talking about, most manufacturers wouldn't update their devices...
Click to expand...
Click to collapse
Oh, and maybe now that I think of it, this could solve the problem, since mounting/unmounting is done with the Paragon app instead of Android. Give it a shot
AndDiSa said:
Why so compilcated? USB-OTG is supported on the fly by Android 6.0 / Marshmallow, but unfortunately most of the N7-kernels have a bug which lead to reboot on unmounting the OTG-Device. Nevertheless the next version of Android 6 AOSP on Grouper should have it fixed this issue ...
Click to expand...
Click to collapse
Using native otg function, you can only copy files between phone and otg dive. To open a file e.g. To install apk from otg, you have to first copy it to phone's storage. On many media player, video can only be played sequentially (seek bar doesn't work).
Stuck at step 4.2, folder is not created
kashinath said:
View attachment 3746340Stuck at step 4.2, folder is not created
Click to expand...
Click to collapse
Hey, is there any way for you to determine the path of your root folder? Maybe using ES File Explorer. For some phones, the root folder isn't pointed to /.
EDIT - If you can't do that, try replacing the first of those commands with the following:
su -c mount -o rw,remount,rw /system
I'm also getting the same issue as kashinath, won't let me create pen. I've also tried pointing the mounter to a directory in /storage/emulated/0/pen but it seems to just crash and restart the app.
EDIT:
Okay so I've solved the problem completely differently. The otg storage is found in /mnt/media_rw, so I used the app "FolderMount [ROOT]" to point the folder "pen" (in the internal storage) to the /mnt/media_rw/*random string* folder. I then used the app "media.Re.Scan:" to force the media scanner to scan that folder as it didn't seem to want to do it. Now all apps seem to be working.
What tipped me off about this was this post: http://forum.xda-developers.com/nexus-6/help/marshmallow-usb-otg-mounting-media-t3230588
It seems you have to turn the folder mount on/off every time you plug/unplug the USB drive otherwise it won't play the files.
Thanks for the detailed instructions nonetheless.
Viridis said:
I'm also getting the same issue as kashinath, won't let me create pen. I've also tried pointing the mounter to a directory in /storage/emulated/0/pen but it seems to just crash and restart the app.
EDIT:
Okay so I've solved the problem completely differently. The otg storage is found in /mnt/media_rw, so I used the app "FolderMount [ROOT]" to point the folder "pen" (in the internal storage) to the /mnt/media_rw/*random string* folder. I then used the app "media.Re.Scan:" to force the media scanner to scan that folder as it didn't seem to want to do it. Now all apps seem to be working.
What tipped me off about this was this post: http://forum.xda-developers.com/nexus-6/help/marshmallow-usb-otg-mounting-media-t3230588
It seems you have to turn the folder mount on/off every time you plug/unplug the USB drive otherwise it won't play the files.
Thanks for the detailed instructions nonetheless.
Click to expand...
Click to collapse
Yeah forget mounting anything in the /storage/emulated/0...
According to the post you linked in your comment, "6.0 mounts to /mnt/media_rw/ but I can't seem to get any media players to see it. I tried creating a symbolic link in /storage/emulated, but I get an error with root explorer about symbolic links not being supported" which is exactly what happened to me
If you don't like the folder mount alternative you can always do a bind command (but i'm not sure how it works), search it up and see if you get any results.
Is your pen in Fat32 though?
There is a workaround for the pen thing... If you use Total Commander and want to edit any files in /, it asks you to run a command that mounts the / folder. Try to see what command it is and replicate it into the script, then the rest might work.
Thank you so much !! It worked on my XT1033 falcon dual sim - MM6.0 identity crisis 1.3a . I can finally restore all my nandroid backups.
Just to correct shouldn't the last command in the script be
su -c chmod 777 /pen
instead of
su -c chmod /pen 777
4k5blr said:
Just to correct shouldn't the last command in the script be
su -c chmod 777 /pen
instead of
su -c chmod /pen 777
Click to expand...
Click to collapse
No, thank you
And, damn you're right, lol I'll correct it ASAP, thanks a lot for pointing it out
I'm a complete newbie at this, in fact I rooted my device just to do this
Anyways I'm getting the same issue kashinath is getting and tried the other command you recommended (su -c mount -o rw,remount,rw /system ) wich also didn't work
In that reply you also said that the root folder is different between devices so, if I determine the path to my root folder, where exactly in the script do I have to put it? (Again I'm a newbie)
Arcane35 said:
I'm a complete newbie at this, in fact I rooted my device just to do this
Anyways I'm getting the same issue kashinath is getting and tried the other command you recommended (su -c mount -o rw,remount,rw /system ) wich also didn't work
In that reply you also said that the root folder is different between devices so, if I determine the path to my root folder, where exactly in the script do I have to put it? (Again I'm a newbie)
Click to expand...
Click to collapse
For my phone the Root folder's path is "/" so I'll put 2 arrows where the path to root is in the command:
" su -c mount -o rw,remount /proc --> / <-- "
So imagine your root path is /root
The command would look like this: " su -c mount -o rw,remount /proc /root " (without "" of course)
If you still can't find the path to your root folder, try searching on the internet "root folder for xxxxx phone"
Hope it helps
gaferreira13 said:
For my phone the Root folder's path is "/" so I'll put 2 arrows where the path to root is in the command:
" su -c mount -o rw,remount /proc --> / <-- "
So imagine your root path is /root
The command would look like this: " su -c mount -o rw,remount /proc /root " (without "" of course)
If you still can't find the path to your root folder, try searching on the internet "root folder for xxxxx phone"
Hope it helps
Click to expand...
Click to collapse
Turns out my phone's root folder is also / , and I'm still getting the same error (mount: '/' not in /proc/mounts)
Maybe its because I have Nougat :/
EDIT: So I think I managed to kinda work around that, I change the command to " su -c mount -o rw,remount / " and it ended up making the pen folder and no errors came out. So I then proceeded to open Paragon, disabled FS access rights, ensured that SELinux was permissive (it is) and change the mount point to the /pen folder, I finally proceeded to manually mount the thing BUT even tough that in my notifications says that I mounted it, on the app it still says that my Flash Drive is still not mounted (even tough it detects it and know that it is an NTFS file system). Basically whenever I try to mount my Flash Drive it wont work even tough the app detects it.
Arcane35 said:
Turns out my phone's root folder is also / , and I'm still getting the same error (mount: '/' not in /proc/mounts)
Maybe its because I have Nougat :/
Click to expand...
Click to collapse
Ooooh. Remember the topic is called "Full USB OTG on Media Players in Marshmallow"
I can't help you then, sorry. The only thing I can tell you is to open the /proc/mounts file as text on the top there should be a command that tells android to mount the root folder as rootfs I believe.
Maybe that could help.
Arcane35 said:
EDIT: So I think I managed to kinda work around that, I change the command to " su -c mount -o rw,remount / " and it ended up making the pen folder and no errors came out. So I then proceeded to open Paragon, disabled FS access rights, ensured that SELinux was permissive (it is) and change the mount point to the /pen folder, I finally proceeded to manually mount the thing BUT even tough that in my notifications says that I mounted it, on the app it still says that my Flash Drive is still not mounted (even tough it detects it and know that it is an NTFS file system). Basically whenever I try to mount my Flash Drive it wont work even tough the app detects it.
Click to expand...
Click to collapse
Try to open the /pen folder, try to see in the properties of /pen if the permissions are set to 777.
gaferreira13 said:
Try to open the /pen folder, try to see in the properties of /pen if the permissions are set to 777.
Click to expand...
Click to collapse
It is set as 0777, so yes (if the 0 is not supposed to be there)
Arcane35 said:
It is set as 0777, so yes (if the 0 is not supposed to be there)
Click to expand...
Click to collapse
Hmm... If you can open the folder fine and maybe create a file in there or something then I can't help you any further. The paragon app doesn't let you do much regarding troubleshooting.
Try using the methods that other people did like using Foldermount or something like that.

Enable System RW on Oreo

Hey guys, I recently updated my Moto Z Play, retin version to Oreo...Rooted it via magisk and installed xposed.. So far everything seems good and the battery has also improved a lot.. The only thing that bugs me right now is that i am unable to modify /system files... I was trying to change my bootanimation.zip file...Used RootExplorer, FX Explorer, Root Browser but to no avail..All of them were denied RW permission... Tried booting into TWRP and mounting system as RW, moved the bootanimation.zip to system/media and as soon as i rebooted my device, the change was reverted... It seems any change we make to /system is reverted back due to verification at boot... Is there a way to enable RW access so that i can modify /system files... Thanks
mhp1995 said:
Hey guys, I recently updated my Moto Z Play, retin version to Oreo...Rooted it via magisk and installed xposed.. So far everything seems good and the battery has also improved a lot.. The only thing that bugs me right now is that i am unable to modify /system files... I was trying to change my bootanimation.zip file...Used RootExplorer, FX Explorer, Root Browser but to no avail..All of them were denied RW permission... Tried booting into TWRP and mounting system as RW, moved the bootanimation.zip to system/media and as soon as i rebooted my device, the change was reverted... It seems any change we make to /system is reverted back due to verification at boot... Is there a way to enable RW access so that i can modify /system files... Thanks
Click to expand...
Click to collapse
Try looking for a system_root folder that Magisk creates and see if you can change it there.
Milly7 said:
Try looking for a system_root folder that Magisk creates and see if you can change it there.
Click to expand...
Click to collapse
Nope, there is no such folder in my phone... Is it just me without RW /system access or is it with every oreo devices? How do you guys access and modify /system files on oreo?
Idea of Magisk is not to modify system. Please read documentation and questions other peoples asked.
tag68 said:
Idea of Magisk is not to modify system. Please read documentation and questions other peoples asked.
Click to expand...
Click to collapse
I know but on 7.1(nougat) with magisk and xposed installed, I was able to modify system files.. I used to do all kind of build prop edits & other stuff but on oreo I am facing issues with installation of busybox as well as modifying system files...
My problem is the opposite: it is way too easy to mount system rw. One click ona button in TC, and I won't be able to do OTA without flashing system again.
So, I don't want to find out if system is mounting rw on my mobile. These modifications you want to do are better to do in Magisk way. If you do a system update, you keep your Magisk settings, so modifications will stay. OTA will only require uninstall of Magisk. Why do you want to do them the hard, incompatible way?
tag68 said:
My problem is the opposite: it is way too easy to mount system rw. One click ona button in TC, and I won't be able to do OTA without flashing system again.
So, I don't want to find out if system is mounting rw on my mobile. These modifications you want to do are better to do in Magisk way. If you do a system update, you keep your Magisk settings, so modifications will stay. OTA will only require uninstall of Magisk. Why do you want to do them the hard, incompatible way?
Click to expand...
Click to collapse
+1
<deleted>
On some device you can do this function in recovery.....
TWRP can do these changes when you disable the "mount system as RO" in mount settings. But you'll have to flash a zip that removes dm-verity too, otherwise it won't boot up. Magisk will most likely fail to change the bootanimation on many devices because it can't replace it soon enough.

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

Question Unable to copy file to system/priv-app

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)

Categories

Resources