GT-P5100 in read only - Android General

Hello to all
I am fighting since 2 weeks with a GT-P5100 that seems to be in read only and in boot loop (it shows the CM9 boot animation and then reboot ...). This after a simple update of some apps that seems to have corrupted the sdcard inside ...
I have tried to clear the cache and the user data via the recovery mode, but nothing happen ... (boot in recovery, choose to wipe data/factory reset and wipe cache partition)
To make a long story short:
I am able to boot in recovery and enter as root via adb. Whatever change I do in the filesystem it seems to be done, but when I unmount/mount the fs or reboot I find the same initial situation !
So for example:
a) enter as root, mount /data, delete data content via rm -rf /data/* ... then if I do ls -la /data I see the device empty ... if I unount /data and then mount /data .. all the files are there !!!! :-O
b) enter as root and activate parted ... remove the data partition (for me n. 10) and quit. Run parted again and the partition is still there :-O
c) enter as root and touch a file in any filesystem ... when I ls after I can see the file ... as soon as I reboot, not such file is there
I have tried with ODIN and HEIMDAL (booting in download mode or fastboot mode) also to flash new system.img from stock roms and different recovery.img (currently I have CWM-based recovery v6.0.1.0)... no way. system.img flash does not work, while recovery.img flash say ok, but when I reboot in recovery mode still find always the same partition :-O
It seems somehow that the overall internal disk is in read only and - I do not understand why - when I do changes they are recorded locally, but when I reboot the fs really does not store anything.
BTW, this is my partition table
~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Model: MMC MAG2GA (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 25.2MB 21.0MB ext4 EFS
2 25.2MB 27.3MB 2097kB SBL1
3 27.3MB 29.4MB 2097kB SBL2
4 29.4MB 37.7MB 8389kB PARAM
5 37.7MB 46.1MB 8389kB KERNEL
6 46.1MB 54.5MB 8389kB RECOVERY
7 54.5MB 789MB 734MB ext4 CACHE
8 789MB 810MB 21.0MB MODEM
9 810MB 2278MB 1468MB ext4 FACTORYFS
10 2278MB 15.2GB 12.9GB ext4 DATAFS
11 15.2GB 15.8GB 537MB ext4 HIDDEN
Any idea ?

Related

[Q] Partition layout GT-P3113

Hey out there
Ive decided to start this thread because we need to know
Ive been messing around with the partitions from the p3113 and apon my googling I have yet to find a proper list of the partitions and there corresponding labes.
So far from using dd if=/dev/block/mmcblk0, and have managed to pull all of them (& filling up my 32g sd card..lol..)
So what I will try to do is get all the partitions from all the updates of ther stock sammy fw
I just need to know what they are (system, recovery, zimag, ect..)
Any and all help is appreciated
Sent from my GT-P3113 using Tapatalk HD
sickysticky said:
Hey out there
Ive decided to start this thread because we need to know
Ive been messing around with the partitions from the p3113 and apon my googling I have yet to find a proper list of the partitions and there corresponding labes.
So far from using dd if=/dev/block/mmcblk0, and have managed to pull all of them (& filling up my 32g sd card..lol..)
So what I will try to do is get all the partitions from all the updates of ther stock sammy fw
I just need to know what they are (system, recovery, zimag, ect..)
Any and all help is appreciated
Sent from my GT-P3113 using Tapatalk HD
Click to expand...
Click to collapse
I had a question about my P3113 several weeks ago.
http://forum.xda-developers.com/showthread.php?t=2118291
Code:
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 25.2MB 21.0MB ext4 EFS
2 25.2MB 27.3MB 2097kB SBL1
3 27.3MB 29.4MB 2097kB SBL2
4 29.4MB 37.7MB 8389kB PARAM
5 37.7MB 46.1MB 8389kB KERNEL
6 46.1MB 54.5MB 8389kB RECOVERY
7 54.5MB 789MB 734MB ext4 CACHE
8 789MB 810MB 21.0MB MODEM
9 810MB 2278MB 1468MB ext4 FACTORYFS
10 2278MB 7281MB 5004MB ext4 DATAFS
11 7281MB 7818MB 537MB ext4 HIDDEN
On my next factory reset I plan to delete partition 11 and create a new partition 10 which with the extra 537MB of space.. The partition seems to be mostly empty when I mount it using adb. I have a feeling deleting p11 might break Samsung's stock updating method, meaning you'd have to use custom recovery to install ROMS. Which is no big deal with rooted/custom rom.
Do you think the free space will be automatically allocated or would a repartitioning be in order?
Sent from my GT-P3113 using Tapatalk HD
Oh and by the way thanks for the layout, first time ive read the command u used. :thumbup:
Sent from my GT-P3113 using Tapatalk HD
sickysticky said:
Oh and by the way thanks for the layout, first time ive read the command u used. :thumbup:
Sent from my GT-P3113 using Tapatalk HD
Click to expand...
Click to collapse
Parted is the standard Linux command line partition editor, like FDISK in Dos.
There are a few threads talking about the HIDDEN partition for other samsung devices either the GS2 or GSIII.
From what I've read ext4 partitions cannot be resized after creation by Parted.
Will need to
1) delete Partition 11,
2) then delete Partition 10.
3) Then create a new ext4 partition 10 with the exact same name taking the whole space.
Obviously everything in DATAFS will be deleted.
For that reason I'm waiting for the next time I need to do a factory reset requiring wiping /data.
Would it he possible to resize the existing partitions for smaller base like the system partition (theres some space in there, especially after deodexing) and move it th the data partition (so it can actually hold closento 8g of apps)
Sent from my GT-P3113 using Tapatalk HD
sickysticky said:
Would it he possible to resize the existing partitions for smaller base like the system partition (theres some space in there, especially after deodexing) and move it th the data partition (so it can actually hold closento 8g of apps)
Sent from my GT-P3113 using Tapatalk HD
Click to expand...
Click to collapse
I'd be interested in repartitioning some of mine too, if someone else is successful with it. I installed parted on there but I don't want to mess it up.
I'm gonna try it when I got a day off from work, if I fail, I have the stock 4.0.3 Odin md5 so I can start from scratch again .....
Sent from my LG-VM670 using Tapatalk 2
I just pulled my system file and tried deodexing the all the apps (it took me a day or two)
Anyways the total size of the apks were about 527 mb which is close to the partition hidden partition. So if I debloat and deodex then resize the partition I figured I would need to resize all the datafs partition....
Just cloud thinking of any other partitions that can be squeezed for space
Sent from my GT-P3113 using Tapatalk HD
wjptam said:
I had a question about my P3113 several weeks ago.
http://forum.xda-developers.com/showthread.php?t=2118291
Code:
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 4194kB 25.2MB 21.0MB ext4 EFS
2 25.2MB 27.3MB 2097kB SBL1
3 27.3MB 29.4MB 2097kB SBL2
4 29.4MB 37.7MB 8389kB PARAM
5 37.7MB 46.1MB 8389kB KERNEL
6 46.1MB 54.5MB 8389kB RECOVERY
7 54.5MB 789MB 734MB ext4 CACHE
8 789MB 810MB 21.0MB MODEM
9 810MB 2278MB 1468MB ext4 FACTORYFS
10 2278MB 7281MB 5004MB ext4 DATAFS
11 7281MB 7818MB 537MB ext4 HIDDEN
On my next factory reset I plan to delete partition 11 and create a new partition 10 which with the extra 537MB of space.. The partition seems to be mostly empty when I mount it using adb. I have a feeling deleting p11 might break Samsung's stock updating method, meaning you'd have to use custom recovery to install ROMS. Which is no big deal with rooted/custom rom.
Click to expand...
Click to collapse
Is this partition layout same as P3100?
It might have the same if its the wifi, but im not sure if the 3g modles apply as for the radios
Sent from my GT-P3113 using Tapatalk HD
How did you copy the entire mmcblk0 to your SD card when the file size limit of FAT32 is 4gb?
Partitioning Warning
I have a P3113, which I just received and am still experimenting with.
-- Some experience with my rooted Barnes&Nobel Nook running CM 10.1 / 10.2
My first Nook suffered a 'total bricking' - when I think I completely wiped out all partitions, by mistake.
- My guess - one contained the serial # and other critical, unrecoverable information.
Anyone know if it's something similar in the P3113? -- Or can one always get into ODIN Download mode (Vol down, vol up) and reinstall the stock ROM ?
---------
Comparatively the P3113 and acclaim (Nook Tablet) have 11 gpt partitions, but are labeled differently.
noob question - what do the 11 partitions do?
You can use Recovery & Custom-Roms from P3110 for P3113 - only IR maybe not working. IR is the only differece between P3113 and P3110.
---------- Post added at 09:02 PM ---------- Previous post was at 08:59 PM ----------
If you don´t format EFS and don´t flash files for/from other devices it shouldn´t brick!
I only read about bricked devices if someone flashes wrong files in recovery or using Odin.

[Q] Internal SD Card doesn't mount! [i9023]

Hello. Firstly thanks for a helpful forum you guys have made. It has helped me greatly so far.
My SD card doesn't mount.
How it happened:
I installed ClockworkMod Recovery and CyanogenMod 10 (stable).
Upon reboot, I stupidly encrypted the phone.
After that finished, I flashed Marmite kernel (stable), however this slowed down my phone completely.
To revert back, I re-flashed CyanogenMod.
After this reboot, the SD card could not mount.
Info
Parted /dev/block/mmcblk0
Code:
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB ext4 system
2 538MB 1612MB 1074MB ext4 userdata
3 1612MB 15.9GB 14.3GB media
In /dev/block the file list is this;
Code:
mmcblk0 (SD Card)
mmcblk0boot0
mmcblk0boot1
mmcblk0p1
mmcblk0p2
mmcblk0p3
This looks like there are perhaps 6 partitions on my SDcard.
In CyanogenMod 10, df command shows;
Code:
Filesystem Size Used
/dev 198.2M 48K
/storage 198.2M OK
/mnt/secure 198.2M OK
/mnt/asec 198.2M OK
/mnt/obb 198.2M OK
/mnt/fuse 198.2M OK
/cache 469.5M 91.5M
/efs 6.8M 5.6M
/system 503.9M 370.3M
/data 1007.9M 145M
Im stuck in how to get this sorted. Every time I got to mount in CWM is states 'Error mounting /sdcard!'
Is it just possible to delete all the partitions in /dev/block for the SDCard?
[solved]
alfanhui said:
Hello. Firstly thanks for a helpful forum you guys have made. It has helped me greatly so far.
My SD card doesn't mount.
How it happened:
I installed ClockworkMod Recovery and CyanogenMod 10 (stable).
Upon reboot, I stupidly encrypted the phone.
After that finished, I flashed Marmite kernel (stable), however this slowed down my phone completely.
To revert back, I re-flashed CyanogenMod.
After this reboot, the SD card could not mount.
Info
Parted /dev/block/mmcblk0
Code:
Model: MMC SEM16G (sd/mmc)
Disk /dev/block/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB ext4 system
2 538MB 1612MB 1074MB ext4 userdata
3 1612MB 15.9GB 14.3GB media
In /dev/block the file list is this;
Code:
mmcblk0 (SD Card)
mmcblk0boot0
mmcblk0boot1
mmcblk0p1
mmcblk0p2
mmcblk0p3
This looks like there are perhaps 6 partitions on my SDcard.
In CyanogenMod 10, df command shows;
Code:
Filesystem Size Used
/dev 198.2M 48K
/storage 198.2M OK
/mnt/secure 198.2M OK
/mnt/asec 198.2M OK
/mnt/obb 198.2M OK
/mnt/fuse 198.2M OK
/cache 469.5M 91.5M
/efs 6.8M 5.6M
/system 503.9M 370.3M
/data 1007.9M 145M
Im stuck in how to get this sorted. Every time I got to mount in CWM is states 'Error mounting /sdcard!'
Is it just possible to delete all the partitions in /dev/block for the SDCard?
Click to expand...
Click to collapse
I have fixed this issue. These are the steps I took;
Download latest factory image; (https://developers.google.com/android/nexus/images)
Boot into bootloader (power and volume up when phone is switched off)
Connect to PC, and make sure you have the fastboot downloaded from android SDK
fastboot flash bootloader bootloader-crespo-i9020xxlc2.img
fastboot reboot-bootloader
fastboot flash radio radio-crespo-i9020xxki1.img
fastboot reboot-bootloader
fastboot -w update image-soju-jzo54k.zip
Once the phone has booted into the stock rom, go into Settings; Backup & Reset; Factory Reset
Reboot phone, and the SD card should now be formatted correctly.
(Then reinstall your favorite Custom firmware! )

[ HOW-TO ] - Resizing partitions (Universal Method)

I wrote this How-To several months ago and published in a spanish forum.
Now I've recovered to share here as it may interest someone.
This was originally written in spanish and now, our friendly companion @nachordez
has been kind enough to translate it to english. Thank you very much for your help. :good:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I'll try to explain here how to change the size of our device partitions.
Though the presented data are referred to a 16 GB, a p5110 in this case, they are easy to adapt to a 8 GB one, and/or any other model, with some light corrections.
There can be other ways, but this one has the advantage that depends only on not writing wrong data, and that's easily achieved with a little extra concentration during our work.
Anyway, it's needed to follow very strictly this how-to.
In case of total failure, we should restore the tab through the flashing of a Stock version using the pit file.
ALL the data not saved in the external MicroSD card WILL BE LOST, 'cause we'll delete the /system, /data and /cache partitions.
What is needed:
A computer.
A properly running adb program.
Recovery installed.
External MicroSD card installed and with available space.
Connection cable.
Full Battery.
For 3G (GSM) models, the original “modem.bin” file, obtained from a stock ROM.
The modem.bin file is not really needed as we can get it from our tablet with next command
dd count=40960 bs=512 if=/dev/block/mmcblk0p8 of=/external_sd/modem.bin​
All process is done from computer, except a short intervention at end, done from tablet.
This how-to is planned for a AOSP-like ROM, such as CyanogenMod (for example).
In the case of a Stock ROM, the partition sizes we are adjusting will be too short for it.
Before starting:
We have to check that there is enough free space in the MicroSD card, and we have to do a backup through recovery, choosing EXTERNAL SDcard.
If the internal one is used, IT WILL BE LOST DURING PROCESS.
This step is very important, to recover the ROM without re-install from zero.
So, let me say it again: EVERY USER DATA that has being not COPIED to the EXTERNAL SDcard, WILL BE LOST.
After next steps, ONLY the external MicroSD will be conserved without erasing.
So, we check once again that everything is saved, and copy to the external MicroSD (if our tab is a 3G model) the “modem.bin” file that will be needed afterwards.​
So... Let's start hacking!:
We always wrote in our PC.
We reboot our tab in recovery mode, and connect the cable.
To enter the tab from our computer:
> adb shell
Once entered correctly on the tablet, we like more clear ls command:
> alias ls='ls -an'
Now we access the partition table:
> parted /dev/block/mmcblk0
We'll get something like:
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)​
The command line for parted is (parted), so, every time a line starts so, that what follows this is a command.
We ask for information about current partitions:
(parted) p
Model: MMC MAG2GA (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number... Start... ....End......... Size...........File system...... Name.... Flags
1............4194kB.... 25.2MB.... 21.0MB...... ext4................ EFS
2........... 25.2MB.... 27.3MB....2097kB............................... SBL1
3........... 27.3MB.....29.4MB....2097kB............................... SBL2
4........... 29.4MB.... 37.7MB....8389kB............................... PARAM
5........... 37.7MB.... 46.1MB... 8389kB............................... KERNEL
6........... 46.1MB.... 54.5MB... 8389kB............................... RECOVERY
7............54.5MB...789.0MB.. 734.0MB....... ext4................CACHE
8......... 789.0MB.. 810.0MB.... 21.0MB.............................. MODEM
9......... 810.0MB.., 2278MB... 1468MB....... ext4............... FACTORYFS
10........ 2278MB.... 15.2GB.... 12.9GB........ext4............... DATAFS
11......... 15.2GB..... 15.8GB.... 537MB....... ext4............... HIDDEN​
Comments:
Analizing the current partitions we can see this tablet is a 16 GB one:
/cache (CACHE) has 734 MB assigned
/system (FACTORYFS) has 1468 MB assigned
/data (DATAFS) has 12,9 GB assigned
There's also a funny 537 MB partition called HIDDEN: that's where the Samsung video, musical theme and demo pictures are stored.
If I don't mistake, I think I extracted them time ago, and they were just about 14 MB. In our case, we'll opt for destroying that!
In this how-to we'll assign:
/cache (CACHE) 400 MB
/system (FACTORYFS) 600 MB
/data (DATAFS) the sum of: its current size + 394 MB from CACHE + 868 MB from FACTORYFS + 536 MB from HIDDEN.
So, we'll grow our /DATAFS space in 1798 MB, which will mean more than 14 GB free space.
I use in this example 600 MB for /system was what I did in my tab.
In real world, 240 MB /cache and 500 MB /system are more than enough.
As we'll see later, all this numbers are just aproximations, not completely exact, and probably you're thinking: “My maths do not agree with this numbers”. Mine do not, also, as a fact.​
Let's see all that more slowly:
21+2+2+8+8+8+21+1 (for the 'hidden' partitions) give us 71 MB.
If we add 71 + 400 +600 we'll get 1071 MB.
If we have 16 GB and we use 1 GB, more than 15 GB should rest.
On one hand: 1 GB are 1048 MB. So, 16 GB should be 16768 MB, but we have just 15709.
That has a easy explanation: The hard disk makers started to measure 1 GB as 1000 MB (kind of a commercial trick). So, just beginning with that, 768 MB have disappeared in thin air.
On the other hand, we have 34 initial sectors to sustain the partition table, alternative sectors for errors recovering, rounding of numbers in sectors to partitions assignations, etc.
We have 11 partitions just now:.............................................. And they should get like that:
01 00021 MB...........................................................................01 00021 MB
02 00002 MB...........................................................................02 00002 MB
03 00002 MB...........................................................................03 00002 MB
04 00008 MB...........................................................................04 00008 MB
05 00008 MB...........................................................................05 00008 MB
06 00008 MB...........................................................................06 00008 MB
07 00734 MB...........................................................................07 00400 MB *
08 00021 MB...........................................................................08 00021 MB
09 01468 MB...........................................................................09 00600 MB *
10 12900 MB...........................................................................10 14638 MB *
11 00537 MB...........................................................................11 00537 MB
.....15709 MB................................................................................15709 MB​
The difference can seem small compared to the original partitioning, nevertheless will allow us to get all our usual apps installed and, even so, preserve a free space higher than we had previously, even before than start to install anything. That's saying: even more than with a pure CM just installed and not even configured.
Obviously, if we translate all that to a 8 GB model, the proportional gain is much higher.
Also, consider that an AOSP rom like CM is not bigger than 460 MB in /system, and that cache will need just 60 MB for dalvik and what we can download from google-play at a certain time. 170 MB should be enough, unless we want to download an app bigger than 100 MB. The bigger ones I've saw are around 90-105 MB.
In this moment, we'll have to decide if we want to follow on or not.
Till now, I was just fun, but nothing has being 'broken'.
Disclaimer: If you continue reading next post, and you do what's there exposed, it will be ONLY under YOUR RESPONSIBILITY. You've being warned...
CopyRight Tuxafgmur - Dhollmen 2013-2014. You can copy and distribute this post only if you mentions Author and references this XDA theread.
:
You have chosen to continue (you're a risky guy...)
We change the info into number of sectors (512 byts each one)
(parted) u s
(parted) p
Model: MMC MAG2GA (sd/mmc)
Disk /dev/block/mmcblk0: 30777344s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Num... Start................ End............ Size........ Fs....... Name
1............ 8192s.......... 49151s....... 40960s... ext4....EFS
2.......... 49152s.......... 53247s......... 4096s............... SBL1
3.......... 53248s.......... 57343s......... 4096s............... SBL2
4.......... 57344s.......... 73727s....... 16384s............... PARAM
5.......... 73728s.......... 90111s....... 16384s............... KERNEL
6.......... 90112s........ 106495s....... 16384s............... RECOVERY
7........ 106496s...... 1540095s... 1433600s.... ext4... CACHE
8...... 1540096s...... 1581055s....... 40960s................MODEM
9...... 1581056s...... 4448255s... 2867200s.... ext4... FACTORYFS
10.... 4448256s.... 29728733s..25280478s.... ext4... DATAFS
11...29728734s.... 30777309s... 1048576s.... ext4... HIDDEN​
(From here onwards, I'll omit the heading, so that it's always the same)
We can see easily the ratio between MB and sectors: 4096 sectors equal 2 MB, so 1 MB are 2048 sectors.
Now, we'll delete the last partition, 'cause starting with it will make work easier at end.
(parted) rm 11​Now, we create it again, but with different data, specifying the sector where it begins (30775263) and sector where it finishes (30777310)
(parted) mkpart 11 30775263 30777310
(parted) p
Num...... Start................ End............ Size..... Fs....... Name
1............ 8192s.......... 49151s....... 40960s... ext4......EFS
2.......... 49152s.......... 53247s......... 4096s............... SBL1
3.......... 53248s.......... 57343s......... 4096s............... SBL2
4.......... 57344s.......... 73727s....... 16384s............... PARAM
5.......... 73728s.......... 90111s....... 16384s............... KERNEL
6.......... 90112s........ 106495s....... 16384s............... RECOVERY
7........ 106496s...... 1540095s... 1433600s.... ext4...CACHE
8...... 1540096s...... 1581055s....... 40960s................MODEM
9...... 1581056s...... 4448255s... 2867200s.... ext4... FACTORYFS
10.... 4448256s.... 29728733s..25280478s.... ext4... DATAFS
11... 30775263s... 30777310s......... 2048s​
So, we have a 1 MB partition that previously was a 537 MB one
Yes, you're right. I've changed last sector from 30777309 into 30777310. I haven't added one new sector to disk, it was yet there, but unassigned.
This is so 'cause I want the total to be an even number of sectors, and also this partition sectors number has to be even.
Previously, this partition had a name. So, let's be polite with it:
(parted) name 11 HIDDEN
(parted) p
Num...... Start................ End............ Size..... Fs....... Name
1............ 8192s.......... 49151s....... 40960s... ext4.....EFS
2.......... 49152s.......... 53247s......... 4096s............... SBL1
3.......... 53248s.......... 57343s......... 4096s............... SBL2
4.......... 57344s.......... 73727s....... 16384s............... PARAM
5.......... 73728s.......... 90111s....... 16384s............... KERNEL
6.......... 90112s........ 106495s....... 16384s............... RECOVERY
7........ 106496s...... 1540095s... 1433600s.... ext4....CACHE
8...... 1540096s...... 1581055s....... 40960s................MODEM
9...... 1581056s...... 4448255s... 2867200s.... ext4... FACTORYFS
10.... 4448256s.... 29728733s..25280478s.... ext4... DATAFS
11... 30775263s... 30777310s......... 2048s............... HIDDEN​
Done. Now, we can forget it, and not even format it.
So that it is the last partition, and will not be used, all this work was really unnecessary, but, preventing the case that any process could count partitions, we keep home tidy.
OK. By now we have:
Deleted partition
Created partition
Named partition
If we have a previously calculated chart, we'll just have to do next steps for each partition and we don't need even to look at it, just to check at end if the obtained result was the one expected.
Anyway, in this How-To we'll do things one by one.
We shrink the CACHE partition
We calculate: 400 x 2048 = 819200 (400 MB x 2048 sectors = 819200 sectors)
106496 + 819200 = 925696 -1 = 925695
Our new partition starts in sector 106496 and finishes in sector 925695
(parted) rm 7
(parted) mkpart 7 106496 925695
(parted) name 7 CACHE
(parted) p
Num...... Start................ End............ Size..... Fs....... Name
1............ 8192s.......... 49151s....... 40960s... ext4.....EFS
2.......... 49152s.......... 53247s......... 4096s............... SBL1
3.......... 53248s.......... 57343s......... 4096s............... SBL2
4.......... 57344s.......... 73727s....... 16384s............... PARAM
5.......... 73728s.......... 90111s....... 16384s............... KERNEL
6.......... 90112s........ 106495s....... 16384s............... RECOVERY
7........ 106496s........ 925695s..... 819200s.... ext4... CACHE
8...... 1540096s...... 1581055s....... 40960s................MODEM
9...... 1581056s...... 4448255s... 2867200s.... ext4... FACTORYFS
10.... 4448256s.... 29728733s..25280478s.... ext4... DATAFS
11... 30775263s... 30777310s......... 2048s............... HIDDEN
​We just move the MODEM partition : 925696 + 40960 -1 = 966655
(parted) rm 8
(parted) mkpart 8 925696 966655
(parted) name 8 MODEM​
Now, let's go for the FACTORYFS one
(parted) rm 9
(parted) mkpart 9 966656 2195455
(parted) name 9 FACTORYFS
(parted) p
Num...... Start................ End............ Size..... Fs....... Name
1............ 8192s.......... 49151s....... 40960s... ext4.....EFS
2.......... 49152s.......... 53247s......... 4096s............... SBL1
3.......... 53248s.......... 57343s......... 4096s............... SBL2
4.......... 57344s.......... 73727s....... 16384s............... PARAM
5.......... 73728s.......... 90111s....... 16384s............... KERNEL
6.......... 90112s........ 106495s....... 16384s............... RECOVERY
7........ 106496s........ 925695s..... 819200s.... ext4... CACHE
8........ 925696s...... . 966655s....... 40960s................MODEM
9........ 966656s.......2195455s....1228800s................FACTORYFS
10.... 4448256s.... 29728733s..25280478s.....ext4....DATAFS
11.. 30775263s.... 30777310s..........2048s................HIDDEN
​
There only rest DATAFS.
For it, no calculations are needed: it starts in the sector following FACTORYFS and ends in the previous to HIDDEN.
(parted) rm 10
(parted) mkpart 10 2195456 30775262
(parted) name 10 DATAFS
(parted) p
Num...... Start................ End............ Size..... Fs....... Name
1............ 8192s.......... 49151s....... 40960s... ext4.....EFS
2.......... 49152s.......... 53247s......... 4096s............... SBL1
3.......... 53248s.......... 57343s......... 4096s............... SBL2
4.......... 57344s.......... 73727s....... 16384s............... PARAM
5.......... 73728s.......... 90111s....... 16384s............... KERNEL
6.......... 90112s........ 106495s....... 16384s............... RECOVERY
7........ 106496s........ 925695s..... 819200s.... ext4... CACHE
8........ 925696s...... . 966655s....... 40960s................MODEM
9........ 966656s...... 2195455s....1228800s................FACTORYFS
10.... 2195456s.... 30775262s..28579807s................DATAFS
11.. 30775263s.... 30777310s......... 2048s............... HIDDEN
​
So, that's what we got. It seemed difficult, but it's done!
Finishing:
We exit parted, for the end of feast using quit command
(parted) q​
In this moment, we've returned to recovery.
Now, and only if our tab is a 3G/GSM one, we have to recover the modem:
dd count=40960 bs=512 if=/external_sd/modem.bin of=/dev/block/mmcblk0p8​
Format:
Remember that we are in recovery. So, let's go to tablet and we select:
- mounts and storage
Search for and click on:
- format system
- format cache
- format /data and /data/media (/sdcard)
Just and only this options.
To check, now click on:
- mount /system
- mount /cache
- mount /data
If everything is OK, each one of the 3 options will change into unmount​
If you are an expert user, surely you know how to format from shell, without using recovery options.
WE HAVE FINISHED. HURRAY!
Now, we have two options to reinitialize:
We install our favourite Rom, boot, configure, restore data, etc.
Or we restore the backup we did with the recovery in the external MicroSD card and we remain as if nothing had happened (but with lot more free space).
NOTE: I've wrote this how-to using CWM recovery, On others recovery, mount options can be slightly different
Disclaimer: If you have read this post, and did what is told in it, it will be ONLY under YOUR RESPONSIBILITY. You've being warned...
CopyRight Tuxafgmur - Dhollmen 2013-2014. You can copy and distribute this post only if you mentions Author and references this XDA theread.
In case there are util for someone, I insert below partitions data from a p3110 tablet.
This data was attached by the user Saitoh00 from spanish HTCmania forum.
This user resized partitions following this How-To.
Model: MMC M8G2FB (sd/mmc)
Disk /dev/block/mmcblk0: 7818MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1.........4194kB..........25.2MB............21.0MB.......ext4.......EFS
2........ 25.2MB..........27.3MB...........2097kB......................SBL1
3.........27.3MB..........29.4MB...........2097kB..................... SBL2
4.........29.4MB..........37.7MB...........8389kB......................PARAM
5.........37.7MB..........46.1MB...........8389kB......................KERNEL
6.........46.1MB..........54.5MB...........8389kB......................RECOVERY
7.........54.5MB...........474MB............419MB.......ext4........CACHE
8..........474MB...........495MB...........21.0MB......................MODEM
9..........495MB...........914MB............419MB.......ext4........FACTORYFS
10........914MB.........7817MB..........6903MB.......ext4........DATAFS
11......7817MB.........7818MB...........1049kB......................HIDDEN
​
Model: MMC M8G2FB (sd/mmc)
Disk /dev/block/mmcblk0: 15269888s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1............8192s..........49151s.........40960s.........ext4......EFS
2..........49152s..........53247s...........4096s......................SBL1
3..........53248s..........57343s...........4096s......................SBL2
4..........57344s..........73727s.........16384s......................PARAM
5..........73728s..........90111s.........16384s......................KERNEL
6..........90112s........106495s.........16384s......................RECOVERY
7........106496s........925695s.......819200s.........ext4......CACHE
8........925696s........966655s.........40960s......................MODEM
9........966656s........785855s.......819200s.........ext4......FACTORYFS
10....1785856s....15267806s...13481951s.........ext4......DATAFS
11..15267807s....15269854s...........2048s......................HIDDE
​

[Q][HELP!] Corrupted cache partition after flashing 5.1 Lollipop

Hi guys,
After flashing LP update 5.1 I`m in trouble with my 32GB Nexus 5
I got the error msg " E: can`t mount / cache " ( the same for system e.t.c). (before I did this I was on Custom ROM with Exposed framework installed.)
So I tryed to re-flash LP factory img (LMY47D) using fastboot command (via ADB SDK platform-tools) manually one by one according guides I found on xda.
I did it many times but the result was still the same - appears just green "android man" with rotating cube (10-15 min) and than it reboots itself and starts over again.
So I tryed to flash older factory image the same way (KTU48P) and I succeed to boot my phone but instead of 32 GB (normally available ~26GB) of my storage space there is only 12GB available now.
I thing there iscorupted partition but don`t know what to do next :crying: - how to restore it or format it ???
When I try to do that via Recovery I cant mount those partitions so I can`t format them...
When I did it via SDK - fastboot erase user data it takes veeery long time with no result
Could you pls help me how to format whole storage space ( all partitions ) and return back to stock rom with full 32GB space available ???
Thanks
Have you tried this guide http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
There is a "32 GB phone now shows 16GB?" section.
shoeseat said:
Have you tried this guide http://forum.xda-developers.com/google-nexus-5/general/tutorial-how-to-flash-factory-image-t2513701
There is a "32 GB phone now shows 16GB?" section.
Click to expand...
Click to collapse
Yes, that was one of the first think I tried.
--> I can`t clear cache & factory reset via stock recovery. Error msg -- "E: Unable to mount `/cache` "
--> Unfortunatelly fastboot erase userdata stucked ( it takes aleady 2 hours it started to erase the data and format the partition ) - do you thing it can freeze or it just can`t mount the data so it`s in loop ?
Any othe idea please , please ?
Have u tried to unmount cache partition from recovery?
shoeseat said:
Have u tried to unmount cache partition from recovery?
Click to expand...
Click to collapse
I can`t unmount it because it`s not mounted ...
When I tried to Wipe cache partition these errors appears :
PHP:
E: Can`t mount /cache/recovery/log
E: Can`t open /cache/recovery/log
E: Can`t mount /cache/recovery/last_log
E: Can`t open /cache/recovery/last_log
E: Can`t mount /cache/recovery/last_install
E: Can`t open /cache/recovery/last_install
E: Failed closing /dev/block/platform/msm_sdcc.1/by-name/misc
(I/O error)
Did you try
fastboot erase cache
fastboot flash cache cache.img
fastboot erase system
fastboot flash system system.img
joegestes said:
Did you try
fastboot erase cache
fastboot flash cache cache.img
fastboot erase system
fastboot flash system system.img
Click to expand...
Click to collapse
Yes
fastboot erase/flash system was OK, but fastboot erase/flash cache got stucked
So after 2.5 hrs witnout any results I unplug the cord and start over again -- the same results
Maybe this will help
http://forum.xda-developers.com/google-nexus-5/general/howto-repairing-corrupted-data-partition-t2577447
---------- Post added at 09:04 AM ---------- Previous post was at 08:47 AM ----------
basavel said:
Hi guys,
So I tryed to flash older factory image the same way (KTU48P) and I succeed to boot my phone but instead of 32 GB (normally available ~26GB) of my storage space there is only 12GB available now.
Click to expand...
Click to collapse
Did you Wipe data/factory data reset after successful flash?
That will probably fix your 32=16 problem.
I tryed this tutorial :
http://forum.xda-developers.com/showthread.php?t=1284196
Thanks God it`s not "fried".
So I tryed this
Code:
mke2fs /dev/block/mmcblk0p27
(than reboot recovery)
... but still the same result
Than I tried to start over again from stock img flashing so :
Code:
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot flash bootloader
fastboot reboot-bootloader
fastboot flash radio
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
fastboot erase userdata
fastboot flash userdata userdata.img
... it got stucked on erasing user data so I had to unplug the cord, restart bootloader
When I re-start the device appears "swireling" dodts (the boot animation) but no step forward, still booting....
When I tried to boot in recovery - dead android with red "!" appeared
Any other ideas what to do esle ?
Should I flash CWM or TWRP rec. instead ??
How this can be fixed ??
PLEASE !!!!:crying::crying::crying:
basavel said:
... it got stucked on erasing user data so I had to unplug the cord, restart bootloader
When I re-start the device appears "swireling" dodts (the boot animation) but no step forward, still booting....
When I tried to boot in recovery - dead android with red "!" appeared
Any other ideas what to do esle ?
Should I flash CWM or TWRP rec. instead ??
How this can be fixed ??
PLEASE !!!!:crying::crying::crying:
Click to expand...
Click to collapse
If you are getting an android sign with a red triangle it is normal for stock recovery.
You must tap volume up/down and the power button all together to get to the recovery menu.
Don't hold them in. Just tap all together at the same time and let go. It takes a couple tries but it works.
You'll then get a menu that will let you wipe data/factory reset.
use volume up/down to scroll to "wipe data/factory reset" then power button to select.
looks something like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
try it and reply back the result.
joegestes said:
If you are getting an android sign with a red triangle it is normal for stock recovery.
You must tap volume up/down and the power button all together to get to the recovery menu.
Don't hold them in. Just tap all together at the same time and let go. It takes a couple tries but it works.
You'll then get a menu that will let you wipe data/factory reset.
use volume up/down to scroll to "wipe data/factory reset" then power button to select.
looks something like this
try it and reply back the result.
Click to expand...
Click to collapse
Thanks man, I manage to boot under recovery mode.
After wipe data/factory reset system shows msg:
Code:
-- Wiping data...
Formating /data ...
E: failed to mount /cache (invalid argument)
Formating /cache ...
E: failed to mount /cache (invalid argument)
E: Can`t mount /cache/recovery/log
E: Can`t open /cache/recovery/log
E: failed to mount /cache (invalid argument)
E: Can`t mount /cache/recovery/last_log
E: Can`t open /cache/recovery/last_log
E: failed to mount /cache (invalid argument)
E: Can`t mount /cache/recovery/last_install
E: Can`t open /cache/recovery/last_install
Data wipe complete
So I tried to wipe cache as well and it shows up this:
Code:
-- Wiping cache...
Formating /data ...
E: failed to mount /cache (invalid argument)
Formating /cache ...
E: failed to mount /cache (invalid argument)
E: Can`t mount /cache/recovery/log
E: Can`t open /cache/recovery/log
E: failed to mount /cache (invalid argument)
E: Can`t mount /cache/recovery/last_log
E: Can`t open /cache/recovery/last_log
E: failed to mount /cache (invalid argument)
E: Can`t mount /cache/recovery/last_install
E: Can`t open /cache/recovery/last_install
E: Failed closing /dev/block/platform/msm_sdcc.1/by-name/mis
(I/O error)
E: failed to mount /cache (invalid argument)
I have no clue how to fix this can you help me pls ??
I would go to fatsboot and try to erase partitions and re flash again. see what happens.
If your data partition fails again we can try adb shell to repair your data partition.
I tried but again got stucked on erasing userdata...
I start research again and search for solution around partitions and I found this ( exactly my problem)
http://androidforums.com/threads/unable-to-mount-cache-while-doing-factory-reset.901188/
and solution for this was posted here on xda
http://forum.xda-developers.com/google-nexus-5/help/lost-cache-partition-fixed-t2949752#post58720690
this link helps me to get back to 32GB storage space (in fact ~ 26GB but doesn`t matter)
[The problem was exactlly the same missing EXT2 partition on cache partition (27)]
But error msg Can`t mount `/cache` still appears So I was not able to flash stock img LP 5.1 but I manage to flash 4.4.4 KTU84Q
It boots us and works like charm, but... ... still can`t mount/erase cache so it`s not fully solved yet but at least I can switch on/off the system now.
Can U pls help me with this mounting / partition problem ???
can it be fixed by stock OTA from KTU84Q to 5.0.1 and than the same to 5.1 ?
I had like 2 years ago similar problem with htc sensation but i fixed it by formating ir with ext2 and the reformated catch with ext4. Try to find something inside sensation forume
basavel said:
I manage to flash 4.4.4 KTU84Q
It boots us and works like charm, but... ... still can`t mount/erase cache so it`s not fully solved yet but at least I can switch on/off the system now.
Click to expand...
Click to collapse
Ok. So you are now successfully running 4.4.4 KTU84Q.
What happens now if you try flashing the stock cache.img of 4.4.4 KTU84Q:
fastboot erase cache
fastboot flash cache cache.img
Also, you could try and see what happens if you flash LP 5.01 lrx22c instead of 5.1 and do factory reset immediately after flash.
Even I manage to boot under KTU84Q the partition is still "lost" - means internal storage is ~26GB thats OK; but the error msg E: Can`t mount /cache bla bla bla still stays.
Actually I have these partitions :
Code:
C:\android-sdk-windows\platform-tools>adb shell parted -s /dev/block/mmcblk0 pri
nt
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Model: MMC SEM32G (sd/mmc)
Disk /dev/block/mmcblk0: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.7MB 1049kB sbl1
3 68.7MB 69.2MB 524kB rpm
4 69.2MB 69.7MB 524kB tz
5 69.7MB 70.3MB 524kB sdi
6 70.3MB 70.8MB 524kB aboot
7 70.8MB 72.9MB 2097kB pad
8 72.9MB 73.9MB 1049kB sbl1b
9 73.9MB 74.4MB 524kB tzb
10 74.4MB 75.0MB 524kB rpmb
11 75.0MB 75.5MB 524kB abootb
12 75.5MB 78.6MB 3146kB modemst1
13 78.6MB 81.8MB 3146kB modemst2
14 81.8MB 82.3MB 524kB metadata
15 82.3MB 99.1MB 16.8MB misc
16 99.1MB 116MB 16.8MB ext4 persist
17 116MB 119MB 3146kB imgdata
18 119MB 142MB 23.1MB laf
19 142MB 165MB 23.1MB boot
20 165MB 188MB 23.1MB recovery
21 188MB 191MB 3146kB fsg
22 191MB 192MB 524kB ext2 fsc
23 192MB 192MB 524kB ssd
24 192MB 193MB 524kB DDR
25 193MB 1267MB 1074MB ext4 system
26 1267MB 1298MB 31.5MB crypto
27 1298MB 2032MB 734MB cache
28 2032MB 31.3GB 29.2GB ext4 userdata
29 31.3GB 31.3GB 5632B grow
So after I run this
1.1) adb shell
1.2) mkfs.ext2 /dev/block/mmcblk0p27
1.3) exit
It formats the cache partition (p27) to ext2 but after install of stock KTU84Q it`s back - UNFORMATED with no possibility to mount
What am I doing wrong ? :crying:
basavel said:
Even I manage to boot under KTU84Q the partition is still "lost" - means internal storage is ~26GB thats OK; but the error msg E: Can`t mount /cache bla bla bla still stays.
Actually I have these partitions :
Code:
C:\android-sdk-windows\platform-tools>adb shell parted -s /dev/block/mmcblk0 pri
nt
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Model: MMC SEM32G (sd/mmc)
Disk /dev/block/mmcblk0: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.7MB 1049kB sbl1
3 68.7MB 69.2MB 524kB rpm
4 69.2MB 69.7MB 524kB tz
5 69.7MB 70.3MB 524kB sdi
6 70.3MB 70.8MB 524kB aboot
7 70.8MB 72.9MB 2097kB pad
8 72.9MB 73.9MB 1049kB sbl1b
9 73.9MB 74.4MB 524kB tzb
10 74.4MB 75.0MB 524kB rpmb
11 75.0MB 75.5MB 524kB abootb
12 75.5MB 78.6MB 3146kB modemst1
13 78.6MB 81.8MB 3146kB modemst2
14 81.8MB 82.3MB 524kB metadata
15 82.3MB 99.1MB 16.8MB misc
16 99.1MB 116MB 16.8MB ext4 persist
17 116MB 119MB 3146kB imgdata
18 119MB 142MB 23.1MB laf
19 142MB 165MB 23.1MB boot
20 165MB 188MB 23.1MB recovery
21 188MB 191MB 3146kB fsg
22 191MB 192MB 524kB ext2 fsc
23 192MB 192MB 524kB ssd
24 192MB 193MB 524kB DDR
25 193MB 1267MB 1074MB ext4 system
26 1267MB 1298MB 31.5MB crypto
27 1298MB 2032MB 734MB cache
28 2032MB 31.3GB 29.2GB ext4 userdata
29 31.3GB 31.3GB 5632B grow
So after I run this
1.1) adb shell
1.2) mkfs.ext2 /dev/block/mmcblk0p27
1.3) exit
It formats the cache partition (p27) to ext2 but after install of stock KTU84Q it`s back - UNFORMATED with no possibility to mount
What am I doing wrong ? :crying:
Click to expand...
Click to collapse
My guess is it needs to be formatted to ext4 not ext2.
KTU84Q probably can not recognize ext2.
Heres what mine looks like.
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.7MB 1049kB sbl1
3 68.7MB 69.2MB 524kB rpm
4 69.2MB 69.7MB 524kB tz
5 69.7MB 70.3MB 524kB sdi
6 70.3MB 70.8MB 524kB aboot
7 70.8MB 72.9MB 2097kB pad
8 72.9MB 73.9MB 1049kB sbl1b
9 73.9MB 74.4MB 524kB tzb
10 74.4MB 75.0MB 524kB rpmb
11 75.0MB 75.5MB 524kB abootb
12 75.5MB 78.6MB 3146kB modemst1
13 78.6MB 81.8MB 3146kB modemst2
14 81.8MB 82.3MB 524kB metadata
15 82.3MB 99.1MB 16.8MB misc
16 99.1MB 116MB 16.8MB ext4 persist
17 116MB 119MB 3146kB imgdata
18 119MB 142MB 23.1MB laf
19 142MB 165MB 23.1MB boot
20 165MB 188MB 23.1MB recovery
21 188MB 191MB 3146kB fsg
22 191MB 192MB 524kB fsc
23 192MB 192MB 524kB ssd
24 192MB 193MB 524kB DDR
25 193MB 1267MB 1074MB ext4 system
26 1267MB 1298MB 31.5MB crypto
27 1298MB 2032MB 734MB ext4 cache
28 2032MB 31.3GB 29.2GB ext4 userdata
29 31.3GB 31.3GB 5632B grow
Again it looks like cache should be formatted ext4
Compare line 22 and line 27.
My line22 fsc is not formatted. Yours is formatted ext2
My line 27 cache is formatted ext4. Yours is not.
That is the problem.
Here is the list of partition locations
[/code]
179 0 30535680 mmcblk0
179 1 65536 mmcblk0p1
179 2 1024 mmcblk0p2
179 3 512 mmcblk0p3
179 4 512 mmcblk0p4
179 5 512 mmcblk0p5
179 6 512 mmcblk0p6
179 7 2048 mmcblk0p7
179 8 1024 mmcblk0p8
179 9 512 mmcblk0p9
179 10 512 mmcblk0p10
179 11 512 mmcblk0p11
179 12 3072 mmcblk0p12
179 13 3072 mmcblk0p13
179 14 512 mmcblk0p14
179 15 16384 mmcblk0p15
179 16 16384 mmcblk0p16
179 17 3072 mmcblk0p17
179 18 22528 mmcblk0p18
179 19 22528 mmcblk0p19
179 20 22528 mmcblk0p20
179 21 3072 mmcblk0p21
179 22 512 mmcblk0p22
179 23 512 mmcblk0p23
179 24 512 mmcblk0p24
179 25 1048576 mmcblk0p25
179 26 30720 mmcblk0p26
179 27 716800 mmcblk0p27
179 28 28551146 mmcblk0p28
179 29 5 mmcblk0p29
179 32 4096 mmcblk0rpmb
~ #
[/code]
Finally I got to the stage where the ext2 partition stays ( do not disappear) after next flash.
How I did it - format the partition to ext2 than manually flash KTU84Q
Code:
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot flash bootloader "name of bootloader"
fastboot reboot-bootloader
fastboot flash radio "name of radio"
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
Than let the system update itself to 5.0.1 LRX22C
Now the erroe msg is gone (E: Can`t mount /cache) but agree those messed up partitions must be fixed.
The question is how ?
- should I install TWRP rec. and let it fix it when the cache partition is mountable now ?
- or should it fix it via ADB SHELL ? (and how ? mkfs.ext4 /dev/block/mmcblk0p27 ? )
- and how to erase line 22 in order to have in unformated ?
--- > or should I try to flash custom ROM over this ? - I don`t think so
Could you pls help with this ?
!!!THANKS!!!
basavel said:
Finally I got to the stage where the ext2 partition stays ( do not disappear) after next flash.
How I did it - format the partition to ext2 than manually flash KTU84Q
Code:
fastboot erase boot
fastboot erase cache
fastboot erase recovery
fastboot erase system
fastboot flash bootloader "name of bootloader"
fastboot reboot-bootloader
fastboot flash radio "name of radio"
fastboot reboot-bootloader
fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash cache cache.img
Than let the system update itself to 5.0.1 LRX22C
Now the erroe msg is gone (E: Can`t mount /cache) but agree those messed up partitions must be fixed.
The question is how ?
- should I install TWRP rec. and let it fix it when the cache partition is mountable now ?
- or should it fix it via ADB SHELL ? (and how ? mkfs.ext4 /dev/block/mmcblk0p27 ? )
- and how to erase line 22 in order to have in unformated ?
--- > or should I try to flash custom ROM over this ? - I don`t think so
Could you pls help with this ?
!!!THANKS!!!
Click to expand...
Click to collapse
If it was me, the first thing I would do is flash TWRP. Second, make a full backup using TWRP backup function, then save/transfer a copy of that backup to my PC.
That way, moving forward id' have an easy way to restore the device back to it's presently functioning Lollypop state.
After that I might try the ADB shell command from TWRP you mentioned mkfs.ext4 /dev/block/mmcblk0p27 and see if that manages to re formats cache to ext4.
I've never tried this, and don't have much experience with parted, so I cant say if it will work. So proceed at your own risk.
As far as fsc( I think it means file save clean)partition goes. I honestly don't know but Ill try to find out.
Meanwhile, hopefully someone else with some mad partition skillz will chime in.:laugh:
TWRP coruupted all I did before - it tryed to repair broken partitions with f2fs but they are gone now
So I am 2 steps back
Code:
C:\android-sdk-windows\platform-tools>adb shell parted -s /dev/block/mmcblk0 pri
nt
Model: MMC SEM32G (sd/mmc)
Disk /dev/block/mmcblk0: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 524kB 67.6MB 67.1MB fat16 modem
2 67.6MB 68.7MB 1049kB sbl1
3 68.7MB 69.2MB 524kB rpm
4 69.2MB 69.7MB 524kB tz
5 69.7MB 70.3MB 524kB sdi
6 70.3MB 70.8MB 524kB aboot
7 70.8MB 72.9MB 2097kB pad
8 72.9MB 73.9MB 1049kB sbl1b
9 73.9MB 74.4MB 524kB tzb
10 74.4MB 75.0MB 524kB rpmb
11 75.0MB 75.5MB 524kB abootb
12 75.5MB 78.6MB 3146kB modemst1
13 78.6MB 81.8MB 3146kB modemst2
14 81.8MB 82.3MB 524kB metadata
15 82.3MB 99.1MB 16.8MB misc
16 99.1MB 116MB 16.8MB ext4 persist
17 116MB 119MB 3146kB imgdata
18 119MB 142MB 23.1MB laf
19 142MB 165MB 23.1MB boot
20 165MB 188MB 23.1MB recovery
21 188MB 191MB 3146kB fsg
22 191MB 192MB 524kB ext2 fsc
23 192MB 192MB 524kB ssd
24 192MB 193MB 524kB DDR
25 193MB 1267MB 1074MB ext4 system
26 1267MB 1298MB 31.5MB crypto
27 1298MB 2032MB 734MB cache
28 2032MB 31.3GB 29.2GB ext4 userdata
29 31.3GB 31.3GB 5632B grow
I can create only ext2 partition thanks to - mkfs.ext2 /dev/block/mmcblk0p27
The same code string with ext4 i.o ext2 is not working
MSG:
~ # mkfs.ext4 /dev/block/mmcblk0p27
mkfs.ext4 /dev/block/mmcblk0p27
/sbin/sh: mkfs.ext4: not found

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