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
Hello All,
I need help from experimented people because while trying to reformat my YP-GB70 - 5.0 korean version (internal memory went wreck after some bad manipulations in testing new roms)
Problem: partition14 is no more available, same for 15 and above and have to be reformatted through adb/fdisk.
Reformatting: OK but!
This is a normal operation I've done it 3 times already ,but the issue I am facing now is because Fdisk does not want to open the main /dev/block/mmcblk0 where the partitions are located and visible (excepted n°14 to 17 that are no more linux formated).
I am root access and I am able to access and reformat /dev/block/mmcblk1 that is my external SD card, so problem seems to be somewhere around fdisk instruction to open main memory .
Here attached the overall listing for verification.
Your suggestions are welcome, i need this issue solved for me, sure, but for any other people that can face the same behavior.
Anybody knows the trick? or any advice to help?
The most efficient way to do this is getting a full dd dump of another device. From adb in a working device:
Code:
mount /dev/block/mmcblk0p1 /sdcard
dd if=/dev/block/mmcblk0 of=/sdcard/image.img
Then dumping on your device:
Code:
mount /dev/block/mmcblk0p1 /sdcard
dd if=/sdcard/image.img of=/dev/block/mmcblk0
This command usually takes about 45 minutes or more to complete (you have 32gb internal storage).
Another way you can recover your device, but it's more risky:
DON'T DO IT UNLESS YOU HAVE THE OUTPUT OF A WORKING DEVICE (http://forum.xda-developers.com/showpost.php?p=21915742&postcount=3 )
Using fdisk /dev/block/mmcblk0
Recreate the partition table (if i'm not mistaken the command is o).
Then, you need to create p1 (primary), which is extended and uses all the device storage. The rest of partitions are logical (inside p1).
Make sure you replicate exactly the partition table. DON'T WRITE THE PARTITION TABLE UNLESS YOU'RE DONE. DON'T REBOOT THE DEVICE UNLESS YOU'RE DONE. If you do it --> hardbrick.
Many thanks for your prompt and precise answer.
I am going to ask for a GB70 dump with low confidence in getting it...
I will investigate the "hard" repartitionning way you suggest, I am not sure fdisk will allow me to modify anything because the main memory access is permanently denied.
(/dev/block/mmcblk0)
I already have my device partition table from previous issue I had in march.
regards
memory Issue under control
rumirand said:
The most efficient way to do this is getting a full dd dump of another device. From adb in a working device:
Code:
mount /dev/block/mmcblk0p1 /sdcard
dd if=/dev/block/mmcblk0 of=/sdcard/image.img
Then dumping on your device:
Code:
mount /dev/block/mmcblk0p1 /sdcard
dd if=/sdcard/image.img of=/dev/block/mmcblk0
This command usually takes about 45 minutes or more to complete (you have 32gb internal storage).
Another way you can recover your device, but it's more risky:
DON'T DO IT UNLESS YOU HAVE THE OUTPUT OF A WORKING DEVICE (http://forum.xda-developers.com/showpost.php?p=21915742&postcount=3 )
Using fdisk /dev/block/mmcblk0
Recreate the partition table (if i'm not mistaken the command is o).
Then, you need to create p1 (primary), which is extended and uses all the device storage. The rest of partitions are logical (inside p1).
Make sure you replicate exactly the partition table. DON'T WRITE THE PARTITION TABLE UNLESS YOU'RE DONE. DON'T REBOOT THE DEVICE UNLESS YOU'RE DONE. If you do it --> hardbrick.
Click to expand...
Click to collapse
PROBLEM SOLVED:
I have applied your guide lines and I finally succeeded turning back the device to life.
This was only possible because of the work you and Adamoutler's team have done.
Was mandatory your RJ14 kernel (V5.02.7)(- 2.8 also working ) and the "Unbrickeable resurrector" stuff .
Rebuilt the device 17 logical memory partitions and back to life again.
(see attachement)
Details for interested people under request.
More than many thanks again for your great help.
Tired of running out of space in the /data partition? I found a way to get rid of the UMS partition and enlarge the DATAFS partition on our beloved Galaxy S II.
WARNING: with this guide you can brick your phone and it's not intended for novice users, you have to know what you're doing.
Theory about partitions
The internal MMC (/dev/block/mmcblk0) contains partition information in two areas, one standard, the GPT partition table and in another area Samsung-specific, the PIT. With odin (or heimdall) you can simply upload a new PIT and flag for repartition, this way both the PIT and the GPT get updated. I think the PIT needs to be updated in order to use Odin for flashing stock firmware.
Creating a modified PIT file
You can get your current PIT file by downloading it with heimdall or getting a stock one for your specific model from the internet. I attached the stock one for my phone, I9100 16GB (original_I9100_16GB.pit).
Code:
$ heimdall download-pit --output mypit.pit
After you got the original PIT you can edit it with PIT Magic, a Windows .NET tool to edit PIT information, you can also run it with mono on linux/osx.
Open the file in PIT Magic and go to PIT Entry list #11, the DATAFS partition. We need to focus on two fields, the "Block size", that's the block where the partition starts and "Block count", the size of the partition in blocks. The next partition must start on the block given by the sum of the previous partition block size and block count.
In order to enlarge the DATAFS partition, just raise the value in the block count field, keeping in mind the size of a block is 512 bytes. The next partition (UMS, the internal sd) must start as stated above, so just write the correct value in the block size field of the #12 partition. I suggest to keep the UMS partition if you're running a stock or stock-derived rom, just make it very small (in the attached PIT I made it about 50MB, small-ums_I9100_16GB.pit), but if you're running an AOSP flavor of android you can get rid of the UMS partition and the HIDDEN one (/preload). Keep in mind the sum of block size and block count of the #12 UMS partition must be exactly the number in the block size of the #13 HIDDEN partition (or the DATAFS must end on the last block of the HIDDEN partition if you're getting rid of the last two partitions).
After you saved the new pit file, just upload to your phone with heimdall or odin.
Code:
$ heimdall flash --repartition --pit newpit.pit
You can have a look at the new partition table in recovery, with an adb shell, using parted. You can see the same numbers as the ones in the PIT file using the command "unit s" then "print".
Code:
$ adb shell
~ # 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) unit s
unit s
(parted) print
print
Model: MMC V3U00M (sd/mmc)
Disk /dev/block/mmcblk0: 30777344s
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 51711s 2560s SBL1
3 53248s 55807s 2560s SBL2
4 57344s 73727s 16384s PARAM
5 73728s 90111s 16384s KERNEL
6 90112s 106495s 16384s RECOVERY
7 106496s 311295s 204800s ext4 CACHE
8 311296s 344063s 32768s MODEM
9 344064s 1392639s 1048576s ext4 FACTORYFS
10 1392640s 29720475s 28327836s ext4 DATAFS
11 29720476s 29720575s 100s fat32 UMS
12 29720576s 30769151s 1048576s ext4 HIDDEN
Change android storage layout
Now we have to tell android to ignore the internal partition and use the external sd card as the main one. If you just want to swap the two, just google around, there are plenty of guides about this.
We have to edit two files, /system/etc/vold.fstab and storage_list.xml inside /system/framework/framework-res.apk. I have attached an update.zip for samsung stock roms (no-internal-ums-samsung.zip) and for cyanogenmod 10.1 (no-internal-ums-cm10.1.zip), if you use one of these, you can skip the following details, the updater will take care of the modifications.
In vold.fstab we just have to remove references to the internal sdcard and change the mount point for the external one to /storage/sdcard0.
The other file, storage_list.xml is trickyer, as it's inside an apk. This file contains a list of all the storage the hardware can handle. We need to remove the internal sd card from this file. In order to do this you need apktool. These are the command I used to extract the apk.
Code:
$ java -jar /Android/apktool1.5.2/apktool.jar if framework-res.apk
$ java -jar /Android/apktool1.5.2/apktool.jar if twframework-res.apk
$ java -jar /Android/apktool1.5.2/apktool.jar d framework-res.apk
Now you have to edit framework-res/res/xml/storage_list.xml as follow for a samsung stock derived rom:
Code:
In order to repack the apk:
Code:
$ java -jar /Android/apktool1.5.2/apktool.jar b framework-res/ framework-res.apk
For the samsung stock you have to copy the signature from the original apk (the META-INF directory and AndroidManifest.xml).
Code:
$ zip -r ../framework-res.apk META-INF
$ zip -r ../framework-res.apk AndroidManifest.xml
CyanogenMod 10.2
In order to use this method with cm 10.2, repartition (removing both ums and preload or by resizing them) and add this in /system/build.prop (in order to make the external sd the main storage).
Code:
persist.sys.vold.switchexternal=1
ro.vold.switchablepair=/storage/sdcard0,/storage/sdcard1
No need for update zip, just repartition and edit build.prop
Files
original_I9100_16GB.pit
small-ums_I9100_16GB.pit
no-internal-ums-samsung.zip
no-internal-ums-cm10.1.zip
Credits
I would have never succeeded in making this guide if I hadn't found these useful forum posts on xda.
[GUIDE] External2Internal Ultimate
PIT file method to revive your phone from a MMC_CAP_ERASE brick
Sd card swapping on cm 10.2
Can this be used on other Sammy modles? Mrs got a galaxy ace and it can only get about 5 apps on with latest stock rom
Sent from my GT-I9100 using xda premium
+1 for this post this is what have been waiting to see i'm tired of the low internal storage i need to swap it to external 32gig mmc kudos to the poster hopes it works with stock 4.1.2 jellybean
garymeg said:
Can this be used on other Sammy modles? Mrs got a galaxy ace and it can only get about 5 apps on with latest stock rom
Sent from my GT-I9100 using xda premium
Click to expand...
Click to collapse
I think it could be done. Just take a look at the partition table or PIT file...
mathy007 said:
+1 for this post this is what have been waiting to see i'm tired of the low internal storage i need to swap it to external 32gig mmc kudos to the poster hopes it works with stock 4.1.2 jellybean
Click to expand...
Click to collapse
I made the update.zip for neatrom, I think it should also work on stock. But with no-internal-ums-samsung.zip it will get rid of internal storage and make external storage as primary.
One more thing must i factory reset the phone because I've already installed apps and games in it,or i just flash the update.zip
mathy007 said:
One more thing must i factory reset the phone because I've already installed apps and games in it,or i just flash the update.zip
Click to expand...
Click to collapse
I suggest to
1) backup your internal sd, as you'll loose everything
2) backup your pit with heimdall
3) backup with cwm or twrp
4) upload new pit with repartition flag
5) format data and restore backup
6) flash no-internal-ums-samsung.zip
If anything goes wrong you can restore your original pit, but beware that if you make changes to crucial partitions you can brick your phone, if you use my pit file, i suggest tolook if oother partitions remain unchanged.
mtpi said:
I suggest to
1) backup your internal sd, as you'll loose everything
2) backup your pit with heimdall
3) backup with cwm or twrp
4) upload new pit with repartition flag
5) format data and restore backup
6) flash no-internal-ums-samsung.zip
If anything goes wrong you can restore your original pit, but beware that if you make changes to crucial partitions you can brick your phone, if you use my pit file, i suggest tolook if oother partitions remain unchanged.
Click to expand...
Click to collapse
thanks I'll keep that in mind
Would this approach be useful for the galaxy s4? With the Google experience rom available there is tonnes of wasted space in the system partition.
Sent from my GT-I9505 using Tapatalk 2
I think it should also work on the s4 as it hase the pit partition and gpt i think, you have to experiment a bit... But if you flash the google experience rom with odin the size mismatch of the partition and the image file can be a problem, you have to find a solution for this, like extracting the files and make an update.zip.
Sent from my GT-I9100 using xda app-developers app
mtpi said:
I think it should also work on the s4 as it hase the pit partition and gpt i think, you have to experiment a bit... But if you flash the google experience rom with odin the size mismatch of the partition and the image file can be a problem, you have to find a solution for this, like extracting the files and make an update.zip.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Yeah everyone is using a CWM install zip but many people would love to reclaim that wasted space. Google ROM is 500Mb sitting in a 2.5GB system partition!!
Sent from my GT-I9505 using Tapatalk 2
So I've made people over on the S4 forum aware of your awesome information. Hopefully some devs more experienced than me will adapt the concept.
Question: the S2 has a separate FAT partition for the SDcard. The S3 and 4 have a single partition for data/sdcard with the SD card being an emulated folder of dynamic size.
Ideally we will need to shrink the system partition and maybe preload and reallocate this to data.
Is this possible with your method?
Sent from my GT-I9505 using Tapatalk 2
I believe your idea should work, you just have to make a valid pit file with pit magic, repartition, format the affected partitions and reflash.
Sent from my GT-I9100 using xda app-developers app
mtpi said:
I believe your idea should work, you just have to make a valid pit file with pit magic, repartition, format the affected partitions and reflash.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Thanks for the reply. It seems the PIT on the S4 is locked down preventing custom pit files from working...
However one user has successfully used a utility called parted to resize the existing partitions via adb I believe
Sent from my GT-I9505 using Tapatalk 2
rlorange said:
Thanks for the reply. It seems the PIT on the S4 is locked down preventing custom pit files from working...
However one user has successfully used a utility called parted to resize the existing partitions via adb I believe
Sent from my GT-I9505 using Tapatalk 2
Click to expand...
Click to collapse
It's fine if you dont need odin. Take a look here to get you started: http://forum.xda-developers.com/showthread.php?t=1887864
Make sure to have a backup of your partitions before modifying (inside parted: unit s; print)
Can galaxy chat b5330, and s2g i9100g do this too? What about xperia devices? Awesome way to make those storages like old skool gingerbread style.
Sent from My Awesome Paradox ST21i
zzztidurvirus said:
Can galaxy chat b5330, and s2g i9100g do this too? What about xperia devices? Awesome way to make those storages like old skool gingerbread style.
Sent from My Awesome Paradox ST21i
Click to expand...
Click to collapse
Don't know about xperia devices, but among samsung I think all of them are capable of being repartitioned.
Okay, now as for i9100g, do I need to upload the .pit file for you to mod? Or do I need to find the block size and location? Cant wait to see bigger /data size.
Sent from My Awesome Paradox ST21i
can u this mod for galaxy s2 i9100g??
Thing is, I dont know how to locate that internal sd address. Also how to edit that .pit file? Will simple .txt editor enough? I have 32gb now running as internal sd thanks to new jellybean easier vold.fstab edit.
Sent from My Awesome Paradox ST21i
Hi!
Partitioned my 32GB sdcard, and put CM10.2 on it, but when I check it I have only about 400mb of space or something like that. I had the same amount of space on a 4GB sdcard I used before. Why am I not able to use up the rest of the GB's?! Can someone tell me how to fix it, I don't know if I'm partitioning wrong or doing something wrong, but I want to be able to have lots of extra space for music, apps, etc. Please help! Thanks!!!
I believe you used a low level utility like dd or similar to flash an image onto a partition.
You need to run fsck on that partition, then run resize2fs to expand the ext2/3/4 partition.
Let's say your partition is /dev/block/mmcblk1p1
You would do (in a terminal):
adb reboot recovery
adb shell
# umount /dev/block/mmcblk1p1
# e2fsck /dev/block/mmcblk1p1
# resize2fs /dev/block/mmcblk1p1
After that, your partition will get expanded to whatever size you made it.
It takes a while so be patient. The larger the partition, the longer it will take.
Zenile said:
Hi!
Partitioned my 32GB sdcard, and put CM10.2 on it, but when I check it I have only about 400mb of space or something like that. I had the same amount of space on a 4GB sdcard I used before. Why am I not able to use up the rest of the GB's?! Can someone tell me how to fix it, I don't know if I'm partitioning wrong or doing something wrong, but I want to be able to have lots of extra space for music, apps, etc. Please help! Thanks!!!
Click to expand...
Click to collapse
if you got a prebaked image of a bootable cm card from somewhere, then it usually has 4 partitions on it that were set to the sizes the author of the card specified.
/boot
/system
/data
/sdcard
You would need to put the card in a PC, and use a disk partitioning utility to resize the partitions
some of the images include additional flash files that you install to expand the card's partitions for you. (succulent's), but
you have to do it as you install for the first time.
I prefer to build the card empty first, and load the boot files and zips manually.
linux tools like gparted, Parted Magic , booting from a live USB or CD work pretty well.
Windows based ones like Easus Partition master, or Paragon, not so good.
Mini Tool partition wizard (windows/free) sometimes works
this looks to be a decent write up
http://www.mobileread.com/forums/showthread.php?t=202660
mikeataol said:
...
I prefer to build the card empty first, and load the boot files and zips manually.
linux tools like gparted, Parted Magic , booting from a live USB or CD work pretty well.
Windows based ones like Easus Partition master, or Paragon, not so good.
Mini Tool partition wizard (windows/free) sometimes works
this looks to be a decent write up
http://www.mobileread.com/forums/showthread.php?t=202660
Click to expand...
Click to collapse
The write-up is also posted on XDA at http://forum.xda-developers.com/showthread.php?t=2098419. It was written back in the days of CM10.1, so to use it for CM10.2 or CM11:
Obtain the boot files: MLO, u-boot.bin, and flashing_boot.img -- as well as the files boot.img and recovery.img, from the /boot partition of the pre-made SD CM image. Make sure that MLO is the first file to copy to the freshly made /boot partition.
Substitute in the appropriate ROM and Gapps zip files corresponding to the particular CM build of interest.
Hello all,
I'm hoping someone can help me with this. Long story short, I've bricked my Prime. I was running TWRP recovery (AndroWook, so 2.6.something?) and KatKiss v30 when things went south... but unbricking is for another day.
I'm more interested in getting some data that didn't make it into my last backup off the /sdcard. I don't have access to the device itself (adb or fastboot, haven't tried APX yet), but I did managed to take an image of /dev/block/mmcblk0p8 via the dd command.
The problem is I can't mount it as a loop device in Linux. The problem that started all this was that KatKiss wouldn't boot... the output of "fdisk -l /dev/block/mmcblk0" suggested that its partition table was corrupted or gone.
Various suggestions on XDA and elsewhere (xmount, kpartx, etc.) haven't allowed me to mount this backup image... I'm wondering if the missing partition table isn't the issue.
[email protected]:~/prime_backup_microsdcard_32G_20151227$ sudo mount -t auto -o
loop tf201-mmcblk0p8.img /mnt
NTFS signature is missing.
Failed to mount '/dev/loop3': Invalid argument
The device '/dev/loop3' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
So my thought is to try the following:
1. Create a virtual HD of >27.GB (the size of the backup image).
2. Create a partition of the exact size/dimensions as the backup I have, and ensure I'm able to mount it.
3. Restore the backup to this partition using dd.
4. Profit.
Does this make sense, and if so, what format is /dev/block/mmcblk0p8? Based on the steps to install KatKiss I would have guessed f2fs, but the mount error above makes me think otherwise.
Thanks in advance for your help.
ACP