I started playing with my Galaxy S2 I9100 recently after upgrading to a Galaxy S4 I9505 and trying custom ROMs. As the system partition wasn't big enough to install a ROM and a full Gapps package, I thought I'd try to change the partition table and increase the size of the FACTORYFS and DATAFS partitions at the same time reducing the size of the UMS partition.
My first attempt was to use parted through an ADB bridge with the phone in CWM recovery and doing so managed to get the phone working with the exception of the camera which immediately threw up the error 'Unfortunately camera has stopped working.' The Gallery app also doesn't work saying there is no storage present. When using the print function of parted, there was a msftres flag indicated for the FAT32 formatted UMS partition.
I have since used PITmagic to set FACTORYFS to 1GB and DATAFS to 4GB but interestingly when using the print function in parted, DATAFS and UMS had nothing listed under filesystem. I was able to get the DATAFS partition to ext4 using the wipe data function in CWM recovery but am unable to get the UMS partition formatted to FAT32. I have tried flashing busybox to use the mkdosfs or mkfs.vfat commands but these are unable to format a partition of the size that my UMS currently is set at.
Does anyone know of a way to reformat the internal UMS partition back to FAT32?
I eventually got this sorted but it seemed like a fairly complicated process. Firstly I used PITmagic to prepare a PIT file which I flashed using Odin. All the necessary files and instructions por PIT Magic can be found in the links below:
http://forum.xda-developers.com/gal...es/mod-partition-internal-memory-app-t2538947
http://forum.xda-developers.com/showthread.php?t=1916936
By booting into recovery (either CWM or TWRP will work for this) I was able to format some of the partitions but not all. I then used parted which is included in both CWM or TWRP to print out the partition table. Where a partition was not what it should be I removed it then recreated it using the guide I found for a kindle fire in the link below:
http://forum.xda-developers.com/showthread.php?t=1388996
Note that ext4 partitions cant be created in parted so I created them as ext2 partitions and upgraded them as in the guide. The big problem with the FAT32 partition for UMS is that it gets the msftres flag set owing to a bug in parted. However by flashing the same PIT file as before through odin this can be removed.
Now my camera works as the UMS partition mounts properly.
Related
So I flashed Simply Galaxy 3.0 JVB 2.3.3, and somehow it went wrong. Out of frustration i can't remember the exact result. Anyway, I odined back to stock but it gave me the black screen of death after the boot logo. So i odined to eugene's froyo that not bricks. It boots, but now I have 0.00B of application storage.
I think i tried every possible solution but still can't get the app storage back.
edit: forgot to mention that i can't flash roms through cwm as many errors pop up, here's what happens:
installing update... formatting system... formatting cache... formatting datadata... formatting data...
e:can't mount /dev/block/mmcblk0p2 (file exists)
error mounting /data/!
skipping format... deleting files...
e:can't mount /dev/block/mmcblk0p2 (file exists)
deleting files... copying files...
e:can't mount /dev/block/mmcblk0p2 (file exists)
e:can't mount DATA:
e:failure at line 15: copy_dir PACKAGE:data DATA:
installation aborted.
*I found this thread for the fascinate, is it safe to flash on the vibrant?
Help would be greatly appreciated!
do not flash anything that isn't fixed for use on the vibrant.
ODIN jfd to your phone and see if that fixed your phone.
I think i did that, I used the .tar/.pit provided by AIO Vibrant Toolbox
EDIT - flashed JFD to be sure - I get the boot logo for a few secs > black screen > boot logo again and so on...
Update - I managed to get 250MB app storage using parted(now i am able to flash through cwm again), it looks like this:
Number Start End Size Type File system Flags
1 512B 15.7GB 15.7GB primary fat32 lba
2 15.8GB 16.0GB 247MB primary fat32 lba
Now I need to expand partition 2 since 250MB isn't enough especially when i only have like 60MB left with no apps at all.
So I guess i need to unmount /system and resize it to approx 13GB, but CWM won't allow me to unmount(error unmounting system:!). Here's where I need your help
Cwm wil not allow you to unmount a running partition it's being used by the phone..I'll need to follow the guide precisely..at this step you hv to delete the partitions completely and then flash with Odin with the partitions option checked...and Odin wil take care of the partition size mismatch..the actual problem here is sumhow the phone makes a partition record tht doesn't exist...so the error in cwm abt the error mounting...hope this helps..
german103 said:
update - i managed to get 250mb app storage using parted(now i am able to flash through cwm again), it looks like this:
Number start end size type file system flags
1 512b 15.7gb 15.7gb primary fat32 lba
2 15.8gb 16.0gb 247mb primary fat32 lba
now i need to expand partition 2 since 250mb isn't enough especially when i only have like 60mb left with no apps at all.
So i guess i need to unmount /system and resize it to approx 13gb, but cwm won't allow me to unmount(error unmounting system:!). Here's where i need your help
Click to expand...
Click to collapse
how did you do that ???
Despite the fact that I had a lot of headache figuring this out, I don't remember for 100% what exactly I did.
What is your current partitions layout in parted?
replay
thanks dude it's work
Just installed link2sd earlier (formatted partition as ext3). Wanted to flash a different rom. Trying to backup my phone, and clockworkmod tells me it can't mount sd-ext. Anyone know a reason and/or work around?
I think CWM works only with ext4 partition AFAIK. So, you can re-partition your sd card to a ext4 partition using CWM, or you can format the ext partition only to ext4 using a computer.
YouArePoop said:
Just installed link2sd earlier (formatted partition as ext3). Wanted to flash a different rom. Trying to backup my phone, and clockworkmod tells me it can't mount sd-ext. Anyone know a reason and/or work around?
Click to expand...
Click to collapse
which version of CWM have you got?
3.0.2.4, which I've used for a while now, always tries to back up my 6GB ext2 debian partition unless I remember to change cards first. no way I leave room in the vfat partition to back up that much data.
I'll put it up on 4shared if you want it.
mihir287 said:
I think CWM works only with ext4 partition AFAIK. So, you can re-partition your sd card to a ext4 partition using CWM, or you can format the ext partition only to ext4 using a computer.
Click to expand...
Click to collapse
Guess when I get home I'll copy the contents to computer, reformat, and copy back. Hopefully link2sd will notice the formatting has changed and reset itself
Sent from my LG-VM670 using XDA App
Doesn't work with extra either. Version 3.2.0.1 I believe it was.
Guess it doesn't really matter, can just use titanium since its all app stuff on there anyways...
Sent from my LG-VM670 using XDA App
i use CWM to back up my 512MB ext2 partition for my data2ext all the time (with the rest of the backup) and it seems to have no problem, and just to check i just mounted the partition in mounts and storage and it mounts fine. I know some recoveries ive used in the past on other phones would have problems with partitions that were not in 64-128-256-512-1024 MB, etc. format because of block size issue errors that i would get (when mounting or trying to set block size to 4096). I also found that when partitoning/formatting to ext2/3/4 some programs do not properly write the drive formatting and certain systems/recoveries/apps could not properly read them on the android. the best most consistent (android friendly) formats that i have gotten to date were in ubuntu (or any other) linux using "gparted". It seemed to always be the best and usually better than the format done by the phone recovery. Hope this helps. Sorry to drone on and on.
Partitioned originally with gparted. Have since resized to be 2048, and set its label to 'sd-ext'. Now instead of getting an error saying sd-ext might not be supported on my device, it just gives me a generic 'error mounting sd-ext'
I've had ext partition mounting problems before, I'm not sure if the cause is something to do with vold or what, but
after unmounting a sd card to exchange it with another one, it changes the device partitions in /dev/block like
/dev/block/mmcblk1p2
for the sd-ext partition instead of the normal
/dev/block/mmcblk0p2
you can see if this has happened by
Code:
ls /dev/block
in adb shell.
to mount it manually, if the numbering is off,
Code:
mount /dev/block/mmcblk1p2 /sd-ext
I've only had this happen with android running, but it might work in recovery too
Switched over to using data2ext. Mounts the 2nd partition as the /data partition instead of /sd-ext. Can manually mount 2nd as /sd-ext from within rom, but it doesn't carry over to recovery.
A possible solution... Create a symbolic link pointing /sd-ext to the 2nd partition? But then again, since /data now points to 2nd partition, is recovery picking up on that unknowingly and backing up the 2nd's contents when it thinks its backing up the normal /data?
I suppose I should investigate.
Edit: Yep it does backup the 2nd partition, thankfully. Just tried to install a theme made in UOT Kitchen, it borked some stuff, and the restore worked.
It's a bit long since I had done some research and tries on it ...
Background:
I found that the /data partition (thus /dev/block/mmcblk0p10) is set to 2GB originally, but I want it enlarged to 5GB for some personal reason.
Tries:
First, I did some research on PIT file supplied when flashing ROMs via Odin, the "u1_02_20110310_emmc_EXT4.pit" contains the following entries:
DATAFS 02 0B 01 154000 400000 data.img
UMS 02 0C 02 554000 1704000
where the start sector position and partition length in sectors of corresponding partition are recorded, so I made a custom PIT with the following entries:
DATAFS 02 0B 01 154000 A00000 data.img
UMS 02 0C 02 B54000 1104000
there is only difference on the size of /data partition and the start position of the /sdcard partition, thus, a trade between those two partitions, it won't affect other partitions.
I can use the custom PIT file flashing ROMs via Odin without errors, but the /data partition remains 2GB after I check it in an adb terminal, so, I think the PIT file is just a mapping info file for Odin and other flashing to retrieve the correct position where kernel or modem or boot should be flash to, Odin did not really partition the internal mmc storage according to the PIT file.
So further, I tried to use "parted" to modify the internal mmc's partition table (it's of GPT format, so "fdisk" would not work), I'm managed to delete the old DATAFS and UMS partition and create new ones in the recovery mode, then I use /system/bin/make_ext4fs to create ext4 filesystem on new DATAFS, it is really 5GB now, and I think I succeed!
When I reboot into normal mode, no error reported, and I'm glad to see the /data partition is indeed enlarged to 5GB. So, I decided to flash a new ROM via Odin.
I use the custom PIT file with exactly the correct mapping according to the modified partition table in Odin when I flashed a new ROM, the flash progress is successful, but after the device rebooted, it issues an error message on "could not mount /data partition" and refused to complete the ROM install progress.
Then I enter the recovery mode again and do wipe to the /data partition, after that, I found the /data partition goes back to 2GB ...
Now, can anyone help me on this? or is there a more stable method to enlarge the /data partition on i9100?
Thanks,
ecore
ecore said:
It's a bit long since I had done some research and tries on it ...
Background:
I found that the /data partition (thus /dev/block/mmcblk0p10) is set to 2GB originally, but I want it enlarged to 5GB for some personal reason.
Tries:
First, I did some research on PIT file supplied when flashing ROMs via Odin, the "u1_02_20110310_emmc_EXT4.pit" contains the following entries:
DATAFS 02 0B 01 154000 400000 data.img
UMS 02 0C 02 554000 1704000
where the start sector position and partition length in sectors of corresponding partition are recorded, so I made a custom PIT with the following entries:
DATAFS 02 0B 01 154000 A00000 data.img
UMS 02 0C 02 B54000 1104000
there is only difference on the size of /data partition and the start position of the /sdcard partition, thus, a trade between those two partitions, it won't affect other partitions.
I can use the custom PIT file flashing ROMs via Odin without errors, but the /data partition remains 2GB after I check it in an adb terminal, so, I think the PIT file is just a mapping info file for Odin and other flashing to retrieve the correct position where kernel or modem or boot should be flash to, Odin did not really partition the internal mmc storage according to the PIT file.
So further, I tried to use "parted" to modify the internal mmc's partition table (it's of GPT format, so "fdisk" would not work), I'm managed to delete the old DATAFS and UMS partition and create new ones in the recovery mode, then I use /system/bin/make_ext4fs to create ext4 filesystem on new DATAFS, it is really 5GB now, and I think I succeed!
When I reboot into normal mode, no error reported, and I'm glad to see the /data partition is indeed enlarged to 5GB. So, I decided to flash a new ROM via Odin.
I use the custom PIT file with exactly the correct mapping according to the modified partition table in Odin when I flashed a new ROM, the flash progress is successful, but after the device rebooted, it issues an error message on "could not mount /data partition" and refused to complete the ROM install progress.
Then I enter the recovery mode again and do wipe to the /data partition, after that, I found the /data partition goes back to 2GB ...
Now, can anyone help me on this? or is there a more stable method to enlarge the /data partition on i9100?
Thanks,
ecore
Click to expand...
Click to collapse
Are you sure Odin uses the pit file during flash? It seems to be able to flash without pit files, so I'm not sure it really uses it...
Did you try to flash a custom or a stock ROM? Maybe some ROMs are built in order to only accept 2GB /data partition (or there are some inherent size limit due to the filesystem?).
Have you tried flashing via Heimdall (after creating the /data you want and using your custom pit file)? Heimdall can also download the pit file from your device so maybe you can get a "proper" custom pit file after your various re-partitioning...
Link to Heimdall:
http://forum.xda-developers.com/showthread.php?t=755265
Note that we know for a fact that Heimdall indeed uses the pit file (even when not repartioning). So if your custom pit file does not correspond to the partition of the your device after your modification of /data, I think you'll have some kind of message, hopefully with some detailed information.
I have a galaxy s2 gt-i9100. My original efs partition was ext4 filesystem, but due to corruption, I reformatted it using SII_Repair. Unfortunately, the tool formatted it to ext2 instead of the original ext4. I have tried to use parted to reformat it, but it only support up to ext2. Are there other ways? How does clockworkmod reformat the other partition to ext4? what is the name of the tool? I can use terminal to reformat efs if only I know the utility name that clockworkmod uses to reformat other system partitions.
Try to flash older 3/4 file firmware with proper PIT file. It will fix partitions and wipe phone. After that format your internal memory card, otherwise it could be still broken
mar10o said:
Try to flash older 3/4 file firmware with proper PIT file. It will fix partitions and wipe phone. After that format your internal memory card, otherwise it could be still broken
Click to expand...
Click to collapse
I have tried flashing PIT which usually reformat everything, but it didn't work for efs partition for some reasons. However, I got it reformatted to ext4 by flashing an efs.img I got from somewhere.
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