[Q] Cannot upgrade from Cyanogenmod 7.0.3 to 7.1: Can't mount /dev/block/mmcblk01 - General Questions and Answers

Hello,
First I'd like to tell that I've already searched the forum using Google for my problem, but I'm really new to Android and almost all posts are using lots of acronyms that I don't understand. Eventually I found myself with so many tabs opened in my browser that I almost lost what I was looking for at first.
I have a rooted (with Unrevoked) HTC Desire (Clockworkmod Recovery is in place), on which I managed to install Cyangenmod 7.0.3 a few months ago. I can't recall how I get to this result unfortunately. At the time, I only remember that I fiddled a lot because although there are plenty of howtos for many different things, they look all different and/or specific to one device, and the newbie user is not warned about the potential differences he could face.
Now I would like to upgrade to Cyanogenmod 7.1 (for bug fixes) and install DarkTremor App2SD (because I've created an ext4 partition long ago on my SD-card, naively thinkg it would be used, but it stays desperately empty; and the phone internal memory is almost full despite my strenuous attempts to move as much apps as possible to the SD card using, as far as I can tell, CyanogenMod's Apps2SD).
I stumbled on a nice video explaining "how to upgrade Cyanogenmod 7" (search this exact string on Youtube): basically, it uses ROM Manager to install the new Cyanogenmod without wiping (this is probably something that the ROM supports between minor versions). As I understand it, I should be able to use this method to install DarkTremor App2SD as well.
So I've download the Cyanogenmod 7.1 zip file and even copied in as "update.zip" in the root of my FAT32 partition of my SD card. Unfortunately, Clockwordmod Recovery spits the following message:
Code:
Waiting for SD Card to mount (12s)
E: Can't mount /dev/block/mmcblk0 (or /dev/block/mmcblk0p1)
(Invalid Argument)
Waiting for SD Card to mount (11s)
E: Can't mount /dev/block/mmcblk0 (or /dev/block/mmcblk0p1)
(Invalid Argument)
[...]
Timed out waiting for SD Card...
and then goes back to the recovery menu.
My SD card is partitioned with the following scheme (output is from Linux parted on /dev/sdb, which is accessed through an USB cable with USB storage activated on the phone):
Code:
(parted) p
Model: HTC Desire (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 16.4kB 67.1MB 67.1MB primary
2 67.1MB 537MB 470MB primary ext4
3 537MB 16.0GB 15.5GB primary fat32 lba
As you can see, the first partition is a swap partition (not sure it has been ever used though), the second one in my ext4 partition where I want to move my apps and the third one in the FAT32 partition which contains update.zip.
Thus my understanding it that /dev/block/mmcblk0(p1) points at best to the swap partition. Am I correct?
I could use another temporary SD card to perform the update, but this is unwieldy and given this partitioning scheme looks pretty common among the Android community, I wonder there's an easier way and/or if I missed something.
Please, avoid "me too" replies . And you would be nice if you avoided using acronyms as much as possible when replying (or at least, give a definition upon first use).
Thanks a lot for your help.
Cheers,
-- Tatazou

tatazou said:
Hello,
My SD card is partitioned with the following scheme (output is from Linux parted on /dev/sdb, which is accessed through an USB cable with USB storage activated on the phone):
Code:
(parted) p
Model: HTC Desire (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 16.4kB 67.1MB 67.1MB primary
2 67.1MB 537MB 470MB primary ext4
3 537MB 16.0GB 15.5GB primary fat32 lba
As you can see, the first partition is a swap partition (not sure it has been ever used though), the second one in my ext4 partition where I want to move my apps and the third one in the FAT32 partition which contains update.zip.
Thus my understanding it that /dev/block/mmcblk0(p1) points at best to the swap partition. Am I correct?
-- Tatazou
Click to expand...
Click to collapse
I think I got this more or less confirmed: I got into the phone with "adb shell" and checked /proc/partitions:
Code:
major minor #blocks name
31 0 640 mtdblock0
31 1 5120 mtdblock1
31 2 2560 mtdblock2
31 3 256000 mtdblock3
31 4 40960 mtdblock4
31 5 151168 mtdblock5
179 0 15637504 mmcblk0
179 1 65520 mmcblk0p1
179 2 458752 mmcblk0p2
179 3 15113216 mmcblk0p3
Apart from the internal storage, you can see the mmcblk0 device and its partitions whose sizes match the parted output above.

Related

[Q] ROM Manager-created partitions - need to recreate corrupted part table

Hi
My sd card on my Desire has become corrupted. I have a2sd+ on there; I can start from scratch (I accept the risk of installing development ROMs!) but I could really do with getting to the photos I took this morning before the card crashed.
gpart won't find the partitions at all but there's definitely still data on the card - if I strings the card I can see the DOS directory structure.
I used ROM Manager to create a 512MB ext partition with 0MB swap; I tried creating a w95 FAT32 (lba) partition of all the disk except the last 512MB using fdisk, but the partitions won't mount when I do that.
Anyone got an idea what values I should pass to fdisk to get it back?
I have
Disk /dev/sdb: 8017 MB, 8017412096 bytes
247 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 15314 * 512 = 7840768 bytes
I figured the FAT32 part is probably first, so I calculated the size of a 512MB partition as 65 blocks and assigned the first 956 blocks to the FAT partition, with the rest as the ext partition, but it made no difference.
I tried getting RM to create a partition on a second card I have and when I look at it in fdisk it looks really weird - there's messages about "Partition 1 has different physical/logical beginnings (non-Linux?)" and "Partition 1 does not end on a cylinder boundary"
Is there a way to recreate the partitions that ROM Manager would create without wiping the existing data?
Thanks!

[Tutorial] How to manually create, align and format sd partitions

So.. You've plugged your SD to your linux box and want to created aligned partitions with fdisk?
Follow exactly what I'm doing and your partitions will be MB aligned.
At the end you'll get a FAT32 partition for your data and an ext4 partition for data2xxxx scripts.
If you need more partitions, just adapt this tutorial to you needs.
I know some scripts or recoveries do this automatically so no need to remind me
I initially posted this in SuperNova ROM thread but it might worth a separate thread.
I've done this with an old 1GB usb key just to show you the commands, you'll have to adapt to your SD depending on it's size.
When I plugged the flash drive, it got recognized by my system as /dev/sde. It can be different on your system and once again you'll have to figure-out yourself the correct device.
Here as an example I'm splitting the flash drive in 2 partitions. 1st (512Mb) will be for the fat32 partition and will have to be formatted later. The rest is the future ext4 and is about 512MB too.
I'm gonna use 2 magic parameters with fdisk, in order to get 1024Kb clusters (2048x512 bytes) and align easily the partitions. 64 heads and 32 sectors should give 64x32=2048 so that is going to be my params here
Code:
fdisk -H64 -S32 /dev/sde
Command (m for help): p
Disk /dev/sde: 1054 MB, 1054605312 bytes
64 heads, 32 sectors/track, 1005 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sde1 * 1 1005 1028043+ 6 FAT16
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 3, 45) logical=(0, 7, 10)
Partition 1 has different physical/logical endings:
phys=(509, 63, 63) logical=(1004, 3, 32)
Partition 1 does not end on cylinder boundary.
So here I have an old partition on my key (sde1). I delete it first and check that there is no more partition on the drive.
Repeat the process if you have more than 1 partition on your SD.
Make sure that it's clean before proceeding to the next step.
Code:
Command (m for help): d
Selected partition 1
Command (m for help): p
Disk /dev/sde: 1054 MB, 1054605312 bytes
64 heads, 32 sectors/track, 1005 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
Empty! Great! The key is clean. Let's partition it now
Code:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1005, default 1): 2
Last cylinder or +size or +sizeM or +sizeK (2-1005, default 1005): 512
Command (m for help): p
Disk /dev/sde: 1054 MB, 1054605312 bytes
64 heads, 32 sectors/track, 1005 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sde1 2 512 523264 83 Linux
Ok now I have a partition starting on cylinder 2 and 512Mb in size. If your SD is 16GB, you can use for instance a size of 15GB to leave 1GB for the ext4 partition.
That would give approximately 15x1024=15360 instead of 512. Got it?
Pay attention to the value below "End". Here it is 512 so I will use the next cylinder (513) for the 2nd partition:
Code:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (1-1005, default 1): 513
Last cylinder or +size or +sizeM or +sizeK (513-1005, default 1005):
Using default value 1005
Command (m for help): p
Disk /dev/sde: 1054 MB, 1054605312 bytes
64 heads, 32 sectors/track, 1005 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sde1 2 512 523264 83 Linux
/dev/sde2 513 1005 504832 83 Linux
Now I have 2 partitions aligned to 1MB but declared as "linux". Let's change that to FAT32 for partition 1.
Code:
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): c
Changed system type of partition 1 to c (W95 FAT32 (LBA))
Command (m for help): p
Disk /dev/sde: 1054 MB, 1054605312 bytes
64 heads, 32 sectors/track, 1005 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sde1 2 512 523264 c W95 FAT32 (LBA)
/dev/sde2 513 1005 504832 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks
That's all.
Now format 1st partition to FAT32 with this guide:
credits to kd8cgo
Code:
Making an aligned FAT32 format
Anyone can figure out alignment of the partition from many sources already posted on the web.
One thing I could not find was a guide on how to align that pesky FAT32 format so that each
cluster (allocation unit) is aligned inside the boundaries of erase blocks. Well, the Linux mkfs.vfat
utility has all the options we need to make this aligned format possible!
Please view this primer to FAT32 to get an idea of how the system is laid out on your disk.
You normally have the first sector in the partition which is your Volume ID, which sits in the
reserved space which is normally the first 32 sectors in the partition. This is followed
by (2) copies of the File Allocation Tables, which vary in length when created depending on
a variety of factors, including the chosen allocation unit size. The FAT size remains constant
after creation. Please keep in mind for this discussion the physical size of a sector, which is 512 bytes.
The Golden Nugget
We will be changing the reserved sectors from the default value of 32, to a number that
we will calculate from the reported size of the FAT tables after formatting. The goal will be to
make the FAT tables end right at a 128K boundary, so each cluster of the file system will fall
neatly within erase blocks on our disk!
First we will format our disk using FAT32 paying no mind to reserved sectors. This will
report to us our FAT size as so:
[email protected]:~$ sudo mkfs.vfat -F 32 -n UserData -s 32 -v /dev/sde1
mkfs.vfat 3.0.7 (24 Dec 2009)
/dev/sdd1 has 224 heads and 56 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 31309312 sectors;
file system has 2 32-bit FATs and 32 sectors per cluster.
FAT size is 7641 sectors, and provides 977937 clusters.
Volume ID is 40c250bd, volume label UserData .
The juicy bits are that 2nd to last line, it tells you the size on disk of 1 FAT table.
7641 sector FAT x 2 FATs x 512 bytes/sector = 7,824,384 bytes
The above formula shows you the exact amount of space the FAT tables are using at
the beginning of your disk. This number is not usually going to be evenly divisible by
128K (131,072 bytes) as you can see 7,824,384 / 131072 = 59.695 erase block sized
chunks. What we need to do is force the end of those FAT tables to end right at
60 blocks to do so we:
131,072 x 60 = 7,864,320 bytes in 60 erase blocks
7,864,320 - 7,824,384 = 39,936 bytes remainder
39,936 / 512 = 78 sectors remain
New reserved sector count for alignment = 78
Those are all the fundamentals required to align a FAT32 partition, so that
clusters on the disk fall in line with the erase blocks of the physical cell medium.
An example of the format command required:
sudo mkfs.vfat -F 32 -R 78 -n UserData -s 32 -v /dev/sde1
Breakdown:
sudo - super user privledges
mkfs.vfat - create a FAT file system
-F 32 - 32 bit FAT (FAT32)
-R 78 - Use 78 Reserved Sectors (instead of 32)
-n UserData - drive label, up to 11 characters
-s 32 - 32 sectors per cluster 32 x 512 - 16K allocation unit size
-v /dev/sdex - Device to format
Note: If you're getting a R=0, use 256 (256x512bytes=128Kb) as the minimum R value for FAT32 is 2.
Format 2nd partition with the following command, replacing xxx with your device
Code:
mke2fs -T ext4 -b 4096 -E stride=64,stripe-width=64,hash_alg=tea -O extent,^huge_file -m 0 -L userdata /dev/xxx2
You should be good to go now!
Reserved for later
thanks for this you absolute babe <3
Did you read post #7 by CitizenJohn a few posts below the original HOWTO: Increase write speed by 'aligning' FAT32
Tends to contradict the method posted by kd8cgo for Fat32
Presumably both methods can't be correct!
Of course I did. I read many posts about SSDs to come to this tutorial.
First of all I don't use the same geometry for creating partitions.
And so far this way of formatting has always been able to give me the best of all my flash memory based devices, SD and USB keys.
Have you tried both methods? Which of the two gave you the best results?
I'm gonna try it again, maybe I missed something the first time.
Of course if there is a proven better way to get even more from our flash drives and SDs, I'll gladly learn it and change the tutorial accordingly.
EDIT:
Posted atto results for both methods on a pretty old flash drive. Left is formatted with the post you mentioned and right is with the "standard" method.
Don't see much of a difference.
I have but quite a while apart, i didn't use any software to measure transfer speed but using a sd-card adapter according to Linux i get ~10Mbs sd-card to PC and ~8Mbs PC to sd-card with the method i mentioned can't imagine a class2 sd-card could get much faster
Damn just realized to PC was Fat partition to PC : To sd-card was to btrfs linux partition
The problem is that we don't know the actual erase block size of each flash drive.
And on top of that, fat32 has block sizes of 64K max. Max erase block size for SD is 256K but is usually less.
I also just tried both methods on a faster usb key (with write speeds up to 15Mb/s) and results are the same.
But each his own and if anybody can get a better data transfer rate with the 2nd method, please report all the details here.
No worries mate thanks for the TUT, the question came out of ignorance rather than any understanding of the methodology
ziggy1001 said:
No worries mate thanks for the TUT, the question came out of ignorance rather than any understanding of the methodology
Click to expand...
Click to collapse
Actually it was an interesting question.
We assume that for any device the erase block size is 128K
But the guy in your post is formatting also a usb flash thumb drive or an SD card.
If the erase block size of his flash drive is 16k, then his file was aligned
details:
8011776 / 131072 = 61.125 File "not aligned" according to him.
8011776 / 16384 = 489. Round number, file aligned.
To get even more speed, one has to use bigger fat32 blocks (up to 64k). But then each file will use blocks of 64Ko on the drive, even if it's real size is 1Ko !
Good compromises are 16 and 32Ko blocs.
... Or you can use GParted.
problem solved.
Terepin said:
... Or you can use GParted.
problem solved.
Click to expand...
Click to collapse
Could be a good idea but:
1/ Some people have reported issues with Gparted when aligning their partitions and even some 16GB SDs were not detected by the Desire after using Gparted. On the opposites, the phone could detect them by doing it manually.
2/ Unless I'm mistaken, Gparted is NOT optimizing the FAT32 formatting process nor the EXT4 one.
is there really a difference between Gparted live and your method ?
when you wipe your SDext with your recovery, does sdext returns to default value ?
t-minik said:
is there really a difference between Gparted live and your method ?
when you wipe your SDext with your recovery, sdext returns to default value ?
Click to expand...
Click to collapse
Yes there is: I don't think that Gparted is using 1024Ko cylinders.
But most of the time, choosing MB alignment is working to align partitions. However, it is not aligning the filesystem. And like I already said, some people reported issues, that's why I published this tutorial.
If Gparted is working for you, keep using it
yep, GP works ..... but I'm really curious
and what happens when wiping SDEXT ?
If you change -s to 128 does that give 64k block size?
sudo mkfs.vfat -F 32 -R 78 -n UserData-s 32 -v /dev/sde1
Well whatever it was transfer Fat32 to PC went from ~10Mbs to ~16Mbs
If you change -s to 128 does that give 64k block size?
sudo mkfs.vfat -F 32 -R 78 -n UserData-s 32 -v /dev/sde1
Well whatever it was transfer Fat32 to PC went from ~10Mbs to ~16Mbs
Click to expand...
Click to collapse
yep, s128 gives 64k blocks.
Did you calculate R78 with the given method?
Happy that you're getting higher speed, but usually this method goal is to increase write speed to the SD
Sent from my A70S using the XDA mobile application powered by Tapatalk
Does 4ext recovery does this aligned partitioning/formatting?
Great thread, Sibere.. Will modify my installation steps to point to this TUT than Sd formatter
Does 4ext recovery does this aligned partitioning/formatting?
Click to expand...
Click to collapse
According to the dev, it should. Didn't try myself though. but like Gparted, it won't optimze the FAT32 formatting part.
Sent from my A70S using the XDA mobile application powered by Tapatalk
LiooO said:
Does 4ext recovery does this aligned partitioning/formatting?
Click to expand...
Click to collapse
sibere said:
According to the dev, it should. Didn't try myself though. but like Gparted, it won't optimze the FAT32 formatting part.
Sent from my A70S using the XDA mobile application powered by Tapatalk
Click to expand...
Click to collapse
So according to your answer i can partiton SD card in 4Ext recovery or GParted and then just do Fat32 formatting according to your guide? Can someone confirm this pls?

[Q] MMC Partition layout using Ubuntu dual boot

I'm currently dual booting Prime & Ubuntu. If I understand correctly, I have to replace the Ubuntu boot loader with CWM to update Prime. Given the different combinations of 16GB/32GB and dual booting/pure Android/pure Ubuntu, I really want to understand what the partitions are before I start playing. I know enough to know I don't want to copy & paste text that starts with 'sudo dd' into my terminal w/o understanding exactly what it's doing.
Can anyone tell me which partitions serves what purpose? I flashed Ubuntu with flash-linux-android.sh (Android is default, bootable into Ubuntu by holding down volume key during boot).
mmcblk0p1 537MB ext4 (looks androidy, fake asus bios bootanimation.zip)
mmcblk0p2 555MB ext3 (only see lost+found)
mmcblk0p3 2.1 MB ext3 (only see lost+found)
mmcblk0p4 555MB ext3 (only see lost+found)
mmcblk0p5 5.2 MB unknown (?)
mmcblk0p6 524 kB unknown (?)
mmcblk0p7 25 GB ext3 (looks like Prime ROM and prob /sdcard based on size)
mmcblk0p8 4.2 GB ext4 (Ubuntu's / partition)
mmcblk0p9 8.4 MB unknown (?)
mmcblk0p10 8.4 MB unknown (?)
scottt732 said:
I'm currently dual booting Prime & Ubuntu. If I understand correctly, I have to replace the Ubuntu boot loader with CWM to update Prime. Given the different combinations of 16GB/32GB and dual booting/pure Android/pure Ubuntu, I really want to understand what the partitions are before I start playing. I know enough to know I don't want to copy & paste text that starts with 'sudo dd' into my terminal w/o understanding exactly what it's doing.
Can anyone tell me which partitions serves what purpose? I flashed Ubuntu with flash-linux-android.sh (Android is default, bootable into Ubuntu by holding down volume key during boot).
mmcblk0p1 537MB ext4 (looks androidy, fake asus bios bootanimation.zip)
mmcblk0p2 555MB ext3 (only see lost+found)
mmcblk0p3 2.1 MB ext3 (only see lost+found)
mmcblk0p4 555MB ext3 (only see lost+found)
mmcblk0p5 5.2 MB unknown (?)
mmcblk0p6 524 kB unknown (?)
mmcblk0p7 25 GB ext3 (looks like Prime ROM and prob /sdcard based on size)
mmcblk0p8 4.2 GB ext4 (Ubuntu's / partition)
mmcblk0p9 8.4 MB unknown (?)
mmcblk0p10 8.4 MB unknown (?)
Click to expand...
Click to collapse
Years later, I have the same question. Serious bump!
Different hardware and specifics, suerly ( gt p5113, cm10 on internal sd, debian on external sd, eventually i want to boot init from external sd ), but same underlying question: what is the layout of the internal memory card partitions? where is rootfs mounted from? output of mount is opaque wrt this.
Ideas? Links?
Do you have a linux computer that you can use to run olife? There is an option to temporarily flash CWM to upgrade android

[Resolved] Huawei P8 Lite - Flashing shrinked the /data partition

Some info:
Code:
Phone: Huawei P8 Lite (ALE-L21) - 1 SIM
So, i've been rooting my device and got it working after probably 12 hours of downloading Firmwares that were corrupted and had slow download speed and flashing up to 12 updates.
I got it working, still not rooted but i can live with that. TWRP is enough.
The problem is, I've downloaded some apps, and some updates were applied from Google Play.
What I've encountered is that the memory is just 2G big!
That's so strange, because I've already had a bigger storage size before flashing.
I'll show you what's the problem:
As i've found out, mmcblk0 is the internal NAND memory.
So, we fetch the partition table which is stored in mmcblk0
Code:
/data # fdisk -l /dev/block/mmcblk0
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 30785536 sectors, 2744M
Logical sector size: 512
Disk identifier (GUID): f9f21fff-a8d4-5f0e-9746-594869aec34e
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 30785535
Number Start (sector) End (sector) Size Code Name
...
40 8118272 30785535 [U][COLOR="Red"]10.8G[/COLOR][/U] 0700 userdata
Ok, so now we have this information,
Partition is 10.8G big
The partition name in the /dev/block is mmcblk0p40 (as mmcblk0 is the main internal disk and "/data" partition is the 40th partition)
Ok, It's least 10G big, so, what's the problem?
We see the partition is 10.8G big. BUT...
If we use "df" we can see the real deal
Code:
/data # df -h
Filesystem Size Used Available Use% Mounted on
/dev/block/mmcblk0p10
11.7M 7.3M 4.1M 64% /mnvm1:0
tmpfs 917.2M 16.0K 917.2M 0% /dev
tmpfs 917.2M 16.0K 917.2M 0% /tmp
/dev/block/mmcblk0p40
[U][COLOR="Red"]2.4G[/COLOR][/U] 2.4G 50.6M 98% /data
My mom's phone, that is the same phone as mine.
i(dot)imgur(dot)com(slash)dZcD1ME(dot)png
Mine instead
i(dot)imgur(dot)com(slash)Z9aybBu(dot)png
Anyone knows what's going on?
Do i need to wipe partition?
Do i need to resize fs?
Thanks beforehand
Solution:
If you have TWRP:
Wipe -> Advanced Wipe -> Select "Data" and press "Repair or Change File System" -> Resize -> Swipe to Resize
If you dont have TWRP:
Use resize2fs command

ZP980 unbrick/study of partition table

Hi to all, I hope to be posting in the right section...otherwise...punish me plz
It's a long story, so i hope that someone has time and want to put some effort to help me understand what i'm doing wrong.
By the way i work in IT field and have some knowledge about linux (let's say 5 on 10) but not so many on how android really works, but i'm confortable with custom recovery and roms, i'm still using an s4 mini (GT-I9195) with mine android 9 custom rom and i'm super happy with it.
Now that presentation are done , here is the matter.
I've found an old zp980 32GB (NOT the "plus one") that some years ago i've rooted it flashed with recovery and custom rom. all was working, but at some point i started playing with fdisk and parted and i messed up things.
Honestly i don't remember what exactly i was doing, but now the status of the phone is:
System not booting
I can enter into Recovery (custom TWRP by dezmen3 v2.4.4.0)
I can connect to adb into recovery
I cannot flash rom trough recovery due the actual system partition (589 MB)
I cannot flash the original rom trough SP flash tool due "SFT enable dram failed (4032)" error
The partitions actually are (what i can see from recovery):
System (589 MB)
Data (54MB)
Boot (6 MB)
Recovery (6MB)
Cache (4 MB)
uboot(0 MB)
nvram (5 MB)
Free space: 27412 MB
Actually, I've tried to reformat the memory using SP flah tool, but i got the same error "SFT enable dram failed (4032)", all drivers are ok, i can see COM port in deivce manager tried win 10 and even win 7.
SP tool ver. used v5 1720 more updated version tells me that the brick i'm tringo to flash in not supported anymore xD
Here a dump of fdisk -ul /dev/block/mmcblk0 from adb shell
Bash:
Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 1024 1022 2147483647+ 5 Extended
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2 26624 47103 10240 83 Linux
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3 47104 67583 10240 83 Linux
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4 93184 105471 6144 83 Linux
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5 134144 1465343 665600 83 Linux
/dev/block/mmcblk0p6 4869120 1022 2145049599+ 83 Linux
if i make a print from parted (pushed with adb) I get:
Error: Can't have a partition outside the disk!
Before i was also having an error saying that there was an extended partition into a logical one (don't ask me how I do it), but i removed it
So, now....what to to to rescue this device?
by the way honestly except for the instinct of "recover things that doesn't work" my main purpose is understand:
What I've messed on the partitions
Why sp flash tool can't reformat/flash the memory (i haven't tried to manually modify it again)
no brave person hat want to help me to brick it in a bad way?
EDIT NEW INFO
i've understtod that the problem was caused by
/dev/block/mmcblk0p1
and
/dev/block/mmcblk0p6
start and end were inverted , them were overflowing.
Now i used fdisk to remove part 1 (the extended), so i've lost also 5 and 6 (system and cache) and i have recreated them using 1 GB for each and using correct sector order.
now SD and try to flash a ....random compatible rom....see u later for info.
Cross your finger for me xD
flash failed it cant mount system and emmc.....
and now
~ # cat /etc/fstab
/cache ext4 rw
/data ext4 rw
/emmc vfat rw
/system ext4 rw
/sdcard vfat rw
/sd-ext auto rw
if someone has a zp980/c2 working can please post me the result of
cat /etc/fstab
from adb shell??
and a fdisk -ul?

Categories

Resources