[REPARTITION][CWM-ZIP] Get 1.9 GB extra for user data on N7100!

Search This thread

ninekaw9

Senior Member
Feb 17, 2008
246
135
Hello everyone

This is CWM-Zip script to repartition our N7100 to gain 1.9 GB more for user data partition.

This script is originally from http://xdaforums.com/galaxy-s3/development/guide-extra-1-3-gb-user-data-t2762594 It’s for GT-i9300. Made by @forumber2 :good:. Thanks to him, without his easy simple script, I wouldn’t be able to port this script.

This is how Samsung partitioned N7100

attachment.php
attachment.php


After running the script

attachment.php
attachment.php


Please note that this script is not suitable to ROMs that require storing big files in CACHE and PRELOAD or HIDDEN, notably Official ROMs, as you can see that CACHE and PRELOAD got shrank.

I’m not sure if there are some custom ROMs that store files in CACHE and PRELOAD, so check the ROMs installation zip first before using this repartition script. Check by reading update-binary in META-INF and observing folder structure inside the zip file.

I’m using DN3 v5+ and it doesn’t store any files.
I checked Omega v29, it doesn't use PRELOAD to store files, even wiping it before install.
X-Treme v2.1 is safe to install, even wiping PRELOAD before install.


BIG UPDATE 1
For some ROMs like Phoenix ROM requires storing data to PRELOAD, but not CACHE.
Use partition script "Repartition_N7100_16GB_PreloadStockSize587MB.zip" instead of "Repartition_N7100_16GB.zip"
It will partition PRELOAD to size of Stock 587 MBs.
CACHE remains 100 MBs, and SYSTEM remains around 2 GBs. GAINED USERDATA FREE SPACE IS AROUND 1328 MBs.
If your ROM .zip installer doesn't store files in PRELOAD, use "Repartition_N7100_16GB.zip" instead.


FYI, Big CACHE partition is used to store official Samsung OTA updates file, if you are on custom ROMs, then you can’t use Samsung OTA updates anyway. Big cache partition is practically waste of free space, but it is still required for Google Play APK downloads. (Max Google Play APK size is 50 MBs) In fact, Google Play apk downloads are stored in /data/com.android.providers.downloads/files/, cache partition is used to store apk downloads in old Android version. This script will partition CACHE with size of 100 MBs. For any Google Play apps that are bigger than 50 MB, they will use expansion files called .obb to help, those obb are stored in "Internal SD Card/Android/obb".
Samsung Apps APK downloads sometimes can be seen large to something like 300 MBs, but these APK downloads are stored in "/data/data/com.sec.android.app.samsungapps/files" So it won't break Samsung Apps downloads.

PRELOAD or HIDDEN is used to store Samsung crap stuffs like ringtones, Wonders of Nature video, starter beautiful images, VODB folder that is used for S-Pen stroke recognition. When user make a factory reset, all data in internal sd card gets deleted, then stuffs in PRELOAD gets copy to internal sd card. That’s why after factory reset Wonder of Nature video comes back.

ALL USERDATA AND INSTALLED OS ARE GOING TO BE REMOVED, SO BACKUP FIRST!

So let’s get started. You will use "Repartition_N7100_16GB.zip OR Repartition_N7100_16GB_PreloadStockSize587MB.zip OR in the attachment

1.Backup of course, if you don’t do System Nandroid backup, be sure to have ROM installer zip ready in external sd card, if you do Nandroid backup or Titanium Backup, make sure to back up to external sd card because this process will erase internal sd card too.You may backup your internal sd card to external sd card, USB-OTG, or Windows PC.

2.You need to use PhilZ Recovery, it doesn’t work with TWRP, TWRP lacks of “parted” binary required for repartitioning.

I personally used PhilZ Touch 6.25.0 on my N7100. 6.41.6 reported to work as well.

3.Install the ZIP and the script will run, after it finished, it will reboot recovery again.
4.We are not done yet, this script still has some bug that formatted partition can’t be mounted. You can see that you can’t mount some partitions or maybe all, weird.
5.We need to fix mount problem manually by go to Mounts and Storage, then format System, Data, Cache, Preload or Hidden one by one, then go to Power Option and reboot recovery once. DO NOT FORMAT BOOT, MODEM, STORAGE/SDCARD1 (external sd card).
6.We have repartition successfully. Now restore data, install ROMs. :)

How to restore original stock partition table.
You will need to do this if you want to install stock official firmware.
1 - Download "Odin3_v3.07_with_PIT_16GB_GT-N7100.zip" and extract it somewhere
2 - Download any stock ROM from sammobile.com or samsung-updates.com and unzip it.
2 - Open Odin, click "PIT" button and select " PIT_N7100_16GB_20121102.pit"
3 - Click "PDA" and select official ROM that you've downloaded
4 - Click "Start"
5 - After installation, phone will be stuck at bootanimation, don't panic.
6 - Pull out battery, boot to recovery (you can see some mount errors, don't worry)
7 - Select "wipe data/factory reset" in recovery menu
8 - Select "reboot system now"

I recently update 4.3 MJ5 to 4.4.2 ND3 bootloader via odin successfully, just to inform that after repartition, bootloader update still works. If it fails, make sure to try new usb cable. Mine failed first time because of bad usb cable.
See ND 4.4.2 bootloader here http://xdaforums.com/showthread.php?t=2472270 CTRL+F in the thread and find bootloader.

For some people who curious how to output partition table in Terminal.
First you need to install "parted" binary to /system/bin/
parted binary is in attachment,
then use these command in terminal

su
parted /dev/block/mmcblk0
print

Also programs to show partition tables in Google Play can't show partitions offsets, but this command could.

UPDATE 15/10/2014
I found out that in fact, Google Play apk downloads are stored in /data/com.android.providers.downloads/files/, cache partition is used to store apk downloads in old Android version.

UPDATE 24/10/2015
I also uploaded a new partition script cwm-zip file for AOSP users that will repartition system to size of 1 GB, preload 15 mb, cache 100 mb.
This will gain 3 GB of more userdata space.
Please note that once you have repartition with Repartition AOSP N7100 System 1 GB.zip
You will not be able to install Touchwiz based ROM
, Touchwiz based ROMs are bigger than 1 GB.
You will have to repartition again with Repartition_N7100_16GB.zip OR Repartition_N7100_16GB_PreloadStockSize587MB.zip, note that all userdata will be deleted.
Note that I personally don't use Note 2 anymore, but this script should work. It's just simple script editing from previous files.


1 GB system partitioning for AOSP/CM is not working as
psndna88, AGNI kernel maker, tests
"it seems we cannot change SYSTEM size, else the bootloader boots only into download mode"
 

Attachments

  • Repartition_N7100_16GB.zip
    7.5 KB · Views: 4,979
  • Odin3_v3.07_with_PIT_16GB_GT-N7100.zip
    454.2 KB · Views: 4,386
  • philz_touch_6.25.0-n7100.zip
    6.8 MB · Views: 3,766
  • Repartition_N7100_16GB_PreloadStockSize587MB.zip
    8.4 KB · Views: 3,370
  • parted.rar
    155 KB · Views: 2,456
Last edited:

micronyaol

Senior Member
Sep 2, 2007
64
14
Moscow
I did repartition my device about a year ago, but I did it manually and used parted program that comes with cwm recovery. The process is fairly simple if you are familiar with unixlike OS'es. The advantage of parted us that you can resize /system partition too (CM11 requires just 400 mb on /system, and default is 1800mb).
 

steff195

Senior Member
Nov 5, 2008
384
167
Severin
I just tried it. It all went fine. Thanks!

My question is, can we have more space, or this is the max we can have? :D
I guess some space must be reserved though, so the phone can work properly. :D
 

ninekaw9

Senior Member
Feb 17, 2008
246
135
I just tried it. It all went fine. Thanks!

My question is, can we have more space, or this is the max we can have? :D
I guess some space must be reserved though, so the phone can work properly. :D

Yes we can have just a little bit more space. You may try to shrink cache partition to 60 mbs, shrink preload to 4 mb. That would gain 54 mbs only. I configured cache and preload to be bigger than this for safety purpose. Maybe it will be use to store small files in the future. We also need to keep the number of partitions to be the same as stock one, else everything will malfunction. I still have no ideas what does OTA and TOMBSTONES do.



Sent from my GT-N7100 using XDA Free mobile app
 

rraaka

Senior Member
Sep 8, 2010
2,608
671
great guide, will try

reminds me of the htc days when we could s off and flash various hboots to increase/decrease various partitions

so, this will accomodate all current custom roms ? edit - just read your warning to check : thanks:
 
Last edited:
  • Like
Reactions: ninekaw9

steff195

Senior Member
Nov 5, 2008
384
167
Severin
Yes we can have just a little bit more space. You may try to shrink cache partition to 60 mbs, shrink preload to 4 mb. That would gain 54 mbs only. I configured cache and preload to be bigger than this for safety purpose. Maybe it will be use to store small files in the future. We also need to keep the number of partitions to be the same as stock one, else everything will malfunction. I still have no ideas what does OTA and TOMBSTONES do.



Sent from my GT-N7100 using XDA Free mobile app

Then I'll just leave it this way. ;) Don't want my phone to malfunction if I push this to the extreme. :D
Thanks again!
 

Rickav

Senior Member
Feb 15, 2013
681
381
Sco'land
Samsung Galaxy A70
I saw your post on the DN3 V5+ thread which led me... Seems to be a great concept, especially considering that one of the first things I do upon flashing a stock-based rom is to delete most Sammy things on it.

I understand that you need Philz to flash this; will the latest V6.41.4 do?
Also, do you know of anyway to save all system settings so as to restore them later? I can backup apps and their data but not the stock system settings themselves.
 

steff195

Senior Member
Nov 5, 2008
384
167
Severin
only a small problem, it does not format anything and says that there is no sim inside, I sincerely hope that you manage to solve the problem ....
also the modem is not installed ...

Man, I tried via Philz 6.41.6, since it was recommended in OP. I usually use TWRP, had a nandroid backup of everything including Modem made with TWRP which I placed on external card.
Had the mounting problem after flashing script and rebooting recovery, but I manually solved them, as described in 1st post. Then reflashed TWRP and restored my nandroid from external card. Then also restored my internal sd files (music, games obb, etc) which I saved on pc.
I have no error, I have ND3 modem present, all fine, phone works as before. And 12.1gb total space instead of 10.4 which I had before. ;)

Thanks again!:good:
 
  • Like
Reactions: ninekaw9

ninekaw9

Senior Member
Feb 17, 2008
246
135
only a small problem, it does not format anything and says that there is no sim inside, I sincerely hope that you manage to solve the problem ....
also the modem is not installed ...
How come your modem firmware is gone?
Have you try installing ROMs again, most rom installer will flash modem firmware.
My script doesn't touch modem partition at all.
Just partition cache and after that, see the partition table.
 

ninekaw9

Senior Member
Feb 17, 2008
246
135
I saw your post on the DN3 V5+ thread which led me... Seems to be a great concept, especially considering that one of the first things I do upon flashing a stock-based rom is to delete most Sammy things on it.

I understand that you need Philz to flash this; will the latest V6.41.4 do?
Also, do you know of anyway to save all system settings so as to restore them later? I can backup apps and their data but not the stock system settings themselves.

steff195 used Philz 6.41.6, and it worked.

Well, DN3 v5+ update-script has the commands to delete Android Setting Database on install.
Because you restore data first, then flash DN3v5+ which triggering deletion of Android Setting Database.
So you have to backup android setting database using titanium backup before repartition, then restore after repartition.
Or after repartitioning, install DN3 v5+ first, then restore data using nandroid.

I also have weird problem after deleting Android Setting Database on DN3 v5+. New setting generated is really courrupted. It breaks home button, notification toggles expanding, lock screen, and much more. Everybody else seem to be fine of android setting database regeneration. Weird.
 
Last edited:

ninekaw9

Senior Member
Feb 17, 2008
246
135
Can we increase system partition???
I need more space in system......

Yes you can.
Extract my .zip script, then open the updater-binary with your favorite text editor, I prefer Notepad++.

Find these line

parted /dev/block/mmcblk0 mkpart primary 168MB 270MB -> CACHE
parted /dev/block/mmcblk0 mkpart primary 270MB 2417MB -> SYSTEM
parted /dev/block/mmcblk0 mkpart primary 2417MB 2432MB -> HIDDEN
parted /dev/block/mmcblk0 mkpart primary 2432MB 2440MB -> OTA
parted /dev/block/mmcblk0 mkpart primary 2440MB 15.8GB -> USERDATA

It is pretty easy to understand indeed, first number after word "primary" is the start offset of the partition, second one is the end.
You may change those number. But remember that CACHE partition must always be bigger than 50 MBs to store google play apk download. Google stated that google play apk max size is 50 mb, bigger than that will use .obb to help.

I recommend you to keep OTA size 8 MB, cause I don't know what it does.
HIDDEN can be shrink up to 5 MB I doubt. I suspect that shrink up to 4 MB can cause issue, I don't know if you set size for 4 MB, will it exceed minimum partition size required.

However, numbers in red can't be changed, they must be 168MB and 15.8 GB the same.
And do not change order of partitions, and there must be 5 partitions. You can't remove HIDDEN and OTA, else partition order and number will wrong, and I think a lot of things will break, including recovery.

After you modified the script. Zip them and put in your phone and flash! :laugh:
 
Last edited:

ulkika

Senior Member
Apr 15, 2010
399
74
GB
meettomy.site
philz_touch_6.41.6-n7100.zip.md5 but the problem is that not format data,i solve whith reinstall nd3 and after root and restore system but the patch is not functionally at my device.

---------- Post added at 11:50 AM ---------- Previous post was at 11:45 AM ----------

How come your modem firmware is gone?
Have you try installing ROMs again, most rom installer will flash modem firmware.
My script doesn't touch modem partition at all.
Just partition cache and after that, see the partition table.

I do not know what happens because of it, I can not see the pictures because you do not know how to send to you but that happens on the screen while doing the second restart to do manually format the system tells me that the memory is not formatted.
then I tried to reinstall the old rom and told me that he could not find the modem, it does not restart no line present it tell insert telephone card ... in the end I had to reinstall ND3, before I tried it with the pit from you and given after but not without changing anything in the system memory space....
 
Last edited:

ninekaw9

Senior Member
Feb 17, 2008
246
135
philz_touch_6.41.6-n7100.zip.md5 but the problem is that not format data,i solve whith reinstall nd3 and after root and restore system but the patch is not functionally at my device.

---------- Post added at 11:50 AM ---------- Previous post was at 11:45 AM ----------



I do not know what happens because of it, I can not see the pictures because you do not know how to send to you but that happens on the screen while doing the second restart to do manually format the system tells me that the memory is not formatted.
then I tried to reinstall the old rom and told me that he could not find the modem, it does not restart no line present it tell insert telephone card ... in the end I had to reinstall ND3, before I tried it with the pit from you and given after but not without changing anything in the system memory space....

I am very confused with your language. After you used my script, did you go to "Mounts and Storage", then format SYSTEM DATA CACHE PRELOAD?
 

ninekaw9

Senior Member
Feb 17, 2008
246
135
after reboot of first install, is impossible for me format prelod .system and cache....

Try this Philz Touch version. It is the version that I used to repartition on my device.
I'm still downloading your ROM, mediafire is quite slow today.
 

Attachments

  • philz_touch_6.25.0-n7100.zip
    6.8 MB · Views: 112

Top Liked Posts

  • There are no posts matching your filters.
  • 46
    Hello everyone

    This is CWM-Zip script to repartition our N7100 to gain 1.9 GB more for user data partition.

    This script is originally from http://xdaforums.com/galaxy-s3/development/guide-extra-1-3-gb-user-data-t2762594 It’s for GT-i9300. Made by @forumber2 :good:. Thanks to him, without his easy simple script, I wouldn’t be able to port this script.

    This is how Samsung partitioned N7100

    attachment.php
    attachment.php


    After running the script

    attachment.php
    attachment.php


    Please note that this script is not suitable to ROMs that require storing big files in CACHE and PRELOAD or HIDDEN, notably Official ROMs, as you can see that CACHE and PRELOAD got shrank.

    I’m not sure if there are some custom ROMs that store files in CACHE and PRELOAD, so check the ROMs installation zip first before using this repartition script. Check by reading update-binary in META-INF and observing folder structure inside the zip file.

    I’m using DN3 v5+ and it doesn’t store any files.
    I checked Omega v29, it doesn't use PRELOAD to store files, even wiping it before install.
    X-Treme v2.1 is safe to install, even wiping PRELOAD before install.


    BIG UPDATE 1
    For some ROMs like Phoenix ROM requires storing data to PRELOAD, but not CACHE.
    Use partition script "Repartition_N7100_16GB_PreloadStockSize587MB.zip" instead of "Repartition_N7100_16GB.zip"
    It will partition PRELOAD to size of Stock 587 MBs.
    CACHE remains 100 MBs, and SYSTEM remains around 2 GBs. GAINED USERDATA FREE SPACE IS AROUND 1328 MBs.
    If your ROM .zip installer doesn't store files in PRELOAD, use "Repartition_N7100_16GB.zip" instead.


    FYI, Big CACHE partition is used to store official Samsung OTA updates file, if you are on custom ROMs, then you can’t use Samsung OTA updates anyway. Big cache partition is practically waste of free space, but it is still required for Google Play APK downloads. (Max Google Play APK size is 50 MBs) In fact, Google Play apk downloads are stored in /data/com.android.providers.downloads/files/, cache partition is used to store apk downloads in old Android version. This script will partition CACHE with size of 100 MBs. For any Google Play apps that are bigger than 50 MB, they will use expansion files called .obb to help, those obb are stored in "Internal SD Card/Android/obb".
    Samsung Apps APK downloads sometimes can be seen large to something like 300 MBs, but these APK downloads are stored in "/data/data/com.sec.android.app.samsungapps/files" So it won't break Samsung Apps downloads.

    PRELOAD or HIDDEN is used to store Samsung crap stuffs like ringtones, Wonders of Nature video, starter beautiful images, VODB folder that is used for S-Pen stroke recognition. When user make a factory reset, all data in internal sd card gets deleted, then stuffs in PRELOAD gets copy to internal sd card. That’s why after factory reset Wonder of Nature video comes back.

    ALL USERDATA AND INSTALLED OS ARE GOING TO BE REMOVED, SO BACKUP FIRST!

    So let’s get started. You will use "Repartition_N7100_16GB.zip OR Repartition_N7100_16GB_PreloadStockSize587MB.zip OR in the attachment

    1.Backup of course, if you don’t do System Nandroid backup, be sure to have ROM installer zip ready in external sd card, if you do Nandroid backup or Titanium Backup, make sure to back up to external sd card because this process will erase internal sd card too.You may backup your internal sd card to external sd card, USB-OTG, or Windows PC.

    2.You need to use PhilZ Recovery, it doesn’t work with TWRP, TWRP lacks of “parted” binary required for repartitioning.

    I personally used PhilZ Touch 6.25.0 on my N7100. 6.41.6 reported to work as well.

    3.Install the ZIP and the script will run, after it finished, it will reboot recovery again.
    4.We are not done yet, this script still has some bug that formatted partition can’t be mounted. You can see that you can’t mount some partitions or maybe all, weird.
    5.We need to fix mount problem manually by go to Mounts and Storage, then format System, Data, Cache, Preload or Hidden one by one, then go to Power Option and reboot recovery once. DO NOT FORMAT BOOT, MODEM, STORAGE/SDCARD1 (external sd card).
    6.We have repartition successfully. Now restore data, install ROMs. :)

    How to restore original stock partition table.
    You will need to do this if you want to install stock official firmware.
    1 - Download "Odin3_v3.07_with_PIT_16GB_GT-N7100.zip" and extract it somewhere
    2 - Download any stock ROM from sammobile.com or samsung-updates.com and unzip it.
    2 - Open Odin, click "PIT" button and select " PIT_N7100_16GB_20121102.pit"
    3 - Click "PDA" and select official ROM that you've downloaded
    4 - Click "Start"
    5 - After installation, phone will be stuck at bootanimation, don't panic.
    6 - Pull out battery, boot to recovery (you can see some mount errors, don't worry)
    7 - Select "wipe data/factory reset" in recovery menu
    8 - Select "reboot system now"

    I recently update 4.3 MJ5 to 4.4.2 ND3 bootloader via odin successfully, just to inform that after repartition, bootloader update still works. If it fails, make sure to try new usb cable. Mine failed first time because of bad usb cable.
    See ND 4.4.2 bootloader here http://xdaforums.com/showthread.php?t=2472270 CTRL+F in the thread and find bootloader.

    For some people who curious how to output partition table in Terminal.
    First you need to install "parted" binary to /system/bin/
    parted binary is in attachment,
    then use these command in terminal

    su
    parted /dev/block/mmcblk0
    print

    Also programs to show partition tables in Google Play can't show partitions offsets, but this command could.

    UPDATE 15/10/2014
    I found out that in fact, Google Play apk downloads are stored in /data/com.android.providers.downloads/files/, cache partition is used to store apk downloads in old Android version.

    UPDATE 24/10/2015
    I also uploaded a new partition script cwm-zip file for AOSP users that will repartition system to size of 1 GB, preload 15 mb, cache 100 mb.
    This will gain 3 GB of more userdata space.
    Please note that once you have repartition with Repartition AOSP N7100 System 1 GB.zip
    You will not be able to install Touchwiz based ROM
    , Touchwiz based ROMs are bigger than 1 GB.
    You will have to repartition again with Repartition_N7100_16GB.zip OR Repartition_N7100_16GB_PreloadStockSize587MB.zip, note that all userdata will be deleted.
    Note that I personally don't use Note 2 anymore, but this script should work. It's just simple script editing from previous files.


    1 GB system partitioning for AOSP/CM is not working as
    psndna88, AGNI kernel maker, tests
    "it seems we cannot change SYSTEM size, else the bootloader boots only into download mode"
    6
    Can we increase system partition???
    I need more space in system......

    Yes you can.
    Extract my .zip script, then open the updater-binary with your favorite text editor, I prefer Notepad++.

    Find these line

    parted /dev/block/mmcblk0 mkpart primary 168MB 270MB -> CACHE
    parted /dev/block/mmcblk0 mkpart primary 270MB 2417MB -> SYSTEM
    parted /dev/block/mmcblk0 mkpart primary 2417MB 2432MB -> HIDDEN
    parted /dev/block/mmcblk0 mkpart primary 2432MB 2440MB -> OTA
    parted /dev/block/mmcblk0 mkpart primary 2440MB 15.8GB -> USERDATA

    It is pretty easy to understand indeed, first number after word "primary" is the start offset of the partition, second one is the end.
    You may change those number. But remember that CACHE partition must always be bigger than 50 MBs to store google play apk download. Google stated that google play apk max size is 50 mb, bigger than that will use .obb to help.

    I recommend you to keep OTA size 8 MB, cause I don't know what it does.
    HIDDEN can be shrink up to 5 MB I doubt. I suspect that shrink up to 4 MB can cause issue, I don't know if you set size for 4 MB, will it exceed minimum partition size required.

    However, numbers in red can't be changed, they must be 168MB and 15.8 GB the same.
    And do not change order of partitions, and there must be 5 partitions. You can't remove HIDDEN and OTA, else partition order and number will wrong, and I think a lot of things will break, including recovery.

    After you modified the script. Zip them and put in your phone and flash! :laugh:
    5
    Thread for n7105 here
    http://xdaforums.com/showthread.php?p=53179859

    Ported from @ninekaw9
    All credits to you man [emoji111]

    Sent from my SM-G900F using Tapatalk
    4
    I would really appreciate it sir. Because i live in a place where internet connection is really slow and i cant download big files. Im welling to test for sure. Thanks a ton :)

    try this
    3
    Yes, but if you are going to install touchwiz rom, you have to wipe all userdata and system partition and repartition to system 2 gb again. I once create partition script that has 1 GB system of AOSP and CM based rom, but a person reported to me that he had werid problem. I didnt test it on my own device because I dont have time to backup and restore all data. So I removed that 1 GB system partitioning script.

    lolz, after my post i edited ur script and made my version of it, check out man

    ill update this post after testing it in some time

    -------------------------------------------------------------------------
    EDIT:
    it seems we cannot change SYSTEM size, else the bootloader boots only into download mode, i repartitioned using PIT and used the normal repartitioning script of 1.9GB extra DATA