yashsingh1/xdaforums huggingface dataset:
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Update : Working on T889(T-Mobile) & AT&T GalaxyNote2 too.

Based on [MENTION=839910]ninekaw9[/MENTION] 's original script from here

http://xdaforums.com/showthread.php?p=52989641

I ported this for the N7105.

Please read the post fully before trying this.

This file basically reduces the space assigned to cache and preload partitions and reassigns that extra space to your internal sdcard.

What is preload?

Used for storing Samsung's pre-loaded bloatwares like some wallpapers and "Wonders of Nature" video that you find on your phone after a factory reset or after buying a new phone.

Reducing the cache partition:

Cache basically stores the apps from Google play while they are downloading and the rest of it is used for storing OTA updates.

The OTA updates from Samsung and big in size and hence cache has 1GB of size to store those big updates.

So basically I reduced the cache size from 1GB to 100mb because Kitkat is the last update for Note2 afaik and the phone would be out of OTA service after Kitkat.

Won't reducing cache size break some other things?

No. It won't. As I have still kept 100mb in the cache that would be fine for playstore downloads.

Can I return to stock partition size after doing this?

Yes. Find the .pit file for your device and flash stock firmware through odin alongwith the pit file.

Here is the pit file just in case if you want to go back to stock partition size. Stock_PIT_N7105

What you need to have to Re-partiton

Philz recovery installed (latest version)for t0lte device.

Note that TWRP WONT WORK as it doesn't have some binaries for partitioning.

Nandroid backup or a rom zip file in your external sdcard is a must.

Backup your internal sdcard as it will be formatted in the process.

Procedure :

1.Boot into philz recovery

2.Flash the file which is linked here.

Partition_N7105_16GB_model_only

After flashing the recovery will automatically reboot.

3.Next you will see some mounting errors. Don't worry. Just go to mounts and storage and do this

Format /data

Format /system

Format /sdcard0

Format /preload

Please don't format /boot /modem or /sdcard1.

4. So after formatting it's all done. Now you can restore nandroid or flash a new rom.

5. If you are having issue restoring your nandroid backup then read this post and do exactly what he says

http://xdaforums.com/showthread.php?p=53207492

Note: You can still flash bootloaders and modems from odin after doing this re-partioning. No need to flash with pit file.

However if you want to flash a full rom from odin then pit file is required.

All credits to [MENTION=839910]ninekaw9[/MENTION] and [MENTION=4473547]forumber2[/MENTION] for their original scripts. You guys are awesome ?
[Galaxy Note II N7105 Android Development] smeet.somaiya:
For AOSP users only.

System slimmed down to 1Gb so you get a total of 14.2GB of user available space on your phone.

Download here
[Galaxy Note II N7105 Android Development] G1Master:
I'll have to try this when I get the time to. Thanks for the work.
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Yup. Let me know then.

I will upload the stock pit file in case you need it.
[Galaxy Note II N7105 Android Development] Irwenzhao:
Do u have the link to phliz recovery?

N7105 rocking AOSB with AGNi kernel,

Sent from a small country named Singapore.

Click "Thanks" if I was of any help!
[Galaxy Note II N7105 Android Development] scariola:
Would this be safe on the T889?

I know kernels for N7105 are ok on it, would love the extra space. Not sure if the partition alignments are the same between though.

They are all located here... just go by phone codename. N7105 is tolte I believe as my t889 is toltetmo

http://goo.im/devs/philz_touch/CWM_Advanced_Edition
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Send me the partition table I would have a look at it.

Edit: Here is how to get partition table.

http://xdaforums.com/showthread.php?p=53053335
[Galaxy Note II N7105 Android Development] scariola:
Thanks, after some trial and error this is for toltetmo t889.
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Okay. So after seeing the partiton table I can say that this script will work for tmobile t889 too. :)
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Everybody please see post no. 2
[Galaxy Note II N7105 Android Development] jdstrydom:
Was hoping someone would modify the bloated partitions; going to flash during the morning. Like a boss dude, thanks.
[Galaxy Note II N7105 Android Development] Irwenzhao:
Both links are blocked in China. Jeez gotta hate China ~

N7105 rocking AOSB with AGNi kernel,

Sent from a small country named Singapore.

Click "Thanks" if I was of any help!
[Galaxy Note II N7105 Android Development] Irwenzhao:
OK so... [MENTION=5686657]smeet.somaiya[/MENTION] now that that worked, someone help me figure out why can't I restore my nandroid?!?!?!
[Galaxy Note II N7105 Android Development] Senyaka:
Did you back it up with Philz or TWRP? I'm about to try this. Have you tried flashing a fresh Rom?
[Galaxy Note II N7105 Android Development] Irwenzhao:
I used TWRP. I updated my ROM after partitioning.
[Galaxy Note II N7105 Android Development] Senyaka:
Restoring a backup from TWRP with Philz and vice versa, they usually don't play nice. I'm going to flash TWRP back after doing the partition and see if the nandroid I make works. Have you got a Rom up and running now?
[Galaxy Note II N7105 Android Development] Irwenzhao:
Yes I do. I flashed back TWRP and tried restoring. Doesn't work. D:
[Galaxy Note II N7105 Android Development] Senyaka:
Hmm okay. Well the good news is you have a Rom up and running. Just can't restore your old nandroid. Good to know.

I might do the whole thing, set up a new Rom, Nandroid that, wipe everything clean in recovery, then try restore the nandroid and see what happens.
[Galaxy Note II N7105 Android Development] smeet.somaiya:
If restoring nandroid doesn't work for you guys then you should try nandroid manager app from playstore. It lets you restore the stuff you want from your nandroid backup.

And do remember to format partitons manually after running the script. Format them from philz itself. Otherwise they won't mount.
[Galaxy Note II N7105 Android Development] Irwenzhao:
BTW nandroids that I can't restore are only made on external SD card. Nandroid made on the phone itself work perfectly. Wonders is that help.

P.S. I did what u mentioned a long time ago when something happened to my phone.

N7105 rocking AOSB with AGNi kernel,

Sent from a small country named Singapore.

Click "Thanks" if I was of any help!
[Galaxy Note II N7105 Android Development] Senyaka:
Cheers bro. Thanks for doing this. In the process of doing backups, so will get back to you. :)

---------- Post added at 11:50 PM ---------- Previous post was at 11:48 PM ----------

Good to know. Thanks for the heads up.
[Galaxy Note II N7105 Android Development] Irwenzhao:
Snap. Totally forgot bout that step. Thanks for the nandroid manager reminder. Trying to get the apk from somewhere (anywhere)

N7105 rocking AOSB with AGNi kernel,

Sent from a small country named Singapore.

Click "Thanks" if I was of any help!
[Galaxy Note II N7105 Android Development] Senyaka:
Okay, so I did the thing and it was successful.

However Nandroid i tried with both Philz and TWRP didn't want to load. No biggie for me. But just a heads up for others. Flashed another Rom though and all works sweet. Thanks heaps for this brother!! Muchly appreciated!!!! Will post thanks for you once I get my XDA app back up and running.

Oh and Total storage space on my device is now 13.02GB with 12.72 after fresh flashing a Rom. For those interested in how much new space they shall have. :)
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Good to know. Thanks for the feedback. :)

Maybe you should flash rom again and do a custom restore of only data partition from the recovery. That could work.
[Galaxy Note II N7105 Android Development] Senyaka:
That is a good idea. I might do that. I'm doing this on my second note 2 device and it's my testing phone, so I'm not all that bothered tbh, but with my main device I will keep this in mind. But so far no errors and all is good and right in the world. :D
[Galaxy Note II N7105 Android Development] Senyaka:
Just posting another Update. I've now done this to my main device.

Now just to be clear, I'm running AOSP based roms on both my devices. Willl03 Slimkat and Liquid Smooth Beta 3. TWRP is my recovery of choice.

1: Do usual backups with TB for apps/sms/mms ect or what ever you use to back up your data.

2: Move or copy all your internal storage stuff you want to keep to either your external SD or computer

3: Boot into TWRP and do a full backup of Rom to external SD card

4: Once backup is done flash Philz recovery and boot back into recovery.

5: In Philz recovery do full factory reset and choose Install a new Rom option.

6: Flash the repartion Zip. MAKE SURE YOU HAVE THE RIGHT ONE. DOUBLE CHECK OP!!

7: Let it reboot and FOLLOW ALL THE STEPS IN THE OP

8: After doing so, redo step 5.

9: Flash TWRP and reboot into recovery.

10: Do full wipe with TWRP which includes Full factory reset/cache/dalvik/internal storage.

11: Choose to restore your TWRP backup.

12: Profit.

Keep in mind this worked for me. You may not need to do all the steps mentioned, but to safe and totally sure for myself I did so, and it worked.

As the OP states though, BACKUP everything. You WILL loose everything in your internal storage.

A huge thanks to [MENTION=5686657]smeet.somaiya[/MENTION] for bringing this to our device.

As stated before with both my devices I have 13.3GB free after doing so. So this is always a win.

As for some questions people may ask, Folder mount will work just fine as long as you have a TB backup of the app and all your settings. For me this was my biggest concern and everything works great. You can access everything with your file manager. And no errors have popped up for myself.

Enjoy flashing. This is well worth it for our device.
[Galaxy Note II N7105 Android Development] mataflakitas:
This work in mine i317 att note 2 ...?
[Galaxy Note II N7105 Android Development] smeet.somaiya:
You need to get me the partition table of your AT&T N2. Read post no. 7 and 8 about the details on how to get partition table.

Okay thanks for letting me know. Will link up your post on OP so it would be helpful for others who want to restore a nandroid.
[Galaxy Note II N7105 Android Development] Senyaka:
Thanks heap bro. I did a re-write of my method so it made more sense.
[Galaxy Note II N7105 Android Development] Irwenzhao:
Backups to external SD card never work for me, but it might be fixed on newer versions.

N7105 rocking AOSB with AGNi kernel,

Sent from a small country named Singapore.

Click "Thanks" if I was of any help!
[Galaxy Note II N7105 Android Development] Senyaka:
This could also be dependant on a couple things too. Whether or not you are running the latest TWRP. Or if your SD card is corrupted. I've had issues with both of them in the past.

I'm now using the latest TWRP 2.7.2. The last TWRP that backup worked for me was version 2.6.3.1. In my experience even though TWRP is the easiest recovery to work with, it can be more problematic to use than Philz at times.

But, if you are also have constant fails backing up to the external, reformat your micro SD and then try again. That fixed it for me.

Alternatively you could also back your Rom up to a USB using an OTG cable as this TWRP recovery allows you to do so. This has saved me a few times in the past too.
[Galaxy Note II N7105 Android Development] Irwenzhao:
Yea my twrp is outdated. Stupid me... I can backup to sd card, just that whenever I restore, no data is actually restored.
[Galaxy Note II N7105 Android Development] Irwenzhao:
Bump. This is getting inactive. Shouldn't this be pinned? It's easy to use and it's extremely useful.

N7105 rocking AOSB with AGNi kernel,

Sent from the "China who bans Google"

Click "Thanks" if I was of any help!
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Yup I too think the forum moderators should pin it up. It will be useful for people :)
[Galaxy Note II N7105 Android Development] Senyaka:
Bumping this again.
[Galaxy Note II N7105 Android Development] Irwenzhao:
I'm surprised by the amount of people who wants to repartition their devices. It's so simple lol. (Practically zero chance of getting device bricked)

N7105 rocking AOSB with AGNi kernel,

Click "Thanks" if I was of any help!

How to troubleshoot a failed ODIN flash?
[Galaxy Note II N7105 Android Development] scariola:
I think that if this was posted in the T Mobile Note II forum, you would have more input, and more happy users. Seeing as I checked my partition table with smeet.somaiya and he said the phones partition tables match with N7105.

If any ATT Note II users can grab their partition tables to see if they are compatible, then you'd have 3 groups of users thanking you. :)
[Galaxy Note II N7105 Android Development] Irwenzhao:
Probably more if we were to port this to other phones

N7105 rocking AOSB with AGNi kernel,

Click "Thanks" if I was of any help!
[Galaxy Note II N7105 Android Development] smeet.somaiya:
I don't know where to get the partition table for AT&T. Would be great if someone could provide it.

And is there a seperate forum for T-mobile note2? I will surely post it there then.
[Galaxy Note II N7105 Android Development] Senyaka:
There sure is bro.
[Galaxy Note II N7105 Android Development] scariola:
Just as a note for t889. I tried to revert back the partition for ****s and giggles, unfortunately I was not successful in getting the N7105 or my own pit file to successfully repartition the phone.

In odin it gets stuck at get mapping for partition. It got stuck in the boot screen even after I odin'd the stock image and factory reset in recovery, simply odin'd back twrp recovery and restored my backup and thankfully back to where I was.

Any options for successful pit flashing? Tried other versions of odin, different usb ports, conputer, the whole troubleshooting steps. Not worried about the extra space I gained, just like to let people know they may have an issue going back to stock partition.

But just here saying im having problems reverting back my partition for any others interested in this mod.
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Are you sure that you ticked re-partition while flashing stock firmware with pit file?

Because if you did that then first the pit would be flashed and odin won't say "Get pit for mapping"
[Galaxy Note II N7105 Android Development] scariola:
Yes I am sure I tried it that way. With odin 3.07 its gets stuck at where you said. odin 3.09 just fails when pit file is placed with stock rom.
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Okay. I will make a flashable zip for stock partitions, when I get free time.

By the way created a new thread in T889 forum.
[Galaxy Note II N7105 Android Development] scariola:
Gotta love those flashable zips. Makes life so easy. [emoji4]

Take your time, I really appreciate your help and support. So easy to flash your mod through recovery, soon we will be able to use another zip to unflash from recovery. Huzzah!

Just like to be a guinea pig and thanks for the 357 extra songs I can store with the freed space.
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Reverting back to stock partitions is easier now.

Just flash this zip [emoji16]

https://www.dropbox.com/s/8fki6jyi3bpr1ww/Stock_Partitions_N7105_T889.zip

For N7105/T889 both.
[Galaxy Note II N7105 Android Development] kforkai:
Hi, whats the difference between this partition and the n7105 16gb above?
[Galaxy Note II N7105 Android Development] Irwenzhao:
The system partition has been reduced to 1GB.

N7105 rocking AOSB with AGNi kernel,

Click "Thanks" if I was of any help!
[Galaxy Note II N7105 Android Development] Senyaka:
Bumping this again, because Reasons.
[Galaxy Note II N7105 Android Development] peterhugelberg:
Did anyone try the zip to revert to stock partition Table on international N7105?

Im intrigued to try it but im not sure if there is a safe way to revert it without odin/kies (not sure if i can use that without updating my bootloader and not sure if there is a linux version for it)
[Galaxy Note II N7105 Android Development] smeet.somaiya:
You can flash stock rom wid pit file to revert to stock partitions. But odin can be risky if the connection gets unstable. Flashable zip is the safest way.
[Galaxy Note II N7105 Android Development] J. Terrell:
Here's the at&t i317 partition table.

Model: MMC MAG4FB (sd/mmc)

Disk /dev/block/mmcblk0: 15.8GB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Number Start End Size File system Name Flags

1 4194kB 8389kB 4194kB BOTA0

2 8389kB 12.6MB 4194kB BOTA1

3 12.6MB 33.6MB 21.0MB ext4 EFS

4 33.6MB 37.7MB 4194kB m9kefs1

5 37.7MB 41.9MB 4194kB m9kefs2

6 41.9MB 46.1MB 4194kB m9kefs3

7 46.1MB 54.5MB 8389kB PARAM

8 54.5MB 62.9MB 8389kB BOOT

9 62.9MB 71.3MB 8389kB RECOVERY

10 71.3MB 164MB 92.3MB fat16 RADIO

11 164MB 432MB 268MB ext4 TOMBSTONES

12 432MB 1774MB 1342MB ext4 CACHE

13 1774MB 3653MB 1879MB ext4 SYSTEM

14 3653MB 3674MB 21.0MB ext4 HIDDEN

15 3674MB 3683MB 8389kB OTA

16 3683MB 15.8GB 12.1GB ext4 USERDATA

(parted)
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Okay so after seeing the partition table I can say that this script will work on At&T too.
[Galaxy Note II N7105 Android Development] KNIGHT97:
Saw this just now....great work here.

I would be trying to do this (I know this is for N7105, I'll find one for N7100 myself :D )

And by the way, if it is possible try reduci g the size of /system partition as well. After removing the useless apps and unneeded VODB, I have around more than 500 mb free space in /system and it is fmgoing waste :(

Sent from my RPG with auto targeting
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Dude, I thought you know about this.

The original one was for n7100 only made by [MENTION=839910]ninekaw9[/MENTION]

I ported it for n7105, t889 and at&t on user requests.
[Galaxy Note II N7105 Android Development] KNIGHT97:
I know that thisbis for N7105....I already wrote that I'll get the one from N7100 thread...and then flash it. I'll request the /system partition shortening to them.

Sent from my RPG with auto targeting
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Okay. Tell me what size system partition do you want? I will make it. :)
[Galaxy Note II N7105 Android Development] R0B3RTF1SH3R:
does this work on CM roms?
[Galaxy Note II N7105 Android Development] smeet.somaiya:
See second post.
[Galaxy Note II N7105 Android Development] KNIGHT97:
1.72 GB for /system partition. No cache reduction and preload the same as in OP.

I won't reduce /cache becuase I have some heavy games like Asphalt 8 and RUA2.

Sent from my RPG with auto targeting
[Galaxy Note II N7105 Android Development] smeet.somaiya:
The heavy games don't use cache for anything
[Galaxy Note II N7105 Android Development] KNIGHT97:
So if it is fine, 200mb cache partition for me, I would still prefer a safer side and this is the minimum /cache partition space I would keep myself to.

Sent from my RPG with auto targeting
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Okay. Good. Your script would be ready by tomorrow. ;)
[Galaxy Note II N7105 Android Development] G1Master:
Sorry OP I meant to reply once I did install this awesome MOD!

It works perfectly and I get about 13.2 Gigs after a fresh Rom install!

You da man!

Thanks for the work!

Ill send some thanks to the Original mod maker too!

Sam
[Galaxy Note II N7105 Android Development] MIG_30:
dont know what i am doin wrong because i am only getting 11.31gb free space. dont know if it is because im using a touchwiz rom.

can anyone help, aready flashed 4 times always same result.
[Galaxy Note II N7105 Android Development] Tweak32:
Did you do the steps to reformat?

Having my own problem here.

I am looking at the script for AOSP and it clearly is creating a 14.2 gig partition for USERDATA

but I am only getting 13.3gig

only thing I can find that isnt exactly like in the OP steps is that I have no option to format sdcard0 I have an option in Philz to "format /data and data/media (sdcard)"

So I did that and everything seems usable, but its odd... should definitely be 14.2 gig not 13.3...

I am on Philz 6.41.6 the latest on Goo.im
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Sdcard0 and data media is the same. And will have a look into why you're getting only 13.3Gb.
[Galaxy Note II N7105 Android Development] jayjay1234:
HELP?

I’ve somehow lost my internal sdcard partition during a odin flash back to stock. Now my recovery isn’t able to mount it because there’s nothing there. Is there a way to create an internal sdcard partition in android or a recovery script that can to it?

I really have no place to look so hopefully can give me some incite here.

Thanks!

ATT sgh-i317
[Galaxy Note II N7105 Android Development] jdstrydom:
On page 5 or 6 is a zip that recreates your original partitions via recovery, or get the pit file at the top of the thread and flash via odin.

Here's the zip

http://xdaforums.com/showthread.php?p=53329446
[Galaxy Note II N7105 Android Development] jayjay1234:
OK I'll give it a try.
[Galaxy Note II N7105 Android Development] jdstrydom:
Reboot recovery after you flash the zip and format internal sd, cache, system and preload. You might have to reboot recovery again before flashing rom for /data to be available.

If you still have the issue, use the pit file I mentioned and in odin select the file at the pit file option. Flash then, reboot recovery and format mentioned partitions, reboot recovery and flash rom.

If someone more knowledgeable than me can jump in to verify what I said, since I'm on t0lte.

Good luck
[Galaxy Note II N7105 Android Development] jwayne001:
Would be great if this can be done on sgh-i317m note 2?
[Galaxy Note II N7105 Android Development] J. Terrell:
This works great on my i317.
[Galaxy Note II N7105 Android Development] andrew.mackew:
Should I flash this if I am using Omni rom?

Thanks
[Galaxy Note II N7105 Android Development] smeet.somaiya:
I don't know if Omni rom uses /preload or not. You can ask this at the rom thread.

You can flash this if omni doesn't use /preload.

If it uses preload then let me know.
[Galaxy Note II N7105 Android Development] andrew.mackew:
Thanks for your prompt answer. I wonder if is safety to reduce the system partition. Theoretically it will put a limit on which rom I will install later correct? I mean, If I wanna flash a modded stock rom, it will probably gonna fail, is that correct?
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Yes. But you can flash stock or modded stock because stock roms use preload.

If you wanna flash stock rom you should flash it along with PIT file on odin.
[Galaxy Note II N7105 Android Development] Senyaka:
Bumping this again, because I don't believe people understand how useful this really is.
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Exactly. 2GB extra space is like wow for me. And that too via a flashable zip.
[Galaxy Note II N7105 Android Development] shoeprano27:
Well, this looks just about right, eh? Thanks a lot, OP. You're an intelligent individual.

Running latest SOKP as of today. PA Mimi Gapps (8/04 build). Agnes Kernel.
[Galaxy Note II N7105 Android Development] mpower91:
Amazing! Increased my storage by simply flashing a .zip file :laugh:

Nice work, props to the dev :good:
[Galaxy Note II N7105 Android Development] Unknownkj:
Is this a one time flash or I need to reflash after a clean wipe?
[Galaxy Note II N7105 Android Development] KNIGHT97:
Just flash once, will persist between all Roms.

And if you ever want the original distribution back, just Use ODIN and flash your .pit file

Sent from my RPG with auto targeting
[Galaxy Note II N7105 Android Development] smeet.somaiya:
Glad that you guys loved it :)
[Galaxy Note II N7105 Android Development] shoeprano27:
And of course. Can't forget the homie [MENTION=5148951]Senyaka[/MENTION] for helping/guiding me!