0

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:

  1. Manually mounting the partition. I tried running mount -t ext4 /dev/block/sda2 /mnt/media_rw/usbotg, but that doesn't work and outputs mount: '/dev/block/sda2'->'/mnt/media_rw/usbotg': Invalid argument. I was trying this, because of this answer - https://android.stackexchange.com/a/220020.

  2. I also tried using vold-posix, but for some reason Magisk fails to install the module and shows Unable to unpack boot image, even though it is able to install Magisk updates on the boot image.

RadoslavL
  • 11
  • 3
  • Please tell us explicitly what have you tried so far. And how it did not work for you. What error are you getting? What are you trying to achieve? – Irfan Latif Jul 12 '23 at 13:10
  • @IrfanLatif I added additional information. – RadoslavL Jul 12 '23 at 17:22
  • Invalid argument is a general error. Run strace mount to get detailed log. – Irfan Latif Jul 13 '23 at 08:28
  • @IrfanLatif I couldn't copy everything, but here are the last lines, that I think might be relevant - https://pastebin.com/CS2FE1xS. (65F0-14E9 is my SD card) – RadoslavL Jul 13 '23 at 08:50
  • I meant strace mount -t ext4 /dev/block/sda2 /mnt/media_rw/usbotg. Syscall tracing of the failing command. – Irfan Latif Jul 13 '23 at 10:33
  • @IrfanLatif This is the output - https://drive.google.com/file/d/1neT8izdswtsGGBJ7Bqbg77KF9zEfGYip/view?usp=drivesdk. I couldn't upload it to pastebin. – RadoslavL Jul 13 '23 at 20:58
  • It's pretty verbose: mount("/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:41
  • @IrfanLatif mkdir: '/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:44
  • @IrfanLatif I tried another directory and this one for sure exists. Here are the logs - https://drive.google.com/file/d/1oyDmfJnnMxhAwyWI7jPgKOGCA-2FLrwS/view?usp=drivesdk. Also I wanted to say that the usbotg directory exists. It is for sure a directory. I have no idea why it doesn't work. – RadoslavL Jul 14 '23 at 13:23
  • Then /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 with mount man page. – Irfan Latif Jul 14 '23 at 13:31
  • @IrfanLatif I messed it up, but here is the final output - https://drive.google.com/file/d/1pKpiEoJ18EwsT36uuGdrdho2FWnTfwwp/view?usp=drivesdk. Sorry for the delay! – RadoslavL Jul 14 '23 at 14:40
  • Are you sure that /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?. Does dd if=/dev/block/sda2 bs=1 skip=1080 count=2 status=none | xxd show 53ef? What happens if you do not provide filesystem (with -t ext4)? – Irfan Latif Jul 14 '23 at 20:19
  • @IrfanLatif The command returns 00000000: 53ef. If I don't add -t ext4 when mounting the partition, the output is mount: /dev/block/sda2: need -t. – RadoslavL Jul 15 '23 at 10:55
  • @IrfanLatif I found that the partition I was trying to mount had been corrupted by an app I used to shrink it. After formatting the partition it works flawlessly. – RadoslavL Aug 06 '23 at 21:46

0 Answers0