I'm trying to mount the Android nand image provided by Project Sandcastle (a project that can run Android 10 on an iPhone 7). I'm trying to mount this disk image so that I can edit the boot.img file that is presumably in this image. Here's some information about the file:
$ file nand
nand: DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x0,4,4), startsector 1, 255 sectors; partition 2 : ID=0x7, start-CHS (0x0,4,5), end-CHS (0x0,8,8), startsector 256, 256 sectors
$ sudo fdisk -lu nand
Disk nand: 3.5 GiB, 3269459968 bytes, 6385664 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
nand1 1 255 255 127.5K ee GPT
nand2 256 511 256 128K 7 HPFS/NTFS/exFAT
I've tried to mount this in macOS, but it asked for a filesystem and ext4 and msdos didn't work. So I made an Ubuntu live USB and tried these commands and got this output:
$ sudo mkdir /android
$ sudo mount -o loop,rw,offset=512 nand /android
mount: /android: wrong fs type, bad option, bad superblock on /dev/loop6, missing codepage or helper program, or other error.
So I tried to give nand
a file extension, I thought that maybe it wasn't recognizing it as a file because there was no extension.
$ mv nand android.image
$ sudo mount -o loop,rw,offset=512 android.image /android
NTFS signature is missing.
Failed to mount '/dev/loop6': Invalid argument
The device '/dev/loop6' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
I tried mounting the other partition with offset=$((512*256)) but the same output occurred. I also tried it with no offset, but the same output occurred. Finally, I tried using ro instead of rw, but again, the same output occurred. I'm stuck and I don't know what to do next. The gzipped nand image can be found at this link. I'd really appreciate any help anyone can offer.