yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy S II SGH-I777] edwin270:
This guide is to help those who may want to have more data storage including system partition for much more.
​

NOTE: DOING THIS WILL DEFINITELY VOID WARRANTY AND ANYTHING THAT HAS TO DO WITH IT. I WILL NOT BE HELD LIABLE SHOULD

ANYTHING GO WRONG.

THERE HAS BEEN REPORTED SUCCESS SO FAR BUT SHOULD YOU END UP WITH AN EXPENSIVE PAPERWEIGHT, THAT IS YOUR OWN DOING. PROCEED WITH CAUTION.....YOU ARE WARNED.​

I HAVE PERSONALLY DONE THIS WITH SUCCESS. BELOW IS IMAGES AFTER I AM DONE WITH EVERYTHING.​

PRE-REQUISITE​

PATIENCE.............LOTS OF IT INCLUDING A STONE COLD HEART TO GO THROUGH THIS

A samsung S2 (i777/attain......to be more precise)

Backup, Backup, Backup...........that includes the phone internal memory.

Acceptance to loose everything stored in the phone internal memory.....if you need them, perform the step above.

A couple of files which i have provided the links to in the procedure and also below the post. Please use only what is provided here. Thanks.

PROCEDURE ​

1. Enter download mode (NOT through the reboot menu.)

Rather, hold in volume up and down and then while doing so plug in the usb cable to the phone from the computer.

2. Use Odin to install the full Samsung UCMD8 release (Already has pit file).

3. Flash the downloaded stock rom above using Odin.

4. Reboot to recovery and factory reset when done.

5. Boot device, install framaroot, enable usb debugging before rooting device.

6. Install mobile odin. Reboot.

7. In mobile odin, install new kernel w/ recovery (since this method is for i777, you can use Shift kernel....which i used, need to extract only the "zImage.img" file from the .zip file, if file is named something else rename it to "zImage" and place it on the device for Mobile Odin to read.

8. In Mobile Odin, install the modded .pit file attached below. Thanks to [-Stash-]

Read more about the partitions here and here.

NOTE: Using odin for pc for STEP 8 is also very much working.....espercially for those having issues flashing pit file with the mobile odin version.

9. Reboot to recovery; format / wipe partitions (this includes system, data, internal sd, cache, dalvik).

10. If internal cannot format or gives error, connect phone to pc and mount storage, you can then format as fat32 from windows or whatever operating system you are using (recommended system). When done, unmount and try step above again just to be certain.

11. Flash any new ROM of choice (I use SlimSaber by Cyril279), Gapps (I use slim full gapps:D,) modem for AOSP roms (I used UCMD8, works best for me but may not be the same for your location, please use what works best for you), and any other addon packages.

12. Optional........enable ART runtime in developer options. Reboot, and wait a long time for it to compile apps ahead of time.

13. Just enjoy :good::D:good:

Another link for my personal files used(same as those here)

CREDIT IN NO PARTICULAR ORDER​

Gabes Dad............................... for most of the guide and also making me take the dive.

Cyril279

Chainfire

RockRatt

mtpi

[-Stash-]

alephzain

creepyncrawly​
[AT&T Samsung Galaxy S II SGH-I777] DanViolaMan:
Mobile Odin .pit file

Great guide and idea! Thanks for your work!

I'm having trouble at step #8, Using Mobile Odin to install the modded .pit file.

I can't get Mobile Odin to see the .pit file, either as provided, in the .rar container, or as the bare .pit file.

I saw in the posts on this by [-Stash-], which you reference, that regular Odin was used to install the .pit file.

I've read elsewhere that Mobile Odin can't work with .pit files, but I gather you have found a way.

Your guide worked great up until #8, and also after #8.

I was able to continue on and install a great KitKat rom, TheGeekyNimrod's new Unofficial Carbon Rom and the RB-Shift kernel, just without the new partition sizes.

Thanks again for posting this guide, and doing the work necessary to come up with it. I'm looking forward to this better partition scheme.

I would be grateful for any help you could provide.
[AT&T Samsung Galaxy S II SGH-I777] kahran:
I would imagine you could still use regular ODIN for step 8, just put the phone back into download mode. Take this with a grain of salt as this is just a guess.
[AT&T Samsung Galaxy S II SGH-I777] edwin270:
Sorry for the late reply............using odin to flash in download mode also works perfectly. the pit does not harm in anyway (at least for me so far).

When done with pit flash in download mode,.............wait for for a minute or two.

Boot to recovery and format all partitions including internal. Had to mount internal partition and format with pc.

Hope this helps
[AT&T Samsung Galaxy S II SGH-I777] eincognito:
worked

Thanks. I did this. Although, when the phone boots the initial 'Samsung galaxy sii' splash is now changed to 'SAMSUNG' with the flash of the stock JB, i think. (actually, i dont remember if it was that, or if it was the ICS Semi_v18 ROM I flashed earlier for a different purpose). That splash screen seems to stay longer than before. Anyways, I used mobile odin (need the i777 flash kernel) to flash shift-v4.8 kernel, and then odin to flash the pit file from my computer. I did not have to format with the computer as the recovery seemed to do it fine.
[AT&T Samsung Galaxy S II SGH-I777] david72262:
anyone tried this on the SGH-S959G I curently run [MENTION=5294352]cyril279[/MENTION] slimsaber and want to be able to install the full slim gaaps instead of the mini gapps. Plus I feel eventually we will all need bigger system partition if we keep these phones. Or do I need a different pit file?

Figured it out. Modified original pit.
[AT&T Samsung Galaxy S II SGH-I777] dashrendar:
Thanks a lot for the guide.

This worked fine for me. Initially, I didn't get a cellular signal but then I realized that I missed that instruction embedded in step #11. I'm currently using CM11 M10 build with it.

I assume this will work with any custom ROM, but would it work with stock ROMs that are flashed via Oden, or would this kind of flash put the old partition table back?
[AT&T Samsung Galaxy S II SGH-I777] leeroyjenkins11:
Hey, could reupload the .pit file? It's 404'd.
[AT&T Samsung Galaxy S II SGH-I777] edwin270:
Sure. Where I hosted the files has been down for weeks now. Thanks for alerting me.
[AT&T Samsung Galaxy S II SGH-I777] virajjjj:
hey i want to just use the stock rom with stock kernel. So could i just stop at which step. Please help me
[AT&T Samsung Galaxy S II SGH-I777] creepyncrawly:
I think the safest way would be to follow his steps all the way through step 10, then in step 11 re-install the UCMD8 stock firmware using desktop Odin.
[AT&T Samsung Galaxy S II SGH-I777] theandrewmillett:
Just wanted to say thanks for the writeup! I was frustrated with having to install PA Nano Gapps, so this guide and your modded .pit file were perfect. Just finished installing LS 3.2 Milestone with PA Stock Gapps! :highfive:
[AT&T Samsung Galaxy S II SGH-I777] Nghiem:
Confused & stuck at step 7

Updated: I finally succeed to re-partition; however, I could not go back to SHOstock3 v4 (4.1.2)
[AT&T Samsung Galaxy S II SGH-I777] bleggy:
If my phone already has a recovery installed and is rooted, can I go ahead and install the modified pit file with mobile odin and proceed from there? why exactly would I need to flash ucmb8 through odin?
[AT&T Samsung Galaxy S II SGH-I777] omar71693:
Same question.
[AT&T Samsung Galaxy S II SGH-I777] david72262:
When you flash a new pit through odin everything gets erased except external sd card so use a computer and follow the instructions.
[AT&T Samsung Galaxy S II SGH-I777] bleggy:
Thanks. I'm attempting to follow the instructions, but I need to use Heimdall instead of Odin. If anyone is familiar with Heimdall, I'd greatly appreciate your help.

I downloaded I777UCMD8_I777ATTMD8_I777UCMD8_HOME.tar.md5.7z file and extracted the contents to a folder.

bleggy@localhost:~/heimdall$ ls

boot.bin I777UCMD8_I777ATTMD8_I777UCMD8_HOME.tar.md5 Sbl.bin

cache.img I777UCMD8_I777ATTMD8_I777UCMD8_HOME.tar.md5.7z zImage

factoryfs.img modem.bin

hidden.img param.lfs

and then boot into download mode and ran: sudo heimdall flash --kernel zImage --factoryfs factoryfs.img --cache cache.img --hidden hidden.img --param param.lfs --modem modem.bin

I receive the following:

Heimdall v1.4.0

Copyright (c) 2010-2013, Benjamin Dobell, Glass Echidna

http://www.glassechidna.com.au/

This software is provided free of charge. Copying and redistribution is

encouraged.

If you appreciate this software and you would like to support future

development please consider donating:

http://www.glassechidna.com.au/donate/

Initialising connection...

Detecting device...

Claiming interface...

Attempt failed. Detaching driver...

Claiming interface again...

Setting up interface...

Initialising protocol...

Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.

Please be patient!

Session begun.

Downloading device's PIT file...

PIT file download successful.

ERROR: Partition "kernel" does not exist in the specified PIT.

Ending session...

Rebooting device...

Releasing device interface...

Re-attaching kernel driver...

What should I be doing differently?

EDIT: looks like partition names are capitalized! , so it should be sudo heimdall flash --KERNEL zImage --FACTORYFS factoryfs.img --CACHE cache.img --HIDDEN hidden.img --MODEM modem.bin

To be safe, I shouldnt mess with boot.bin, param.lfs, Sbl.bin, right? or is this necessary here?

Looking forward, does anyone know the exact command to flash the modified .pit file? Would it be:

sudo heimdall flash --repartition --pit .pit ?
[AT&T Samsung Galaxy S II SGH-I777] virajjjj:
Problem

Okay i did something wrong and just i had softbricked my phone and i can just enter into download mode but it fails and gives me write failed error. What can i do now. Help needed please
[AT&T Samsung Galaxy S II SGH-I777] bleggy:
alright. this got me where I wanted to be:

sudo heimdall flash --KERNEL zImage --FACTORYFS factoryfs.img --CACHE cache.img --HIDDEN hidden.img --MODEM modem.bin

I still cant figure out how to flash the .pit in heimdall.

I receive this:

bleggy@localhost:~/Downloads/heimdall$ sudo heimdall flash --repartition --pit i777_4GB\ data\ -\ 45mb\ preload\ -\ 1GB\ system.pit

[sudo] password for bleggy:

Action: flash

Arguments:

--repartition --pit <filename>

--<partition name>|--<partition identifier> <filename> [...]

[--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]

[--usb-log-level <none/error/warning/debug>]

or:

--<partition name>|--<partition identifier> <filename> [...]

[--pit <filename>]

[--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]

[--usb-log-level <none/error/warning/debug>]

Description: Flashes one or more firmware files to your phone. Partition names

(or identifiers) can be obtained by executing the print-pit action.

WARNING: If you're repartitioning it's strongly recommended you specify

all files at your disposal.

any ideas?
[AT&T Samsung Galaxy S II SGH-I777] virajjjj:
Edit: Just read it in i9100 thread that this method should not be used if you want to run stock rom. So flashed backed original pit file from i9100 thread and now the phone is running like as it should be running.
[AT&T Samsung Galaxy S II SGH-I777] bleggy:
done.

that was a total PITA. but I got it. I ended up flashing the ucmd8 bootloader and had to make a detour into some random ICS rom so I could use an old version of triangle-away to get rid of the warning sign and then working my way up to slimkat. lemme tell you, recoveries have come a long way. props to twrp & philz...I dont want to ever see 3e or cwm again.

for future reference, the correct heimdall / pit usage here would be:

heimdall flash --repartition —pit <path to pit> --<partition name> --<corresponding file path>

with: --<partition name> --<corresponding file path> to be repeated for each partition you’re flashing.

but the quick and dirty way that worked for me is this: http://xdaforums.com/showpost.php?p=57939077&postcount=72

the i777 lives!
[AT&T Samsung Galaxy S II SGH-I777] sciguy125:
What dummy image did you flash to get it to accept the PIT?
[AT&T Samsung Galaxy S II SGH-I777] bleggy:
issuing the command touch created a file. I did touch ums.img -- check out the last few posts of the thread I linked.
[AT&T Samsung Galaxy S II SGH-I777] sciguy125:
I've been having some trouble with the PIT from OP so I decided to check the partitions after flashing it. I don't know if it's the cause of my trouble but parted spit this out and I'm assuming it's not normal:

~ # parted /dev/block/mmcblk0
GNU Parted 1.8.8.1.179-aef3
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Error: Can't have a partition outside the disk!
[AT&T Samsung Galaxy S II SGH-I777] bleggy:
what trouble are you having?
[AT&T Samsung Galaxy S II SGH-I777] turpinator97:
5.0.2 I777 storage?

Does this help cyanide 5.0.2 I777 read phone internal storage?
[AT&T Samsung Galaxy S II SGH-I777] omar71693:
Quick question, when we are flashing the full Samsung UCMD8 in the 2nd step, which part of Odin do we put that file? (BL, AP, or CP) Sorry for the noob question.

Thanks in advance.
[AT&T Samsung Galaxy S II SGH-I777] david72262:
Sorry I don't remember and I don't have Odin any more I have reformatted and went to windows 10 if you posted a screenshot of Odin I'm sure I would remember I believe it is the top one on the right but I'm not sure
[AT&T Samsung Galaxy S II SGH-I777] omar71693:
Here ya go.
[AT&T Samsung Galaxy S II SGH-I777] david72262:
here is a link to my personal instructions I just looked it up. Should anwser all your questions quick easy way

http://xdaforums.com/showpost.php?p=55967538&postcount=3829
[AT&T Samsung Galaxy S II SGH-I777] omar71693:
Thanks for the taking the time out. Much Appreciated.
[AT&T Samsung Galaxy S II SGH-I777] david72262:
thats what XDA is suppose to be all about just pass it down the line and help others when you can.
[AT&T Samsung Galaxy S II SGH-I777] anomailin:
You can follow the below links if you are not interested in using Odin

http://xdaforums.com/showthread.php?t=1887864

I resized my data to 7 GB using the above instruction
[AT&T Samsung Galaxy S II SGH-I777] Madcat8686:
Worked as instructed except I had to use Odin 3.07 to get the job done. Not sure why.
[AT&T Samsung Galaxy S II SGH-I777] edwin270:
[emoji4] guess all that matters is that it worked. Could be the windows version (just a guess).
[AT&T Samsung Galaxy S II SGH-I777] Madcat8686:
Likely so and I agree, this brought back a lot of life to the phone
[AT&T Samsung Galaxy S II SGH-I777] Nimrodz91:
It all worked for me, but I have a question. How do you restore the phone to the original partition? I want to go back now because there are some ROMs, like SHOstock, that stays on bootloop. Also, I am going to sell it and want to flash the stock ROM, but it fails at hidden.img using Odin. I appreciate any answer.

EDIT: Solved. I flashed the UCMD8 stock rom with an original pit file. Wiped data/factory reset, formatted internal storage and done.
[AT&T Samsung Galaxy S II SGH-I777] ms.journie:
Unsure if I really screwed up my phone but I had followed the directions #9. I tried to reboot into Recovery but it ended up trying to load. I was then stuck on Samsung logo for a really long time.

So I decided to just start fresh.

I put my jag in the phone went into download mode. Tried to flash UCMD8 through Odin on computer and I get fail. Tried a few times and I get the same message everytime!

Can someone help me with this?

Thanks
[AT&T Samsung Galaxy S II SGH-I777] ms.journie:
How did you mount internal partition and format with pc? I'm unsure but I messed up somewhere and my phone isn't loading. It's stuck now on At&T and then turns off or the screens turns off for a few seconds then it comes back on. Im stuck in that loop.

Can you please help me?

Thanks
[AT&T Samsung Galaxy S II SGH-I777] edwin270:
Really sorry some are having issues trying to follow the steps outlined. Though I currently do not own this great phone anymore, I will try and take time off my extremely busy schedule and give more pit files and and more simple steps this week.
[AT&T Samsung Galaxy S II SGH-I777] factoreal:
App Data Size Portion on SD Not Displayed.

This isn't your fault, therefore you don't have to apologize. I should have thanked you for taking the time for writing this great guide. This guide has made it very clear upfront that the OP would not be liable for any outcome due to following this guide. Thanks in advanced for giving more pit files and simple steps.

Just a follow-up, I have attached a pic showing the storage size of partitioned internal storage in Titanium Backup. I noticed that there are some differences on how the app info displays data as compared to pre-partitioned internal storage. For example, app info of Whatsapp usually displays the portion size of app on SD card and offers to move to SD card, but this isn't shown on app info (see attached pic). I don't find any apps with "Move to SD" box on app info page after the internal storage partitioning. App info of Youku app (similar to Chinese Youtube) displays the data with a total size of 11GB which includes mostly media files stored on SD card, without reporting the data on SD card and internal storage separately (not sure if data size from both SD card and internal storage have been merged in this case). Anyone has similar issues?

FYI, the ROM and kernel used are C-ROM with Android 4.4.4 and Shift Kernel 5.0.
[AT&T Samsung Galaxy S II SGH-I777] edwin270:
My knowledge about apps such as whatsapp not showing the move to SD card is that, the partitioned space is being read as a total space on the phone (big enough for this apps to use) as such they do not need to move files to free up internal space, similar to phones without SD card like the Nexus phone.

On the other hand, read the link given concerning Samsung pit. Since we are mostly on custom rom, a portion of this pit is almost rendered useless, that is the part that was resized to give more space to app install.

Thus aside root apps like Titanium, almost other apps will be confused in reading this partitions.

[emoji4] [emoji4] [emoji4] [emoji4] [emoji4]
[AT&T Samsung Galaxy S II SGH-I777] Extezy:
Would be nice to have more PIT files because PIT file from 1st post not working for any Lollipop ROM - bootloop on ROM logo for SlimLP, CyanideL and CM 12.1.

But that PIT works for SlimSaber.

I suppose all Lollipop ROMs use /preload, so either we need Lollipop ROMs that do not use /preload partition or other PIT file needed where /preload isn't messed up.

Not enought experience with PIT Magic to do it by myself.
[AT&T Samsung Galaxy S II SGH-I777] mmystere68:
kernel?

what shift kernel you used exactly? the links shows a tons of kernel for different android versions. im currently on cm11-i9100 (using lanchon kernel). will i be able to revert to that rom after this partitioning?
[AT&T Samsung Galaxy S II SGH-I777] meantomatoes:
Same. Super irritating. I tried to open PIT Magic and it's just beyond me, lol. With the PIT provided, it seems /preload is broken until flashed with stock firmware and the stock PIT again. TWRP says it can't be mounted. So maybe it's not even on the PIT, but I looked at other PITs that did work with /preload and it didn't show anything.
[AT&T Samsung Galaxy S II SGH-I777] factoreal:
ROM Support and Kernel

The kernel used is version 5.0 from (http://xdaforums.com/showthread.php?t=2794026) as in the thread the OP mentioned "Starting with 5.0 this kernel supports all AOSP KitKat ROMS for the I777/959G". This version 5.0 Shift kernel supports AOSP ROMs only afaik, Cyanogenmod 11 may not be supported.

You should be able to revert to that ROM after partitioning as custom ROMs should be supported, and I advise against changing the kernel to Shift 5.0 kernel after you reverted to cm11-i9100 (using lanchon kernel).
[AT&T Samsung Galaxy S II SGH-I777] meantomatoes:
Okay, so I learned more about PITs. I know how to make them now, but... erm... I accidentally hard-bricked my S2 by flashing a (I think) corrupt PIT. It needs a JTAG (which I won't get since it's cheaper to buy one off eBay...). Do NOT attempt to make a PIT file if you don't absolutely know what you're doing.
[AT&T Samsung Galaxy S II SGH-I777] Tmobilefan906:
Does this work still?
[AT&T Samsung Galaxy S II SGH-I777] torzod:
Can you please post a UCBM8 mirror? dev-host just sends me through endless pop-ups and ads without actually giving me the file.
[AT&T Samsung Galaxy S II SGH-I777] syarif agil:
my master has partitioned the way you have given this through odin but i am having problem with my unreadable internal memory if you can help me to recover it back ....
[AT&T Samsung Galaxy S II SGH-I777] dh4645:
same here. trying to update my old S2 and was going to do this, but can't
[AT&T Samsung Galaxy S II SGH-I777] david72262:
Go here https://xdaforums.com/showthread.php?t=1982571&p=55967538 has pit file attached hosted on xda
[AT&T Samsung Galaxy S II SGH-I777] dh4645:
the OP of this thread has a link to a full I777UCMD8 ROM (I777UCMD8_I777ATTMD8_I777UCMD8_HOME.tar.md5.7z - 427.02 MB) that won't allow us to download, not a modem.

Also that's for a different phone, right?

---------- Post added at 11:44 PM ---------- Previous post was at 11:26 PM ----------

maybe this?

https://androidfilehost.com/?fid=24052804347826277
[AT&T Samsung Galaxy S II SGH-I777] david72262:
I thought you were looking to repartition your phone didn't know you were looking for a ROM, that pit file would work for both phones it is interchangeable the I77 and that other phone are identical almost.
[AT&T Samsung Galaxy S II SGH-I777] dh4645:
We are, it's just the first step in this guide is to start off with the rom.
[AT&T Samsung Galaxy S II SGH-I777] david72262:
Well if you go back a couple pages I think it is on page 4 of this guide someone used my instructions on the other thread and it worked perfectly
[AT&T Samsung Galaxy S II SGH-I777] dh4645:
Thanks I'll check it out. I haven't messed with this one for years so I'm trying to relearn what to do
[AT&T Samsung Galaxy S II SGH-I777] pepe100:
Hi, How was your experience. Did you already perform the partition??
[Sony Xperia M2] NFound:
This is a PhilZ-Based Recovery 6.0.5.0 Touch Recovery for Xperia M2 (Dual SIM)!​

[ info ]

This Recovery is built from CWM 6.0.5.0 sources!

[ Requirements ]

-Bootloader unlocked

-working fastboot

-STOCK ROM FW:

-4.3

-18.0.B.1.25

[ how to flash this kernel ]

-Installed through FlashTool fastboot mode

[ how to enter recovery ]

-After vibration second time you press

VOLUME DOWN key

PROOF

Download
[Sony Xperia M2] Naufal Sidik:
Any bugs there?

Please, make 1 for Xperia M2 Single in Kitkat soon ..
[Sony Xperia M2] chrisjwild:
Would this be easier to get working for the M2 (D2303)
[Sony Xperia M2] alinolaw71:
pls make that for kitkat.

.
[Sony Xperia M2] phoenix.505:
Please pack for KitKat 4.4.4 (18.3.1.B.0.18) too.
[Sony Xperia M2] macabrocabral:
What about D2306 KK? Can you make it too?
[Sony Xperia M2] Mina Mngawy:
link not working
[Sony Xperia M2] Lovenish Singh Panwar:
Link has been expired..
[Nexus 5 Q&A, Help & Troubleshooting] evyatar_mahatsri:
I HAVE NEXUS 5 THE ORIGINAL ROM 4.4.4

I CANT USE THE WIFI I TURN UT ON AND IT'S Stuck and And I've do a reset factory and it's stiil stuck

what can i do? any Options?
[Nexus 5 Q&A, Help & Troubleshooting] bitdomo:
I can suggest you to reflash the stock rom. If it does not help then you have to rma your device
[Nexus 5 Q&A, Help & Troubleshooting] GTI6speed:
Only way to fix this is to download the factory image from Google's website and flash it.