I tried mounting the ext4 partition as root, but it didn't work. My phone is rooted, but as it seems no one has managed to do what I want to do. I couldn't find any solution, that worked for me. How can I mount the ext4 partition?
What I have tried so far:
Manually mounting the partition. I tried running
mount -t ext4 /dev/block/sda2 /mnt/media_rw/usbotg
, but that doesn't work and outputsmount: '/dev/block/sda2'->'/mnt/media_rw/usbotg': Invalid argument
. I was trying this, because of this answer - https://android.stackexchange.com/a/220020.I also tried using
vold-posix
, but for some reason Magisk fails to install the module and showsUnable to unpack boot image
, even though it is able to install Magisk updates on the boot image.
Invalid argument
is a general error. Runstrace mount
to get detailed log. – Irfan Latif Jul 13 '23 at 08:28strace mount -t ext4 /dev/block/sda2 /mnt/media_rw/usbotg
. Syscall tracing of the failing command. – Irfan Latif Jul 13 '23 at 10:33mount("/dev/block/sda2", "/mnt/media_rw/usbotg", "ext4", MS_SILENT, NULL) = -1 ENOENT (No such file or directory)
. First create directory:mkdir /mnt/media_rw/usbotg
. – Irfan Latif Jul 13 '23 at 21:41mkdir: '/mnt/media_rw/usbotg/': File exists
. Oh it is a file. I will find a new directory then. Sorry. – RadoslavL Jul 14 '23 at 05:44usbotg
directory exists. It is for sure a directory. I have no idea why it doesn't work. – RadoslavL Jul 14 '23 at 13:23/dev/block/sda2
does not exist for sure. It looks like that you have just copied the command and you are not sure what you are doing. It's a dangerous practice. Please spend some time to familiarize yourself with commandline. Start withmount
man page. – Irfan Latif Jul 14 '23 at 13:31/dev/block/sda2
is an EXT4 filesystem? See How do I find what type of file system is of an attached USB or SD card?. Doesdd if=/dev/block/sda2 bs=1 skip=1080 count=2 status=none | xxd
show53ef
? What happens if you do not provide filesystem (with-t ext4
)? – Irfan Latif Jul 14 '23 at 20:1900000000: 53ef
. If I don't add-t ext4
when mounting the partition, the output ismount: /dev/block/sda2: need -t
. – RadoslavL Jul 15 '23 at 10:55