Related
You NO larger need GParted or a Linux/Unix distro in order to make your own data.img! You NO longer need a command prompt either. However, you can use the command prompt still as an alternative option since this supports the commands in Windows. But this is an application.
With this Application you can create a brand NEW data.img or Add/Subtract space from an existing data.img. Example: You can take a 256MB data.img & make it convert to a 1GB data.img or take a 1GB data.img & make it 256MB data.img. Maximum space possible shown is based on the HDD or SD space left. So you could create a 150GB data.img if the drive had 150GB free space. It is completely safe & wont do anything to damage an existing data.img.
You will need WinRar or 7zip to extract the .RAR for this download.
WARNING!: DO NOT MAKE YOUR DATA.IMG Larger than 2GB because Android will not recognize the SD Card after. I will test this later.
1024 = 1GB
2048 = 2GB
4096 = 4GB
8192 = 8GB
Just double the #!
Screenshot:
{
"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"
}
How to make a NEW(Fresh) Data.img:
NOTE: In order to start NEW you must have wiped your SD card or removed every file or folder such as: .REC, Cache, Android, OLD Data.img & any apps that took a folder on the card.
1. Open TopoResize
2. Select "Create New"
3. Select Save destination such as the SD Card & name it data
4. Select "Create File"
5. Select ext2 or ext3
6. Hit Ok & it will autorun.
DONE!
How to add space to an existing Data.img:
1. Open TopoResize
2. Select "Find File"
3. Locate file & select it
4. Use the size slider to select the extra space
5. Select "Resize File"
6. It will autorun
DONE!
How to subtract space to an existing Data.img:
Same instructions apply to add space just use the slider to go down & select resize file.
How to read the system.ext2 & transfer it over to the desktop:
1. Open Ext2explore
2. Select File & Open Image
3. Goto the system.ext2 & select it
4. Select Save
5. Select a destination to save it to. (Save it to a folder is preferred, so make one.)
INSTRUCTIONS TO CREATE A NEW or MODIFY EXISTING DATA.IMG via Command Prompt:
1. Open Command Prompt
2. Goto the directory of Data.img Maker
3. Enter dd if=/dev/zero bs=1M count=XXX >> data.img (XXX = Amount of Space for NEW such as 256MB is 256. Also if file is 256 already add 256 to make modified data.img = 512MB)
Alternative method! Instead of dd. You can use the following (only for new data.img):
Enter tfile data.img XXX (XXX = Size of MB ex. 1024 = 1GB. For new data.img only)
Alternative method! Instead of dd. You can use the following (only for modify data.img):
Enter Resize2fs -p data.img XXXXXX (1024*512MB=524288, always use 1024 times amount of space like 1024MB=1GB, so 1024*1024MB=1048576 for modify data.img only, can skip dd & just run this command for modify!)
4. Enter Mke2fs data.img (This will actually partition it so it doesnt come out as a bad read, MODIFY DATA IMAGE DOES NOT APPLY TO THIS STEP!)
5. Enter Resize2fs -f data.img (This will resize it for MODIFY ONLY! NOTE: can skip if you did the alternative method for existing!)
6. Enter E2fsck -f data.img (This checks to make everything is correct)
DONE!
Creating NEW Example:
d:\Software\DATA.IMG Maker\DATA.IMG Maker>dd if=/dev/zero bs=1M count=512 >> dat
a.img
rawwrite dd for windows version 0.6beta3.
Written by John Newbigin <[email protected]>
This program is covered by terms of the GPL Version 2.
512+0 records in
512+0 records out
d:\Software\DATA.IMG Maker\DATA.IMG Maker>mke2fs data.img
mke2fs 1.40.6 (09-Feb-2008)
data.img is not a block special device.
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
131072 inodes, 524288 blocks
26214 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67633152
64 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729, 204801, 221185, 401409
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
d:\Software\DATA.IMG Maker\DATA.IMG Maker>e2fsck -f data.img
e2fsck 1.40.6 (09-Feb-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
data.img: 11/131072 files (9.1% non-contiguous), 18858/524288 blocks
Alternative examples:
Using tfile to create fresh data.img instead:
D:\Software\DATA.IMG Maker\DATA.IMG Maker>tfile data.img 512
data.img
sizeMB= 512
Using resize2fs only to resize w/o anything else:
D:\Software\DATA.IMG Maker\DATA.IMG Maker>resize2fs -p data.img 524288
resize2fs 1.40.6 (09-Feb-2008)
Resizing the filesystem on data.img to 524288 (1k) blocks.
Begin pass 1 (max = 30)
Extending the inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on data.img is now 524288 blocks long.
Download HERE! (Alternate)
NEED HELP? Comment here.
FINALLY! Thanks. I'm sure this will definitely come in useful. Downloading now... Testing later.
Yeah, really appreciated! Downloaded and will try out and report back (expanding standard 256MB data .img months old to 512MB or 1GB).
Nice App
I tried this out a few days ago to see how easy it was to use and how well. It was surprisingly simple. Good app. Worked like a charm.
OK. First of all a big thanks Viper.
But -yes it IS a stupid question but i don't get it - what does this application do beside from making a data.img with various sizes. I use android now for -i think it is- a long(er) time and just want to know what i can do to explore the System .
Cheers Bieka
Bieka said:
But -yes it IS a stupid question but i don't get it - what does this application do beside from making a data.img with various sizes. I use android now for -i think it is- a long(er) time and just want to know what i can do to explore the System .
Click to expand...
Click to collapse
That's all it does... Other questions?
arrrghhh said:
That's all it does... Other questions?
Click to expand...
Click to collapse
Uhm am i kickin' myself out if i ask what this (making various sizes of a data.img file) means?! Is this the storage size android gets?
That's all it does... Other questions?
Click to expand...
Click to collapse
Uhm am i kickin' myself out if i ask what this (making various sizes of a data.img file) means?! Is this the storage size android get?
Click to expand...
Click to collapse
You kno the way if you had an android device you would have sd storage and phone storage? and phone storage would be used for apps? well this data.img is lik a virtual phone memory, When you install apps they are stored on the data.img. And for alot of of ppl 256mb isnt enough, but unlike physical harware phone memory the data.img can be made bigger. understand?
Also a big tanks viper matrix, i was looking for a way to do this a couple weeks ago, i got it sorted by using someones modified rootfs to create a new data.img but this application will probly still come in handy
Aaaaah. Thanks a lot. Now i get it Simple and obvious .
Now i can say Thanks Viper for this aplication ^^ Great Job
Worked GREAT expanding trusty months-old data.img from nearly filled up 256MB to glorious 1GB. Now Android reports memory is over 990MB!
Dead simple: run the .bat, point to data.img on SD, move slider to expand size and go. Recognized errors, corrected them, then set to it's task which took a few minutes. Done.
Superb tool, waaay too unknown to group.
Open ext2explore & goto your system.ext2 & open it & then youll be able to save it to your desktop.
Use it on the desktop & make sure its extracted into a folder.
hi!
i linked my thread to your tool if you don't mind.
posting this app in the hd2 forums would bring it a LOT of attention.
@Viper
Excellent work on these apps! I was easily able to resize my data.img. I also tried ext2explore, which works well extract items from a system.ext2. A few questions:
- Would it be possible to have the data.img resizer use standard sizes, like 524288 for 512MB, 786432 for 768MB, 1048576 for 1GB (I think you get the idea). It seems like the resizing sizes are a bit arbitrary - or is there some sort of correlation between the standard sizes and the ones selectable in the app? Or, is there a way to put these values in manually?
- In the ext2explore app, will the possibly to Copy/Cut/Paste ever be added (or drag & drop from Explorer)?
I would love to see these apps developed further .
Again, great work!
P.S. I was hoping to be able to use ext2explore to add the BLAZN theme to the FRX03 build (see this thread) - that's when I realized I couldn't copy/paste.
Viper Matrix Wireless said:
You NO larger need GParted or a Linux/Unix distro in order to make your own data.img! You NO longer need a command prompt either. However, you can use the command prompt still as an alternative option since this supports the commands in Windows. But this is an application.
With this Application you can create a brand NEW data.img or Add/Subtract space from an existing data.img. Example: You can take a 256MB data.img & make it convert to a 1GB data.img or take a 1GB data.img & make it 256MB data.img. Maximum space possible shown is based on the HDD or SD space left. So you could create a 150GB data.img if the drive had 150GB free space. It is completely safe & wont do anything to damage an existing data.img.
You will need WinRar or 7zip to extract the .RAR for this download.
WARNING!: THIS HAS NOT BEEN TESTED, DO NOT MAKE YOUR DATA.IMG Larger than 2GB because Android may not recognize the SD Card after. I will test this later.
1024 = 1GB
2048 = 2GB
4096 = 4GB
8192 = 8GB
Just double the #!
Screenshot:
How to make a NEW(Fresh) Data.img:
NOTE: In order to start NEW you must have wiped your SD card or removed every file or folder such as: .REC, Cache, Android, OLD Data.img & any apps that took a folder on the card.
1. Open TopoResize
2. Select "Create New"
3. Select Save destination such as the SD Card & name it data
4. Select "Create File"
5. Select ext2 or ext3
6. Hit Ok & it will autorun.
DONE!
How to add space to an existing Data.img:
1. Open TopoResize
2. Select "Find File"
3. Locate file & select it
4. Use the size slider to select the extra space
5. Select "Resize File"
6. It will autorun
DONE!
How to subtract space to an existing Data.img:
Same instructions apply to add space just use the slider to go down & select resize file.
How to read the system.ext2 & transfer it over to the desktop:
1. Open Ext2explore
2. Select File & Open Image
3. Goto the system.ext2 & select it
4. Select Save
5. Select a destination to save it to. (Save it to a folder is preferred, so make one.)
Download HERE!
NEED HELP? Comment here.
Click to expand...
Click to collapse
Or you just install linux and make that all with one or two mouse clicks by your self
d0nate110 said:
Or you just install linux and make that all with one or two mouse clicks by your self
Click to expand...
Click to collapse
That's not an option for everyone , so Viper's tool is very useful for those people (like me) .
Captain_Throwback said:
That's not an option for everyone , so Viper's tool is very useful for those people (like me) .
Click to expand...
Click to collapse
For me it is ONLY option, cuz with linux I can apply my lovely BLAZN theme to any Froyo etc. Release what I want
Jandyman said:
You kno the way if you had an android device you would have sd storage and phone storage? and phone storage would be used for apps? well this data.img is lik a virtual phone memory, When you install apps they are stored on the data.img. And for alot of of ppl 256mb isnt enough, but unlike physical harware phone memory the data.img can be made bigger. understand?
Also a big tanks viper matrix, i was looking for a way to do this a couple weeks ago, i got it sorted by using someones modified rootfs to create a new data.img but this application will probly still come in handy
Click to expand...
Click to collapse
making sure I understand, under sd card in settings....phone free space, this is what it does...makes that free space bigger? more storage.?
Resized the img file from 512MB to 2 gigs, but I'm using the HD2 Nexus ROM, and it doesn't report the correct disk space usage. It still shows like 65MB free as it did before resizing. The file resized properly, but the phone doesn't report that.
Normal? If not, did I do something wrong? I followed the directions...
OK, I have a Gtab with the 11/15 FB build.
I am curious about the partitions. Really, why ? I have worked in Unix for a bunch of years and am a fan of few, large partitions. So why am I choosing 2048 ? Or the max if 4096 ?
If it were a Sun box (which is what i cut my teeth on) I would make the main card (disk) a 12 GB root partition and 4 GB swap.
Do the same rules not apply ? It looks like there are a few different partitions (/system, /data, etc) but my eyes cannot read the terminal emulator all that well.
Andy
Different beasts
aknipp said:
OK, I have a Gtab with the 11/15 FB build.
I am curious about the partitions. Really, why ? I have worked in Unix for a bunch of years and am a fan of few, large partitions. So why am I choosing 2048 ? Or the max if 4096 ?
If it were a Sun box (which is what i cut my teeth on) I would make the main card (disk) a 12 GB root partition and 4 GB swap.
Do the same rules not apply ? It looks like there are a few different partitions (/system, /data, etc) but my eyes cannot read the terminal emulator all that well.
Andy
Click to expand...
Click to collapse
This may not be 100% correct (& if it's not I'm sure someone will correct me).
Really no comparison between a Sun box & a tablet. Sun would be bigger & better hardware.
The tablet only has a 512M nand chip (that holds most of the os), 512M of ram (to run the os, apps & no dedicated graphics memory), a processor that is designed for low power vs performace & and a emmc...basically a thumb drive( in place of an hdd). On top of that Andoid is really a hydrid os (a linux kernel with a java vm to run apps).
As far as partitions go, here is the structure for the nand chip on MOST of the gTabs:
Partition 2 = BCT = boot Config Table
Partition 3 = PT = Partition Table (this list)
Partition 4 = EBT = Bootloader
Partition 5 = MBT = ?
Partition 6 = BLO = Viewsonic Bird Logo
Partition 7 = MSC = ? inandop.log /possibly inter kernel comm tween part9/10
Partition 8 = OGO = logodata (gTablet logo I believe)
Partition 9 = SOS = recovery kernel
Partition 10 = LNX = kernel
Partition 11 = APP = system(rom)
Partition 12 = CAC = cache
If you look at gtablet.cfg file in any of the nvflash packages you will see these partition definitions, fs types & sizes used by nvflash to create them.
You also have 2 additional partitions on the the 16GB internal sd (emmc):
/data - user apps & settings - only accessible via root access
/sdcard = user & app storage
Don't know why exactly why /data is set @ 2 G . Apps in Android don't have the bloat of desktop/PC apps and are considerably smaller. I can tell you that with 83 apps installed I still have nearly 1G of space left on mine out of the 2G.
For the most part, Android doesn't truly multitask apps like on a desktop. From what I understand, Android has it's own mechanism for freeing memory when needed (swapping). When space is needed, non running apps are terminated but the app is responsible for storing persistent data so that it can be reactivated (assuming the app saves persistent data) when called.
Hope this helps.
Al
Cool, thanks, I boosted it up to 4 GB, does not sound like that will hurt (had to reinstall because it was full- could not tell why)
aknipp said:
I am curious about the partitions. Really, why ? I have worked in Unix for a bunch of years and am a fan of few, large partitions. So why am I choosing 2048 ? Or the max if 4096 ?
Click to expand...
Click to collapse
As to what the various partitions are, I can elaborate a bit more on Al's post above. Try these 2 posts:
SD card partitions
NAND Flash partitions
The Android OS has its distributions (ROMs) divided into those partitions described above for pragmatic reasons which are not hard to figure out--mainly to enable easy upgrades of running distributions; with security being a secondary concern.
There is no reason why you couldn't merge some partitions together. For example, GtabComb-b3.3 merges /cache into /data at system bootup time. If you were willing to lose the protected read-only status of /system, that too could be merged with /cache+/data on the SD card by modifying the init rc files. You could muck around with the system at an even lower level since you have access to the source code. It's really up to you how far you want to go. The kernel doesn't care about the no. of partitions or the filesystems on them, or even where they are.
As for your question about the 2GB size of /data, that's just how VS deemed it to be when they released the gTab and that's the size that's followed by most custom ROMs. You can have a smaller or larger size if you want. I, for example, run 2 different ROMs--VEGAn-Tab 7.1 and GtabComb-b3.3--the former on the internal SD card and the latter on a micro SD card just by loading a different boot partition using CWM. And since my micro SD is just 2GB in size, I've shrunk my /data to 256 MB.
aabbondanza said:
From what I understand, Android has it's own mechanism for freeing memory when needed (swapping).
Click to expand...
Click to collapse
None of the currently used kernels swap; and neither does Android. That's why they kill apps when there is no memory.
Explains things very well. Thank you both.
I have the USA T-mobile Samsung Galaxy S2.
The spec sheet says the internal memory is 16GB, when I go to my phone and it says the system storage is only 1.97GB. Can someone explain to me why the difference?
simeezee said:
I have the USA T-mobile Samsung Galaxy S2.
The spec sheet says the internal memory is 16GB, when I go to my phone and it says the system storage is only 1.97GB. Can someone explain to me why the difference?
Click to expand...
Click to collapse
System storae is for applications u should have another section that says internal memory which is an internal sd card that should b close to 16 gb
Settings - Storage - also lists Sd Card + USB Storage + Device memory
Thanks for the quick replies.
So I went to settings > storage. It shows SD card, USB storage and System storage.
I understand System storage is how much space I can have for all my apps. But I'm not sure what the USB storage is.
simeezee said:
Thanks for the quick replies.
So I went to settings > storage. It shows SD card, USB storage and System storage.
I understand System storage is how much space I can have for all my apps. But I'm not sure what the USB storage is.
Click to expand...
Click to collapse
System storage (mine actually reads as "Device memory", but whatever) = space for apps to be installed (unless they can be moved to external memory)
USB storage = included "external" memory; i.e. what's left of the 16gb after system storage and whatever is partitioned for the OS. Usually around 13-14gb
SD card = external card you can plug into the phone to expand memory
USB storage is the default of where photos and videos are stored, and you can store other media (i.e. music, movies, etc) here as well, OR on the SD card.
Wrong forum, this is for the i9100 the international sgs2 not the T Mobile USA one which is very different. Clickme
veyka said:
Wrong forum, this is for the i9100 the international sgs2 not the T Mobile USA one which is very different. Clickme
Click to expand...
Click to collapse
While true enough, his question is general enough that it actually applies to all models of GS2.
ctomgee said:
While true enough, his question is general enough that it actually applies to all models of GS2.
Click to expand...
Click to collapse
Correct, but other people had posted the correct info, I though i should direct them to the right forum before they tried to flash anything though.
veyka said:
Correct, but other people had posted the correct info, I though i should direct them to the right forum before they tried to flash anything though.
Click to expand...
Click to collapse
Good point.
I was just looking into this and it seems the I9100 has only 14.08GiB?!?
Code:
./busybox df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 425264 32 425232 0% /dev
tmpfs 425264 0 425264 0% /mnt/asec
tmpfs 425264 0 425264 0% /mnt/obb
/dev/block/mmcblk0p9 516040 490772 25268 95% /system
/dev/block/mmcblk0p7 100784 4160 96624 4% /cache
/dev/block/mmcblk0p1 20144 8448 11696 42% /efs
/dev/block/mmcblk0p10 2064208 1311532 752676 64% /data
/dev/block/vold/259:3 12062752 3620128 8442624 30% /mnt/sdcard
tmpfs 31424512 3729088 27695424 12% /mnt/sdcard/external_sd
/dev/block/vold/179:25 31424512 3729088 27695424 12% /mnt/sdcard/external_sd
ignoring all the virtual tmpfs mountpoint and the external sdcard (/dev/block/vold/179:25) I'm left with
516 040 + 100 784 + 20 144 + 2 064 208 + 12 062 752 = 14 763 928
that's 14.08GiB / 14.76GB which is 1.25GB short of 16GB
(before someone even suggests that's because of Samsung using 10^9 instead of 2^30 please notice that I did calculate in both GiB and GB and it doesn't add up in either!)
Please can someone help me to resize the system partition of an Android JB 4.2.2 on cubieboard?
Image: sun7i_android_sugar-cubieboard2-8192cu.img
I need more room (it's only 512MB) to install apps.
Well, the APP disk space (nand partition) is very small and the internal "sdcard" too big.
When I install a few applications the space runs out and the system becomes unstable.
I need to increase the nand and decrease internal sdcard to gain more room to my apps...
Well, I started the process by using the tools:
1) To unpack/repack: imgRePacker_204
2) The image ROM: sun7i_android_sugar-cubieboard2-8192cu.img (Android 4.2.2)
3) To burn to flash: PhoenixSuit1.0.6
unpacking the ROM creates a folder named sun7i_android_sugar-cubieboard2-8192cu.img.dump
So, somewhere in internet I see to change the sys_partition.fex file, and search the system nand partition:
Code:
;------------------------------>mmcblk0p8/nande
[partition]
name = data
size = 1048576
user_type = 0x2
so, I change 1048576 to 2097152 (2097152 * 1024 = 2GB)
but :
1) In installed android, the system has only 512MB and not 1GB as show.
2) By increasing this value, nothing happens when I repack back to IMG and flash to the nand.
(all unpak, change, pack, flash process is fine ! )
Here is my devices list and size:
Code:
NAME SIZE MOUNTPOINT LABEL
nand 3.8G
|-nand1 16M Volumn
|-nand2 16M
|-nand3 16M
|-nand4 512M
|-nand5 512M
|-nand6 16M
|-nand7 32M
|-nand8 320M
|-nand9 16M PRIVATE
|-nand10 256M
`-nand11 2.1G
mmcblk0 14.4G
|-mmcblk0p1 900M /
`-mmcblk0p2 13.5G EXTRA
icemagno said:
Please can someone help me to resize the system partition of an Android JB 4.2.2 on cubieboard?
Image: sun7i_android_sugar-cubieboard2-8192cu.img
I need more room (it's only 512MB) to install apps.
Well, the APP disk space (nand partition) is very small and the internal "sdcard" too big.
When I install a few applications the space runs out and the system becomes unstable.
I need to increase the nand and decrease internal sdcard to gain more room to my apps...
Well, I started the process by using the tools:
1) To unpack/repack: imgRePacker_204
2) The image ROM: sun7i_android_sugar-cubieboard2-8192cu.img (Android 4.2.2)
3) To burn to flash: PhoenixSuit1.0.6
unpacking the ROM creates a folder named sun7i_android_sugar-cubieboard2-8192cu.img.dump
So, somewhere in internet I see to change the sys_partition.fex file, and search the system nand partition:
Code:
;------------------------------>mmcblk0p8/nande
[partition]
name = data
size = 1048576
user_type = 0x2
so, I change 1048576 to 2097152 (2097152 * 1024 = 2GB)
but :
1) In installed android, the system has only 512MB and not 1GB as show.
2) By increasing this value, nothing happens when I repack back to IMG and flash to the nand.
(all unpak, change, pack, flash process is fine ! )
Here is my devices list and size:
Code:
NAME SIZE MOUNTPOINT LABEL
nand 3.8G
|-nand1 16M Volumn
|-nand2 16M
|-nand3 16M
|-nand4 512M
|-nand5 512M
|-nand6 16M
|-nand7 32M
|-nand8 320M
|-nand9 16M PRIVATE
|-nand10 256M
`-nand11 2.1G
mmcblk0 14.4G
|-mmcblk0p1 900M /
`-mmcblk0p2 13.5G EXTRA
Click to expand...
Click to collapse
Use this software, search it on google and install it on your PC, then partition you SD
MiniTool Partition Wizard Pro v7.1
azithro said:
Use this software, search it on google and install it on your PC, then partition you SD
MiniTool Partition Wizard Pro v7.1
Click to expand...
Click to collapse
"3) To burn to flash: PhoenixSuit1.0.6"
This implies using NAND .... SD is not in the context.
Thanks anyway!
{
"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"
}
DISCLAIMER!
Operations on phone’s partition could be EXTREMALY dangerous.
As You surely expect - I take no resposibility if something will go... not as it supposed to. The responsibility for potential damages caused by using this guide is Yours, and Yours only!
New system partition scheme is “designed” for custom ROMs NOT based on original Samsung firmwares (because of it’s size and using /preload partition, which we intend to extremely resize), to name just a few reasons).
The method of modification is created by @Tesla-MADAL93 from Galaxy Advance sub-forum, all credits should go to him!!! He spend many hours using trials and errors method to achieve final success.
Part ONE: Preparations / theory.
1.Procedure requires any Linux distro with usb connection configured (tested on Ubuntu 12.04 LTS).
2.Working ADB (android debug bridge) – you don’t need to install whole ADK, just adb file with correct path added.
[EDIT/CAUTION]You can use Windows with adb configured, as proven by @maxprzemo, but I wasn’t tested by author of this guide!
3.It is strongly recommended to make a backup of your apps and data before start (using titanium backup or simipar app) Restoring nandroid backup will destroy your new partitions, so don’t use it!!!
4.With this method “safe partiotions” of phone’s eMMC memory are being removed and recreated „safe” using „parted” command in adb shell mode. Some partitions are extremely decreased, one is totally deleted. And the most important – partition of your choice will be expanded. Example displayed below sets internal (DATA) partition as large as possible (almost).
5.You will need external micro SD card after remodelling partitions)
6.Memory swap (SD0 and SD1) required BEFORE first start of your chosen ROM!!!
7.You can restore original partition scheme using Heimdall or Odin (not tested by me, problems with Odin reported by the author of whole modification) with repartition selected.
8.Partition numbers and names are very important (crucial), so we need to create them correctly, setting beginning and the end of each one very carefully.
9.Last important thing! I use minimal gapps pack for every ROM. I didn’t tested if full gapss fit on new /system partition! You’ll have to check it by yourself!
Default partitions and sizes are displayed here:
With this guide you will achieve something like this:
[Side Note: this is just an example – you can make internal card (UMS partition) bigger, leaving /DATA partition intact, just to install bigger games – you’ll have to calculate your own values]
Part TWO: Repartition
OK., let’s do it! You have to perform all steps EXACTLY in described order!
1.Turn phone on in recovery mode, connect it to computer using usb cable.
2.Open terminal / console (Ctrl+Alt+T)
2a. Enter command:
Code:
adb devices
You should see device connected (some numbers and letters)
3.Write (press enter after each command):
Code:
adb shell
su
parted /dev/block/mmcblk0
unit kb
print
You should see default partition scheme (just as one first screen above)
OK., say goodbye to your old partitions. Deleting other partitions could (and probably – will) have irreversible consequences!!
Now we will delete partitions, starting from the last one:
Code:
rm 8
rm 11
rm 9
rm 4
Now you will encounter some error – despite of the unmounting partitions before abovementioned procedure - /cache partition is now mounted. Do not unplug phone, just enter “mount and storage” submenu in recovery, and unmount cache partition)
So let’s continue:
Code:
rm 4
rm 5
rm 3
You just deleted all “safe” partitions, enter to check this:
Code:
print
OK., it’s time to (re)create!
(SYSTEM, partition 3)
Code:
mkpart primary 105906 525906
(CACHEFS, partition 4)
Code:
mkpart primary 3848809 3948809
(DATAFS, partition 5)
Code:
mkpart primary 525906 3848809
(UMS, partition 8)
Code:
mkpart primary 3948873 3948937
(HIDDEN, partition 9)
Code:
mkpart primary 3948809 3948873
Let’s rename them properly (probably you can do it in one mkpart command, but it doesn’t matter):
Code:
name 3 SYSTEM
name 4 CACHEFS
name 5 DATAFS
name 8 UMS
name 9 HIDDEN
Almost done, let’s check:
Code:
print
Nice? Of course it’s nice!!! )
One last thing – we have to make our magic /preload (HIDDEN) partition visible for phone [it won’t boot without it!!] Because recovery won’t format it properly, lets use parted command for a last time (wait after each command):
Code:
mkfs
y
9
ext2
Now you can unplug the phone and format (in recovery) partitions:
/system
/data
/cache
OK, as I said before – you’ll have to switch storages BEFORE using phone again.
For now – you will have to manage it by yourself, just to make it short:
-for 4.2.x ROMs you can use modified vold.fstab file
-for 4.3.x ROMs – you have to manually modify build.prop, or use available zip package that will do it for you (that method is supposed to work with 4.2.x ROMs, but I didn’t test it!)
-I never used any of 4.4.x ROMs, but as I heard, there is method for switching memories too.
WARNING!
I didn’t test the way back to original partition sizes! It was tested by tesla-Madal93 though…
Sometimes (when transfer ring from one android version ROM to other, or using some old version where /preload partition was set as SWAP) you will need manualny format HIDDEN partition, just as shown above:
in adb shell mode:
Code:
parted /dev/block/mmcblk0
Code:
mkfs
y
9
ext2
FINAL WORD: If you are not sure – DON’T DO IT!!!
Screenshots are broken... I assume this deletes the "USB storage"? If then, you and the OP are bosses :good:
I can see the pictures (but are linked from other forum, i'll switch them in future), but yes - it deletes usb storage (ok, not really - new usb storage has 64KB and doesn't have to be even formatted)
Good job !:good:
Personaly i wont do it ever because 1,2 GB is enough, and if i get over that surely i have something on phone that i need to delete because i am not using it
Great post.
I would love to see the same mkpart commands to recover the preload partition space and allocate it to the data partition.
I'll do the full repartitioning thing when the team canjica CM11 major bugs have been solved. I'm not too confident about the other cm11's memory swap sustainability over time
Sent from my GT-I8160 using Tapatalk
I suggest you making script for this, and one script to revert everything like it was before
Rox said:
I suggest you making script for this, and one script to revert everything like it was before
Click to expand...
Click to collapse
I don't know if I can make something as a simple script for recovery (maybe with busybox), but for Linux yes (to automate repartition process). In every case, I will tell/send it to @judas1977 that will provide to update this guide.
@judas1977: Nice work
My new system partition
Made under windows 7
Well done judas77 and Tesla-MADAL93 :laugh:
I'll try to make (semi)automate script for linux terminal in couple of days (unless @Tesla-MADAL93 make this) - then we can have/prepare separate scripts for various partition sizes:
- bigger /DATA
- bigger /UMS (like @maxprzemo did)
- etc...
My partition table (actual formatted sizes 602M /system, 28M /cache, 2150M /data, 761M /sdcard -- no need to swap storage)
3 105906kB 747635kB 641729kB ext4 SYSTEM
4 747636kB 777636kB 30001kB ext4 CACHEFS
5 777636kB 3118935kB 2341299kB ext4 DATAFS
8 3118935kB 3918936kB 800001kB fat32 UMS
9 3918936kB 3948937kB 30001kB ext2 HIDDEN
Original partitions:
Model: MMC SEM04G (sd/mmc)
Disk /dev/block/mmcblk0: 3959423kB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
10 524kB 1573kB 1049kB PIT
6 1573kB 3146kB 1573kB CSPSA FS
7 4194kB 14680kB 10486kB ext4 EFS
2 14680kB 31457kB 16777kB ext4 Modem FS
14 32506kB 34603kB 2097kB SBL
16 34603kB 36700kB 2097kB SBL_2
1 36700kB 53477kB 16777kB PARAM
12 53477kB 55575kB 2097kB IPL Modem
13 55575kB 72352kB 16777kB Modem
15 72352kB 89129kB 16777kB Kernel
17 89129kB 105906kB 16777kB Kernel2
3 105906kB 747635kB 641729kB ext4 SYSTEM
5 747635kB 2056258kB 1308623kB ext4 DATAFS
4 2056258kB 2377122kB 320864kB ext4 CACHEFS
9 2377122kB 2712666kB 335544kB ext4 HIDDEN
11 2712666kB 2765095kB 52429kB Fota
8 2765095kB 3948937kB 1183842kB fat32 UMS
Minimum sizes and warnings
/system 530M (approximate value, calculated for CM10.2 + my gApps) (10MB margin)
/cache 8M (assuming dalvik.vm.dexopt-data-only=1 && dalvik.vm.dexopt-cache-only=0) (2MB margin)
/data 350M (assuming about 100M of actual usable app space) (20MB margin) -- in practice less than 600 will be quite tight
/sdcard 1M (depends on apps again and FAT fragments easily by design, avoid less than 100M)
Now what should be nice having are ROM variants with internal storage disabled, so that we can remove partition 8 and both bypass the need for storage swapping but also avoid some apps not desiged for 2 "SDs" getting partially broken
I just repartitioned my phone, but acidentally I partitioned partition 2 instead of 3 :/
Now when I try to rename the partition 2 again in "Modem FS" with the name command, it only names the partition as "Modem". Can someone explain me please how to rename it to the original name again?
Thank you
S.AMU said:
I just repartitioned my phone, but acidentally I partitioned partition 2 instead of 3 :/
Now when I try to rename the partition 2 again in "Modem FS" with the name command, it only names the partition as "Modem". Can someone explain me please how to rename it to the original name again?
Thank you
Click to expand...
Click to collapse
Try "Modem FS" with quotes, or maybe Modem\ FS
Ryccardo said:
Try "Modem FS" with quotes, or maybe Modem\ FS
Click to expand...
Click to collapse
renaming worked with the quotes. Thanks
I restored my old nv_backup and now the device is booting... Let's see if it will work. I'm just confused, because in recovery the partition is called modemfs and when restoring nv backup it is called Modemfs....
botid said:
Great post.
I would love to see the same mkpart commands to recover the preload partition space and allocate it to the data partition.
Click to expand...
Click to collapse
Impossible (well, without LVM or something) because there's USB storage in the middle... but with 10 minutes and a calculator you can create your partition sizes relatively easily
If I'll make the following changes in partitions: UMS resize to 400MB, CACHEFS resize to 30MB, DATAFS resize to 2,313GB, Fota 0 MB and I'll leave SYSTEM and HIDDEN to default sizes can I restore CWM Recovery backup or flash stock rom with Odin?
The HIDDEN partition will have the same size, but the location on mmc is different, as you can see below.
3 105906kB 747635kB 641729 kB ext4 SYSTEM
5 747635kB 3173073kB 2425438kB ext4 DATAFS
4 3173073kB 3203793kB 30720 kB ext4 CACHEFS
9 3203793kB 3539337kB 335544kB ext2 HIDDEN
8 3539337kB 3948937kB 409600KB fat32 UMS
Sorry for my english.
powermetza said:
If I'll make the following changes in partitions: UMS resize to 400MB, CACHEFS resize to 30MB, DATAFS resize to 2,313GB, Fota 0 MB and I'll leave SYSTEM and HIDDEN to default sizes can I restore CWM Recovery backup or flash stock rom with Odin?
The HIDDEN partition will have the same size, but the location on mmc is different, as you can see below.
3 105906kB 747635kB 641729 kB ext4 SYSTEM
5 747635kB 3173073kB 2425438kB ext4 DATAFS
4 3173073kB 3203793kB 30720 kB ext4 CACHEFS
9 3203793kB 3539337kB 335544kB ext2 HIDDEN
8 3539337kB 3948937kB 409600KB fat32 UMS
Sorry for my english.
Click to expand...
Click to collapse
Nandroid: I wouldn't personally do it but it should work
Odin: definitely repartition with PIT and full image first
And be sure to input the partitions in numerical order!
You can make a script? For linux and winzozz?
Sent from my GT-I8160 using XDA Premium 4 mobile app
Don't make CACHEFS partition under a minimum 100 MB!!!
In this partition is stored system apps' dalvik cache on all CM and CM-based ROMs, if available space is insufficient to store dalvik cache of all system apps the ROM isn't stable and has lot of FCs depending on what caches are not stored. If you want to go under 100 MB (that I advice) first check actual used space on this partition with Partition Table (available on Play Store) on your ROM, remember that every ROM has its system-dalvik cache size depending from apps' classes.dex
Inviato dal mio GT-I9070
Tesla-MADAL93 said:
Don't make CACHEFS partition under a minimum 100 MB!!!
Click to expand...
Click to collapse
And why?
I've had zero problems in Android with 10 MB as long as you keep dalvik-cache away from it ( dalvik.vm.dexopt-data-only=1 and …cache-only=0)
Recovery probably uses it more though...
Ryccardo said:
And why?
I've had zero problems in Android with 10 MB as long as you keep dalvik-cache away from it ( dalvik.vm.dexopt-data-only=1 and …cache-only=0)
Recovery probably uses it more though...
Click to expand...
Click to collapse
In this way is okay, but not all people know this I think. Should be added to first post @judas1977
Inviato dal mio GT-I9070