Mounting boot partition - Android Q&A, Help & Troubleshooting

I have a Moto X 2013(ghost) and want to mount my boot partition out of curiosity. Either on my phone or my PC. I pulled an image of the partition with dd but I can't seem to determine the type of filesystem in the partition. The file command just labels it as data. Can anyone shed some light on whether or not that partition has a filesystem at all? I'd imagine it would have to then again it wouldn't surprise me if it didn't.

Related

read on a no-filesystem partition

the s3 has a couple partitions that have no filesystem.
in log files their filesystems are named as emmc.
the device is able to boot from this partitons(recovery, bota0, bota1)
my question is. how to get access to the files on this partitions?
i tried to mount the recovery partition after copy it with dd on a ubuntu system,
but no chance. response was something like: give me a filesystem.

[Q] Mount arbitary phone partition on PC? Change partition "names"?

Hello!
I am running rooted stock Android 2.3 on LG E405 (no working 4.x ROMs exist for the device)
I have two questions:
1) What is the shell command to manually make android allow the PC to mount androids' (internal) partition as USB-drive? (I cannot think of right keywords to google this one up - please help!)
2) How does android determine which partition is which (i.e. which one to remount for the PC when connecting in "USB storage" mode), beside vold.fstab and init.rc? On android 2.3 that info is not in "framework-res.apk", so where is it? In the partition table itself?
Please help me search the forums for an answer. ANY advise is much appreciated!
This is why I ask:
I had switched data partition with internal sdcard partition.
Here's how:
Phone had a very small "/data" partition on /dev/block/mmcblk0p21 and large internal "/sdcard" partition on mmcblk0p20
So I reformatted mmcblk0p20 (ex-sdcard partition) into EXT4 and mmcblk0p21 (ex-data partition) into FAT32
Then I changed init.rc to mount mmcblk0p20 as /data type EXT4 and mmcblk0p21 as /sdcard type VFAT (mounting /sdcard was commented out in stock init.rc for some reason). This required modifying my boot image.
I have also set correct partition number in vold.fstab:
[#]dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.3/mmc_host[/#]
So basicly I now have a large /data partition and small internal /sdcard.
I'm able install up to a gigabyte of APKs and it works fine.
However, when I connect to my PC via USB into "USB Storage" mode, the phone seems to still try to unmount what was previously sdcard partition (/dev/block/mmcblk0p20), instead of what is NOW an sdcard partition (/dev/block/mmcblk0p21)
I can still send files to the phone via wi-fi and ADB, but the ability to mount it directly would be nice.
If I accidentally select "erase internal sdcard" from storage menu, that will also most likely erase what is now my /data partition, softbricking the phone.
The "factory reset" option will probably only corrupt the sdcard.
There may be other problems with that.
I am also interested in mounting the data partition in this way. Does anyone know how to do it?

[Q] Mounting dd partitions

Hi guys
Using ADB copied all the individual partitions (boot, aboot, system, recovery, etc) from my device to my sd card and then to my pc (Linux). Device is a Hisense Infinity H6 (HS-U800).
I am unable to mount any of the files, and have tried gdisk, fdisk, mount. I get a mount error or wring filesystem type.
Also trying to dd the entire block directly makes a single image that i am unable to read. I tried using gdisk to repair the gpt or recreate an mbr but to no avail.
I would prefer to work with the individual partitions as it appears that they have different filesystems for each. But when I specify the filesystem using mount i get a wring filesystem error.
Would appreciate any help, thanks.
PS
I'm using Ubuntu 14.04 LTS.
###
EDIT
###
Never mind, it turns out that if you dd directly from phone memory to pc android corrupts the files. Fixed it by using the sdcard as an intermediary step.

/data (mmcblk0p8) filesystem format on KatKiss v30

Hello all,
I'm hoping someone can help me with this. Long story short, I've bricked my Prime. I was running TWRP recovery (AndroWook, so 2.6.something?) and KatKiss v30 when things went south... but unbricking is for another day.
I'm more interested in getting some data that didn't make it into my last backup off the /sdcard. I don't have access to the device itself (adb or fastboot, haven't tried APX yet), but I did managed to take an image of /dev/block/mmcblk0p8 via the dd command.
The problem is I can't mount it as a loop device in Linux. The problem that started all this was that KatKiss wouldn't boot... the output of "fdisk -l /dev/block/mmcblk0" suggested that its partition table was corrupted or gone.
Various suggestions on XDA and elsewhere (xmount, kpartx, etc.) haven't allowed me to mount this backup image... I'm wondering if the missing partition table isn't the issue.
[email protected]:~/prime_backup_microsdcard_32G_20151227$ sudo mount -t auto -o
loop tf201-mmcblk0p8.img /mnt
NTFS signature is missing.
Failed to mount '/dev/loop3': Invalid argument
The device '/dev/loop3' 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?
So my thought is to try the following:
1. Create a virtual HD of >27.GB (the size of the backup image).
2. Create a partition of the exact size/dimensions as the backup I have, and ensure I'm able to mount it.
3. Restore the backup to this partition using dd.
4. Profit.
Does this make sense, and if so, what format is /dev/block/mmcblk0p8? Based on the steps to install KatKiss I would have guessed f2fs, but the mount error above makes me think otherwise.
Thanks in advance for your help.
ACP

/system partition unmountable after flashing rom?

I have a ZTE Axon 7 (A2017U) and I'm trying to install a stock rom (A2017UV1.1.0B35). I currently have TWRP installed and an unlocked bootloader. I can access the device via fastboot and TWRP recovery mode, but otherwise it will not boot.
I'm stuck in a loop:
If I install my rom via TWRP, when I reboot the phone the /system partition is never mounted. I can see "Failed to mount '/system' (Invalid argument)" written in the log
If I view the /system partition details on TWRP's "Wipe->Advanced wipe->Repair or change file system" screen, the partition is listed as "Present: Yes, Removable: No, Size: 0MB, Used: 0MB, Free: 0MB, Backup size: 0MB
If I format the /system partition using "Wipe" function, the "Formatting system using make_ext4fs" operation succeeds and partition seems to be correctly formatted using ext4, and is listed as "Present: Yes, Removable: No, Size: 5455MB, Used: 10MB, Free: 5444MB, Backup size: 10MB
I'm able to access the partition via the terminal, and if I write a text file to it and reboot the device, I'm able to read it back... It seems the partition is working correctly.
I attempt to install the rom again using TWRP's "Install->Install zip" option, and after ~10 minutes it states that installation was completed successfully.
I reboot the device and the OS does not load. If I access TWRP, I see the /system partition is not mounted and the cycle continues
I've also tried installing other roms (e.g. Lineage OS), but they all fail assert checks, even thought I'm 100% positive they're for the correct device.
I'm tearing my hair out here. I'm a programmer by day and I'm fairly experienced with Unix, but admittedly I don't have much experience working with Android. There's a good chance I'm missing something.
Any idea what's going on, or what to try next? Is there any other information I can provide that might help me troubleshoot the problem?
I don't know of this will help, but I had a similar issue with a Samsung phone once. What had happened is when I flashed the new ROM the .dat or .img file was smaller than the original partition and it shrunk the system partition. I was lucky and I had previously dumped a copy of my system partition with terminal and was able to put it back.
When the partition was shrunk it wouldn't install any other ROM's either. If you could get another user with your same device to dump their system into an .img file we might be able to fix it with dd commands.
Sent from my LG-Q710AL using Tapatalk

Categories

Resources