Based on @ninekaw9 's original script from here
http://forum.xda-developers.com/showthread.php?p=52989641
I ported this for the N7105 and T889
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.
Or if you want a flashable zip for returning to stock partitions see post #2
What you need to have to Re-partiton
Philz recovery installed (latest version)for t889.
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/T889_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://forum.xda-developers.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 @ninekaw9 and @forumber2 for their original scripts. You guys are awesome ?
Sent from my GT-N7100 using Tapatalk
Reverting back to stock partitions is easier now.
Just flash this zip
https://www.dropbox.com/s/8fki6jyi3bpr1ww/Stock_Partitions_N7105_T889.zip
Sent from my GT-N7100 using Tapatalk
Before
Sent from my GT-N7105 using XDA Premium 4 mobile app
After
Sent from my GT-N7105 using XDA Premium 4 mobile app
adamcooks said:
After
Sent from my GT-N7105 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Are you on 4.3 bootloader?
On 4.1.2 bootloader I get 11.97GB
Are you running AOSP? Did you use the zip file for AOSP from the second post?
I run w03slimkat, the AOSP zip also reduces system partition to 1g
I don't know if it matters, I am on 4.1 bl.
smeet.somaiya said:
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
Sent from my SM-G900F using Tapatalk
Click to expand...
Click to collapse
Sent from my GT-N7105 using XDA Premium 4 mobile app
adamcooks said:
Are you running AOSP? Did you use the zip file for AOSP from the second post?
I run w03slimkat, the AOSP zip also reduces system partition to 1g
I don't know if it matters, I am on 4.1 bl.
Sent from my GT-N7105 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Gotcha. Looked at your screen again and definate AOSP rom. I seen about the other partition for AOSP download but it would be too small for touchwiz base.
Thanks though, now I realized how you got more space.
Sorry guys, forgot to add the AOSP thing here. But it's there on n7105 thread. I will add it here when I get time.
By the way it doesn't matter what bootloader you have. The partitions and their name and size remain the same irrespective of the bootloader.
Sent from my GT-N7100 using Tapatalk
Outstanding work. Thank You.
Sent from my GT-N7105 using Tapatalk 2
Hi noob here I flashed the repartition zip a few months ago and recently I was messing with my phone trying to convert to f2fs and got stuck in a recovery bootloop so I had to Odin back 2 stock but forgot about the pit file I needed when flashing with Odin and now no matter what I do I can't get /cache to mount at all anymore. I am using twrp 2.8.1 as current recovery at the time I was using Phil's. Any ideas on how I can get /cache to mount?
Any help would b appreciated.
I was thinking of flashing the stock partition zip but I don't think it will do anything since /cache is not mounted.
ntran239 said:
Hi noob here I flashed the repartition zip a few months ago and recently I was messing with my phone trying to convert to f2fs and got stuck in a recovery bootloop so I had to Odin back 2 stock but forgot about the pit file I needed when flashing with Odin and now no matter what I do I can't get /cache to mount at all anymore. I am using twrp 2.8.1 as current recovery at the time I was using Phil's. Any ideas on how I can get /cache to mount?
Any help would b appreciated.
I was thinking of flashing the stock partition zip but I don't think it will do anything since /cache is not mounted.
Click to expand...
Click to collapse
You are going to have to ODIN all the way back to a rooted stock.
BRANDENDEUCE said:
You are going to have to ODIN all the way back to a rooted stock.
Click to expand...
Click to collapse
Hi thanks for reply i did odin back using a a stock injectected rom by mr robinson. after i did that it would boot into recovery like usual and i would try to factory reset because of mounting errors but even after factory reset i still get the same errors. I then would install a twrp via odin and flashed a backup i had was the only way to get phone working but /cache still not able to mount. I honostly dont know what I am doing wrong.
Related
I we been on wanam lite 2.1 and note 2 core OC kernel when my phone died for a while when my phone died.
My note is dead and refusing to boot.
Tried reflashing with standard kernel.
lite wipe/full wipe with zoots wipe script.
Delete cahe and dalvik.
tried flashing 4 different kernels.
and several roms.
Tried formating everything.
Tried backup from ex sd card.
Tried flashing new stock rom via odin.
And either It stops on samsung logo, or with no screen at all. only boot sound. Or most of the times on android is starting aps logo.
Please help me im short on alternatives now.
If i send it in to service it will take 3 to 5 weeks and I will probably get into problems considering my custom bianary count is at 1.
:crying::crying::crying::crying:
Try going into recovery cwm see if data can ve mounted. If it fails u have to flash stock rom with pit file to repartition.
Sent from my GT-N7100 using xda premium
hayabusa08 said:
Try going into recovery cwm see if data can ve mounted. If it fails u have to flash stock rom with pit file to repartition.
Sent from my GT-N7100 using xda premium
Click to expand...
Click to collapse
Tried remounting data . But it didnt help.
Please explain me how to flash rom with pit file to repartition.
The stock rom im using is from sammobile and is the newest official stock rom available for rom for n7100-
thanks
and happy new year btw
When u tried to mount data is it successful? Try reformat data see if it could format the partition. PIT file should be the last resort. If mount data and format data is successful then i doubt u need repartition.
Happy new year to u too.
Sent from my GT-N7100 using xda premium
---------- Post added at 05:16 AM ---------- Previous post was at 05:08 AM ----------
http://forum.xda-developers.com/showthread.php?t=1927983
Thats the link for the pit file. Unzip it.
On odin there is 2 ticks, select repartition, select pit file, under pda select stock rom file and flash. See if it works. Mine had the same issue last week. Tried to mount and format data unsuccessful. Flashed the pit together with stock rom 4.1.2 dlk7 and it booted up.
Sent from my GT-N7100 using xda premium
I was wondering about if and how i can turn my nandroid backup into a flashable zip.
Im sure there is a way...
Does anyine know how to do this?
Sent from my GT-S5660 using xda app-developers app
DevWithCookies said:
I was wondering about if and how i can turn my nandroid backup into a flashable zip.
Im sure there is a way...
Does anyine know how to do this?
Sent from my GT-S5660 using xda app-developers app
Click to expand...
Click to collapse
Yes, this is possible. Moved your backup to your pc, date got changed and md5 sum wasn't correct anymore?
You'll have to consider if you want it though. If your files get corrupted, there is no checksum and you'll flash corrupted files (bad...).
Furthermore, the flashable zip will be the size of your nandroid backup, 500 mb or something like that.
But yes, it can be done:
Navigate to your Backup on your pc
extract data.ext4.tar, system.ext4.tar, cache.ext4.tar, sd-ext.(something).tar and .android_secure.vfat.tar to corresponding folders (I recommend using 7-zip for this).
Put these folders together with boot.img in a seperate folder
Now if you know how to write an updater script, write one that formats all your partitions and extracts these folders to their corresponding partitions.
If not, you might want to take a look at this thread: http://forum.xda-developers.com/showthread.php?t=936175
Or you can use the script that I just wrote for you
If you choose to use my script, the filesystems from your nandroid backup have to be ext4. The script formats you partitions as ext4!
If your backup contains rfs format (data.rfs.tar), the backup is from your stock rom. That will make things more complicated. Pm me if that is the case and you want help with that.
Now to use my script, do the following:
Extract the zip file from the attachment
Put the content from the folders from your backup in the foldes from my zip file, together with boot.img from the backup.
Put all the folders (including META-INF) and boot.img in a zip file. (Using 7-zip will give you better compression then default windows)
Sign the zip file (I reccomend the android app zipsigner, or google for auto-sign)
Put the zip file on your sdcard and go in recovery.
Make a backup just in case.
Edit: Do not wipe system before flashing! The script requires busybox. The script will do the wipe. You can wipe data, cache etc. before flashing if you want.
Flash the zip file.
If everything went well, your backup should be restored.
Please note the following:
The filesystem from your backup should be ext4.
You should format your sd-ext to the right format yourself.
Flashing this script without putting your files in will either give an error (because not signed), or wipe your entire phone.
Ofcourse, use my script at your own risk.
I hope this helped. Good practise for me atleast with writing updater-scripts
Thx for the help !
It's a stock backup i'm trieing to do this from.
I'm only doing this to try understand how android works a bit more.
So you say something bad happens when files get corrupted, bad like in hard-brick?
No, not like hardbrick. Chances of files getting corrupted are very slim, and in the worst case your ROM won't boot. (I even doubt that will ever happend.) Just said it because you cannot check checksum with flashable zip, and restoring nandroid normally would.
But since this is stock ROM, my script won't work. The filesystem of your partitions is now (probably) ext4. Samsung stock ROM uses RFS format. And it is not possible to format partitions as RFS in recovery. You'll need to flash a stock ROM with odin first.
Then you can wipe the partitions and restore your backup files. (Not with the script from my previous post).
Sent from my GT-S5660
I formatted it to ext-4 with a zip from recovery, aren't there any rfs formatters? I havr rfs+ext cwm.
Sent from my GT-S5660 using xda app-developers app
DevWithCookies said:
I formatted it to ext-4 with a zip from recovery, aren't there any rfs formatters? I havr rfs+ext cwm.
Sent from my GT-S5660 using xda app-developers app
Click to expand...
Click to collapse
No, unfortunately not. Ext4 is a widely used linux filesystem, and you can format your partitions easily as ext4 with a zip in recovery.
Since RFS is a samsung specific file system, going back is not that easy.
The only thing thing that can format your phone's partitions back to RFS, is Odin (as far as I know).
You'll have to flash a stock ROM with Odin, then your partitions will be RFS again. (You might have to flash it 2 times if the first time doesn't work properly).
After that, you can flash cwm again (rfs+ext version), and restore your backup.
Stock ROM's can be found on http://www.sammobile.com.
I hope you took a note of your PDA and CSC?
(Otherwise you'll have to download one based on your country, and I think then remove the csc.rfs file, but I'm not sure about that.)
Instructions about flashing with odin can be found here:
http://forum.xda-developers.com/showpost.php?p=16979859&postcount=549
You need the instructions for single package .tar
Links there are dead though, so here you can find links to odin, and GIO_v1.0.ops (you need both), and ROM downloads can be found here too:
http://droidangel.blogspot.nl/2011/05/samsung-galaxy-gio-s5660-original-stock.html
You need to have samsung KIES installed, but not running. (Or at least have drivers installed).
When you successfully flashed back a stock ROM, you can reflash cwm and restore your backup.
What are Pda and csc?
Sent from my GT-S5660 using xda app-developers app
DevWithCookies said:
What are Pda and csc?
Sent from my GT-S5660 using xda app-developers app
Click to expand...
Click to collapse
CSC is your baseband I believe and PDA is which stock ROM there was on your phone.
When you buyed your phone, there was a stock ROM on it specifically for your country/carrier.
When on stock ROM, you can check all the codes you need by dailling *#1234#. On custom ROM that's not possible.
Check in about phone, under baseband version. This should still be the same as on stock (in my case it is atleast).
The code found here is the same as the code after Phone on this site I sent you in my previous post:
http://droidangel.blogspot.nl/2011/05/samsung-galaxy-gio-s5660-original-stock.html
But this will still leave you with more than 1 option.
There should be no problem flashing a ROM from another country, as long as your device is carrier unlocked (carrier restriction free),
and your phone is S5660 (not S5660M, S5660L or V).
I'd suggest taking note of your baseband version under about phone, and search for a ROM from your country with that code after "Phone:" .
(On sammobile.com or the other site).
As far as I know, your PDA doesn't really matter, CSC does.
When your phone is S5660M etc. , or carrier locked or something like that, I think you have to unpack the tar and remove csc.rfs, but I'm not sure about that.
I was very nervous about flashing my phone so i did EVERYTHING i could do to backup data.
I have 2 nandroid backups and I copied all info from about phone to my pc + all the info third party apps could give me.
So i still have my Pda and csc.
The only thing i dont have is a /efs backup. I think im good.
Im kinda nervous about working with odin too...
Will it reflash recovery too?
Sent from my GT-S5660 using xda app-developers app
DevWithCookies said:
I was very nervous about flashing my phone so i did EVERYTHING i could do to backup data.
I have 2 nandroid backups and I copied all info from about phone to my pc + all the info third party apps could give me.
So i still have my Pda and csc.
The only thing i dont have is a /efs backup. I think im good.
Im kinda nervous about working with odin too...
Will it reflash recovery too?
Sent from my GT-S5660 using xda app-developers app
Click to expand...
Click to collapse
Flashing stock rom with odin will replace ur custom recovery to stock recovery and also remove root!
Sent from my GT-S5660 using xda app-developers app
you can remove recovery.img inside it.
Sent from my GT-S5660 using xda app-developers app
So back to the original question,
something you flash from recovery basically contains a boot image, a cache thing, a sd-ext thing and a data thing?
That's all there is to it?
That's pretty easy then.
But why does it affect data cache and sd-ext?
Is that only to format it to ext-4? Because it gets wiped right?
Sent from my GT-S5660 using xda app-developers app
Im using twrp recovery, can i format my internal storage without bricking my device? I will still have access to download mode, and recovery?
Sent from my SM-N900T using xda app-developers app
Also in twrp recovery we have 2 options to "wipe internal storage" or "format internal storage" isn't that the same?
Sent from my SM-N900T using xda app-developers app
Yes you will still have access to DL mode and recovery.
Sent from my SM-N900T using XDA Premium 4 mobile app
Thank you for your reply, i still wonder what's the difference between wipe and format? I should be able to flash a rom through recovery after wiping and formating?
Sent from my SM-N900T using xda app-developers app
wipe - deletes everything on internal storage preserving partition structure
format - recreates internal storage partition from scratch so to say
Usually wipe is more safe, format might end up with corrupt partition structure if something goes wrong
And NO, you cannot flash ROM after wipe/format unless ROM zip is on your external storage.
Thank you nejil8. I will try to flash this rom http://forum.xda-developers.com/showthread.php?t=2468083 because when i try, it boot loops in the very first logo screen it wont go past the very first logo. Ironically, I have installed darthstalker rom several times with no problem.
I always wipe
-cache
-dalvik cache
-system
-data
I will try wiping "internal storage" and see if it boots up. Thank you for your help.
I forgot to mention im using twrp 2.6.3.2 not the latest version. Sometimes i wonder if that's causing the boot loop at very first logo.
Sent from my SM-N900T using xda app-developers app
christisnfermin said:
I forgot to mention im using twrp 2.6.3.2 not the latest version. Sometimes i wonder if that's causing the boot loop at very first logo.
Sent from my SM-N900T using xda app-developers app
Click to expand...
Click to collapse
It's very important to update to the latest twrp. I'm not sure how old your version is
sent from my ??????? note 3?
christisnfermin said:
Thank you nejil8. I will try to flash this rom http://forum.xda-developers.com/showthread.php?t=2468083 because when i try, it boot loops in the very first logo screen it wont go past the very first logo. Ironically, I have installed darthstalker rom several times with no problem.
I always wipe
-cache
-dalvik cache
-system
-data
I will try wiping "internal storage" and see if it boots up. Thank you for your help.
Click to expand...
Click to collapse
Update your recovery, flash the ROM and see this for fixing bootloop. Wiping internal storage wont help.
Use adb to push all files needed to /sdcard and have them available for flashing in recovery.
Thank you to all that were helpful. I decided to go back to stock using this method how to unbrick unroot NOTE 3 I was able to enable unlimited native tethering and rerooted and install this amazing program Xposed framework (you can record calls an many many more tweaks. I don't really need a custom rom, i mainly wanted unlimited tethering that's all. I also have Next launcher 3D NEXT laucher 3D is SICK. I don't need anything esle. That launcher is a major GO.
OK so recently I formatted my data on internal memory and when I went to reboot my phone it wouldn't go past the galaxy s4 screen! So I reboot into recovery and tried wiping cache and dalvick but nothing worked to get me past the s4 screen so I rebooted back into recovery and did a clean flash of the I'm using and everything seemed ok got my phone all setup again but when I try to just do a simple reboot it still won't go past the s4 screen?!? The only thing that fixes it is clean flashing my ROM again I'm not sure what is going on but I would just like to be able to reboot my phone! Any help would be great!!
You mean you formatted your internal SD?
Sent from my Galaxy S4
Formatting internal SD may have mess up your partitions, boot img may be no good or missing.
Pp.
Sent from my SGH-M919 using XDA Premium 4 mobile app
PanchoPlanet said:
Formatting internal SD may have mess up your partitions, boot img may be no good or missing.
Pp.
Sent from my SGH-M919 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
If this is the case, using Odin to restore to complete stock should fix it as it will include teh pit file that restores the partitions.
That's right what Skipjacks said.
Pp.
Sent from my SGH-M919 using XDA Premium 4 mobile app
Skipjacks said:
If this is the case, using Odin to restore to complete stock should fix it as it will include teh pit file that restores the partitions.
Click to expand...
Click to collapse
Yea its weird the only way I'm able to Reboot my phone is I have to boot into recovery then wipe cache and it'll reboot fine but at the moment i don't have a computer to fix it so I just gotta deal with it and also the only way to flash a new ROM is by formatting internal SD again and clean flashing to get it to flash right
Guys, i have a problem:crying:, i created a partition on my phone but i don't know how to remove it. The partition I created is in Internal Storage. When I Install a rom and load my apps, its says in the storage menu that i have 2 internal storage. first storage is where my rom is installed and where my apps are being installed and the second storage(both storage are internal) is accessible but it seems to act like a external storage. i would like them to me merged together as one storage.
I'm using SGT-989 T-Mobile Galaxy S2
Rom is [4.4.4] Stable CyanogenMod 11 [December 1, 2014] by Sultanxda ------ just in case if the rom has to do with anything
Thanks you for your support guys:good:
You're going to want to search the forum for the .pit file for your model. Read ALL the instructions, as messing with the partitions can really mess you up. Flashing it in Odin should restore your partitions, then you just flash a rom.
You might also try just flashing back to stock. That might fix your partitions as well. I'm not too sure about the T989, if that'll work or not. I had a different phone once that would fix the partitions when flashing to stock, you might get lucky.
As always, the search tool is your friend.
Sent from my SAMSUNG-SGH-T989 using XDA Free mobile app
Is it any .pit file that's just for this device? Or a special .pit file?
Sent from my SAMSUNG-SGH-T989 using XDA Free mobile app
Make sure it's for your phone model. The .pit is the partition information table. It contains the info for your partitions (how many, how large they are, etc.)
Try using Odin to flash back to the factory image, search the sticky in the development section for instructions. The factory image may or may not have that information built into it. If you flash factory and that doesn't fix it, you'll need to find the pit file and flash it in Odin to get your partitions back the way they're supposed to be. I would then recommend going back to factory before trying any more custom roms, just to make sure you're starting with a clean slate.
Sent from my SAMSUNG-SGH-T989 using XDA Free mobile app
I think i know the problem
DarkMatter_74 said:
Make sure it's for your phone model. The .pit is the partition information table. It contains the info for your partitions (how many, how large they are, etc.)
Try using Odin to flash back to the factory image, search the sticky in the development section for instructions. The factory image may or may not have that information built into it. If you flash factory and that doesn't fix it, you'll need to find the pit file and flash it in Odin to get your partitions back the way they're supposed to be. I would then recommend going back to factory before trying any more custom roms, just to make sure you're starting with a clean slate.
Sent from my SAMSUNG-SGH-T989 using XDA Free mobile app
Click to expand...
Click to collapse
Well thanks for the help. I've restored to the factory image and it put back the partition. But when i installed the custom rom, it created two internal partitions. Its the roms fault.