yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] Lanchon:
no, the way to autodetect is using blkid.

would it?

-so system=+wipe now requires that there is a file system there already to provide the default or it borks out??? because if it defaults to current type it must default to that all the time in all partitions.

-so instead of some people not even knowing the way their phones were formatted to start with, now you propose that they NOT KNOW HOW THEY ARE RESIZING/FORMATTING IT NOW WITH MY TOOL EITHER???

also, i have a REAL LIFE here. saving a small fraction of you from adding "+ext4" to a command line, if it were a good idea in the first place, does not rank very high in the list of my life priorities.

even though i dont agree with the subject mater, thank you for proposing an improvement anyway.
[Galaxy S II Original Android Development] Lanchon:
your questions are OT.

but just dont "save a few bytes more", will you?

re the fs type: no, vfat and ext4 is not the same, and android is not tested under the ext4 configuration. but this is OT too.
[Galaxy S II Original Android Development] KickerTom:
Even better. Mount/unmount was just to ilustrate the idea, not really serious proposal.

Please note that I was talking about "keep" case. For wipe the fs would still have to be specified, just that I think for keep, it is a bit redundant, as you can't change the format anyway, can you?

Sure, it was just an idea, not a request. I am EXTREMELY grateful for the script as it is, and I understand even the current implementation must have been A LOT of hours of work, so feel free to ignore me :).
[Galaxy S II Original Android Development] AngelGR:
Sorry, my english is not good and maybe I'm not expressing well what I want to say.

FAT and ext4 are not the same, obviously. I was just asking because your script allows to change the fs type, and since it could be some advantages using one or another fs... I mean one recommended config for this or that reason, I'd like to know.

On the other hand (tune2fs question), if ext4 reserves a 5% of partition for administrative purposes (not too much necesary for the use of save music or pictures), and that partition size is about 8 GB, we are talking about 400 MB of space... the "few more bytes" are almost the waste of space of the preload partition.

Thanks again for your work and your time, I'm truly grateful.
[Galaxy S II Original Android Development] tltan86:
First, I want to thank @Lanchon for this amazing tool.

I encountered this error while shrinking my /preload partition to -min and /sdcard partition to -max while the rest of the partition size remains the same.

FATAL: file system errors in partition #11 /sdcard (UMS) could not be automatically fixed

This is the recipe that I used,

lanchon-repit-20160216-system=same-data=same-sdcard=max-preload=min+wipe-i9100.zip

I tried installing from my initial directory, then tried installing from /tmp directory and also tried rebooting the recovery and repeat, but no success.

Kindly refer to my attached recovery.log.

Please advise.

Thank you!

edit: I did an initial search in this thread but no related results. Meanwhile I'll extend my search further.

edit #2: Alright, I found some results (http://xdaforums.com/galaxy-s2/orig...chon-repit-data-sparing-t3311747/post65359260). Will look into it first. Thanks.

edit #3: Tried @Talkrabb solution, didn't work out for me. I have unchecked all partitions (/cache, /system, /data, /emmc, /micro-sd) and go to /tmp to install the zip.

edit #4: I just noticed the wrong file system detected as vfat for /sdcard, while is detected as ext4 in DiskInfo.

----- CONFIGURATION -----
system: size=same, content=keep, fs=ext4
data: size=same, content=keep, fs=ext4
sdcard: size=max, content=keep, fs=vfat
preload: size=min, content=wipe, fs=ext4

Alright, later I'm going to explicitly try with this -sdcard=max+ext4 switches or running dosfsck. Hope it helps.

Edit #5: Extract recovery log as attachment.
[Galaxy S II Original Android Development] Lanchon:
i do not accept different FS defaults for the keep and wipe options. IMHO undue complexity in user interfaces is never a good idea.

i do not accept the default-to-current proposal because i think it's inferior by the reasons already pointed out.

i dont think it's unreasonable to ask that advanced users who formatted sd in ext4 actually know that they did.

anyway, this is free software and the nice thing about it is that you can fork it and make it better if you think you can. this is not rhetoric; i really mean this. you could say im a bit despotic: but i'm so only towards the use of my time, which is ok; i dont impose my ideas on anybody.
[Galaxy S II Original Android Development] Lanchon:
i understand your questions.

but again, both questions are OT (off-topic): this thread is not here to debate the merits of ext4 vs vfat as fs for sdcard, nor to discuss tunning of ext4 file systems.

rules of XDA ask that you remain on-topic.
[Galaxy S II Original Android Development] yupo72:
Hi guys,

I'm just curious to understand few things:

1) what's the correct syntax of naming the zip file? is this one correct or have the = be removed as I've seen reading the thread?

lanchon-repit-20160216-system=1.0-data=same-sdcard=max-preload=min+wipe-i9100.zip

2) any difference in using system=1.0 or system=1?

3) can system eventually be sized more than 1 Gb? Maybe never needed but is it possible?

4) /tmp is viewable only from TWRP recovery?

Thanks all
[Galaxy S II Original Android Development] laserkater:
1) "=" have to be included

2) No

3) Yes

4) Yes

Cheers!
[Galaxy S II Original Android Development] AngelGR:
New attempt (I think on-topic):

"is there any chance of save a few bytes more in sdcard partition with tune2fs?" = "Is there any chance that you add tune2fs options to your script for save a few bytes more in sdcard partition?"

Thanks :)
[Galaxy S II Original Android Development] Saftpresse99:
Hi,

i am on Cm 12.1 with the last nightly. I want to resize my sd card to 8GiB, keep system and enlarge data to max. So i created this command:

lanchon-repit-20160216-system=same+keep+ext4-data=max+keep+ext4-sdcard=8+keep+vfat-preload=same+keep+ext4-i9100

Before i run this command in recovery, i want to know if my construct is correct. Can somebody confirm or correct me if i am wrong.
[Galaxy S II Original Android Development] laserkater:
Does your system already have a 1 GB system partition (needed for CM13+gapps)? If so, then it's okay, but I'd consider reducing preload to a minimal size, as it isn't needed anymore on custom roms like CM.

If your system size is already modified:

lanchon-repit-20160216-system=same+keep+ext4-data=max+keep+ext4-sdcard=8+keep+vfat-preload=min+wipe-i9100

If your system size has still its original size (never repitted):

lanchon-repit-20160216-system=1+keep+ext4-data=max+keep+ext4-sdcard=8+keep+vfat-preload=min+wipe-i9100
[Galaxy S II Original Android Development] Saftpresse99:
Hi laserkater,

thanks for you answer. I never repitted my device.

So i am on 512 Mb System and not planning to install CM13 in the next couple of weeks. That's the reason why i keep system. Adjusted command to reduce preload:

lanchon-repit-20160216-system=same+keep+ext4-data=max+keep+ext4-sdcard=8+keep+vfat-preload=min+wipe-i9100
[Galaxy S II Original Android Development] Acid0057:
[MENTION=6936653]Saftpresse99[/MENTION] that command will work but I would suggest changing system to 1 GB. Even if you're not going to cm 13 today you might in the future and then it's already done. Since preload is 512mb and not used by anything you really aren't loosing any space.

Plus Roms and Google Apps are only going to get bigger as time goes on.
[Galaxy S II Original Android Development] Saftpresse99:
Thanks Acid,

you are right. I will change system to 1GB too.
[Galaxy S II Original Android Development] Acid0057:
You're welcome!
[Galaxy S II Original Android Development] yupo72:
Will this work?

lanchon-repit-20160216-system=1.5+keep+ext4-data=6+keep+ext4-sdcard=max+keep+vfat-preload=min+wipe-i9100.zip

After flashing and reboot I'll have my phone working as it is or this has to be done before the flashing of a new ROM?

Thanks
[Galaxy S II Original Android Development] laserkater:
You can flash it whenever you want, if you flash it you'll have your phone working as it is .
[Galaxy S II Original Android Development] svbarbosa:
[MENTION=4141005]Lanchon[/MENTION], thanks for this great tool. :good:

I am hoping a N7000 version is in your plans. :o
[Galaxy S II Original Android Development] yupo72:
:rolleyes: is it correct to have Micro-SD = 0?

I've unmounted and unchecked everything but still in emmc and I get fatal error #11 on sdcard

I tried this and data=same is 6Gb (I Odin pitted with a 1-6 configuration)

lanchon-repit-20160216-system=1.5+keep+ext4-data=same+keep+ext4-sdcard=max+keep+vfat-preload=min+wipe-i9100.zip
[Galaxy S II Original Android Development] Traace:
No its not correct. After flashing a second time to get back to vfat, my EMMC showing the same just a 0...

I've used lanchon-repit-20160212-system=same+keep+ext4-data=same+keep+ext4-preload=min+wipe+ext4-sdcard=max+wipe+vfat-i9100

To get my System fixed i used a PIT file :) All good now
[Galaxy S II Original Android Development] the.gangster:
You cannot combine +keep and +vfat if you formatted it to ext4 !!!

So put an +ext4 in your zipname...
[Galaxy S II Original Android Development] Lanchon:
you are using many defaults, so this does the same thing but less verbose:

lanchon-repit-20160216-system=1.5-data=6-sdcard=max-preload=min+wipe-i9100.zip

if you plan to wipe some partitions (ie: system, data), THEN WIPE THEM WHILE REPARTITIONING !!!! resizing is much slower and burns up life the emmc writing to it no reason (if you plan to wipe it immediately after, that is).
[Galaxy S II Original Android Development] Lanchon:
you posted the wrong log. and "fatal error #11 on sdcard" is not part of the log, so no way to help you.
[Galaxy S II Original Android Development] the.gangster:
If I parsed his log correctly, he has ext4 on SD!

So at least sdcard=max++ext4 is needed.

Edit: even the log is from.the trim kernel installation you can see the current fs of emmc in there. That's why repitted will fail.
[Galaxy S II Original Android Development] Lanchon:
i didnt see a run of the tool in the log.
[Galaxy S II Original Android Development] Lanchon:
absolutely not. i believe Theo Tso is astronomically more adept at tweaking his file system that i could ever be, and im sure he picked the right defaults for us. even if this werent true i wouldnt do it. i reject feature creep: this is a partitioning tool.
[Galaxy S II Original Android Development] the.gangster:
There is no run of the tool in the log.

But what's inside is at least the information, that current FS is ext4.

On his post he stated, he named the zip to maximize sdcard but being vfat and to keep.

But that combination will fail, as it is currently ext4.

That's all, my comment was about.
[Galaxy S II Original Android Development] t0lits:
so after downloading this repartitioning tool, can i flash it directly w/out renaming it?..
[Galaxy S II Original Android Development] Acid0057:
[MENTION=5259654]t0lits[/MENTION] depends on what you want to do with your partitions.
[Galaxy S II Original Android Development] +++MadMatt+++:
Installing now with default settings, loving the Lanchon recovery, and this on paper looks like it is going to work very well, left as default settings, I'd rather not play around with that too much! I'd probably **** it up. As I type ===SUCCESS=== partition details...done. Thanks very much for this, and the guide!
[Galaxy S II Original Android Development] t0lits:
i just want to expand the /system partition to 1gb so that i can flash cm13 + gapps (pico) w/out problems...that's all...
[Galaxy S II Original Android Development] Traace:
No i don't do that, did u even read my posting? I don't want ext4 as dorimax isn't working there. + I also tried it with wipe. Same result. Please stop talk nonsense...

It seems like [MENTION=4141005]Lanchon[/MENTION] is ignoring my posting, so I don't care about this script anymore

For all guys who run into issues -> Just go the normal pit way, U will lose all the data but its way less painful than this script here.
[Galaxy S II Original Android Development] Acid0057:
Yep then the default setup will work for you. Backup you're data just in case.
[Galaxy S II Original Android Development] t0lits:
is that the default setup?..the one uploaded?..no need to rename?..

thanks btw sir...i'll give it a try once cm13 become stable hehe...
[Galaxy S II Original Android Development] Acid0057:
Yes that's right no renaming needed. You could flash it right now. Then you're ready.

Cm13 is stable for me. Using it on my other s2 as a daily driver.
[Galaxy S II Original Android Development] the.gangster:
Believe me, I read your posting, and even if I could riddle now what happened on your device (no log), my answers were related to [MENTION=4159710]yupo72[/MENTION], who added a recovery.log. Even if it was not showing the run of the tool, it showed at least his partitioning.

And it clearly states ext4 to be the current fs on his mmcblk0p10.

Did you read that???

All my posts remain guilty.

I expect you made the same mistake, but that's just a shot in the dark.
[Galaxy S II Original Android Development] tltan86:
This is a open question to all,

On the OP, its being mentioned this sample configuration,

repartition to 1GB system, 6GB data, no preload, keeping all other data, [B]for phones with ext4-formatted internal sdcard[/B]:
-> -system=1-data=6-sdcard=max++ext4-preload=min+wipe

I'm just curious if the additional + from ++ext4 is a typo?

Anyway, I'll first try with a single +. Ha.
[Galaxy S II Original Android Development] Lanchon:
i'm not ignoring you!! your post was an answer to somebody else's questions. i dont have the time to read answers, so i don't.

i see the issue now. you did everything right, but the script failed to wipe your sdcard. you may have run into a limitation of the 32-bit build of mkfs.vfat tool in TWRP that cannot handle big partitions. i only tested the mkfs.vfat code by making small vfat partitions in the preload space because i never did want to wipe sd on my phone. so i never actually created an FS bigger than 4GB.

i'll need to investigate this issue. i suppose TWRP probably has 2 or more different tools for making a vfat FS and im using the one that doesn't work. the solution should simply entail switching the tool that i invoke.

regarding your situation: to work around the problem, simply manually format the sdcard from TWRP (i hope this works). then use my script to resize (rather than wipe) the sdcard to its desired size. i'm sorry about the failure.
[Galaxy S II Original Android Development] Lanchon:
no it is not.

and if you try it will fail.

read the syntax in the OP.
[Galaxy S II Original Android Development] the.gangster:
That's no typo.

Check Syntax explanation. If you leave away the 2nd conf-parameter (in order to use its default) you still put a "+" at its position, if you define the 3rd one.

So even if you want to keep everything as is and just want to trim (when on trim kernel) and have an ext4 formatted internalSD you use:

lanchon-repit-20160216-sdcard=++ext4-i9100.zip
[Galaxy S II Original Android Development] tltan86:
You're right, I have re-read the syntax. I get it now. Thanks! :good:
[Galaxy S II Original Android Development] tltan86:
It works! Thanks @Lanchon and @the.gangster!

My final configuration,

lanchon-repit-20160216-sdcard=max++ext4-preload=min+wipe-i9100.zip
[Galaxy S II Original Android Development] the.gangster:
[MENTION=4154367]tltan86[/MENTION]

So you resized system partition before already? Because with your latest zipname it will stay as is.
[Galaxy S II Original Android Development] Traace:
Excuse my rudeness I was in a bad mood. Format over TWRP itself works just fine, thx for that tip :good:
[Galaxy S II Original Android Development] svbarbosa:
Had an unexpected error in MODEM partition:

FATAL: partition #8 /modem (MODEM): unexpected end: 532480

[ERROR 1]

Any suggestions?

Full TWRP log is attached.
[Galaxy S II Original Android Development] Lanchon:
hi, and thanks for log.

a sanity check made the script abort.

your phone is crazy!! is it really an i9100?

your modem partition ends 92MB past the point it should. and you should NEVER touch partitions before, up to and including MODEM.

what did you do to it?

could you boot TWRP and from the PC type this and post the results?

adb shell parted -s /dev/block/mmcblk0 unit s print free

it will print out your partition table

thanks!
[Galaxy S II Original Android Development] erotavlas:
Hi,

I updated from CM 12.1 to CM 13 via OTA even if I do not want to update. Then in order to have gapps, I followed this procedure http://xdaforums.com/showpost.php?p=65164875&postcount=1002 and to be sure I flashed this recovery-Lanchon-IsoRec-TWRP-2.8.7.0-20160113-i9100-(by-arnab).zip.

Now I cannot understand why I'm not able to flash the repartition script. I followed the guide on the first post of this thread.

I get this error if I run the script directly from /tmp/

FATAL: unable to reread the partition table (this package copied itself to /tmp; please unmount all partitions and run it again from there)

I unmounted all the partition manually from TWRP. Any suggestions?

Thank you
[Galaxy S II Original Android Development] svbarbosa:
Thanks for helping. This phone is indeed a GT-I9100.

Took me a while to figure out I had to run adb with phone in recovery mode.

In the meantime I got the pit file and generated an dump of it.

All files are attached.
[Galaxy S II Original Android Development] Lanchon:
ill have to look at this when im at the PC.

> In the meantime I got the pit file

where/how did you get it?

what did you do to the phone before? you rePITted using download mode? where did you get the pit? your modem partition is not in the standard location.

EDIT:

ok yeah, cache is resized from 100 to 192MB, and modem is pushed back accordingly. why?
[Galaxy S II Original Android Development] Lanchon:
im unable to see your log on the phone.

was your phone encrypted?
[Galaxy S II Original Android Development] the.gangster:
First of all, you named it lanchon-repit-20160216-system=1-data=6-sdcard=max++ext4-preload=min+wipe.zip although your log states, that your internalSD is vFat. So change it to ...-sdcard=max-preload=..."

But that should have led to another error later in the tool, not that early.
[Galaxy S II Original Android Development] svbarbosa:
I extracted the pit myself using dd.

Long time ago I did repart this phone using Odin and a Pit file I got someplace I can't remember.

Fortunately it never showed any signs of problem. My 15 years old son is using it since last year.
[Galaxy S II Original Android Development] the.gangster:
[MENTION=3342533]svbarbosa[/MENTION]

your pit looks like you have a cache partition twice the size the i9100 usually has. This causes the modem partition to be shifted at the same size towards the end.

Doesn't look like an i9100 pit to me.

Let's see what [MENTION=4141005]Lanchon[/MENTION] says.
[Galaxy S II Original Android Development] tltan86:
Yes. Resized twice before using Lanchon REPIT utility.

First time to resize /system to 768 MB, low /preload (~45 MB if I didn't recall wrongly) for lollipop using pit file (from metalgearhathaway's Partition your internal memory for better App management (Pit Files) thread).

Second time to resize /system to 1 GB, default /preload size (~500 MB?) for marshmallow using pit file as well (from gsstudios's Increase system partition size thread).
[Galaxy S II Original Android Development] Lanchon:
we crossed posts while you were writing this.

so are you in a hurry to fix this or can you wait? you could fix it manually or wait for a better repit.

in my mental todo list for repit i got:

-investigate/fix the issue of wiping big vfat partitions.

-generalize repit for phones in which the partition numbers and the actual disk space of the partitions are not sequenced in the same way.

-generalize repit completely so that all device specific code is entered in one section. the aim is to make it really easy to port repit to other phones (by 3rd parties), it looks like it might be useful.

-add a raw partition type that only allows bitwise moving but not resizing, checking, wiping, etc. the idea is being able to handle partitions like modem.

-add modem and cache partitoins to the i9100 repit, so that you can return them to stock style if you want, or repit as you are now.

-create a temporary partition at the start of an ext4 or raw move operation to double check that parted also believes the destination area is available. re-create the current partition in case of trouble, to avoid data loss.
[Galaxy S II Original Android Development] erotavlas:
Hi,

I tried with lanchon-repit-20160216-system=1-data=6-sdcard=max++ext4-preload=min+wipe.zip, lanchon-repit-20160216-system=1-data=6-sdcard=max-preload=min+wipe.zip and lanchon-repit-20160216-system=1-data=6+wipe-sdcard=max-preload=min+wipe all return the same output.

Thank you

---------- Post added at 10:05 AM ---------- Previous post was at 10:00 AM ----------

Cannot you see the attached log? Try with this link https://gist.githubusercontent.com/...74d671100786d945c3416c226f114538/recovery.log

No, my phone is not encrypted. I only updated it via OTA and without any warning or confirmation it installed the CM 13, but without opengapps. So now I have to increase partition...

Thank you for your help
[Galaxy S II Original Android Development] svbarbosa:
It was a i9100 pit for sure.

At that time, with Android 2.x, I remember cache partition would come close to full, so I picked a PIT file with a larger cache on purpose.

---------- Post added at 08:04 ---------- Previous post was at 07:50 ----------

My son stays with me every other weekend, so I have easy access to the phone today. Next time will be in two weeks from now.

But there is no need to rush. The phone is running ok. Take your time.

I want to increase the data partition to stop moving apps to extsd due to TWRP being unable to handle android_secure properly.

I used to be a assembly language systems programmer many years ago, working with mainframe computers, so I may follow more complex instructions if necessary.

Thanks again for taking your time to help. Really appreciated. :)
[Galaxy S II Original Android Development] yupo72:
Thanks all and sorry to all for my dummy questions.

I've read all the comments and so far I've understood that neither this one will never works because my sdcard is actually formatted in ext4.

So, will the following works instead?

lanchon-repit-20160216-system=1.5-data=6-sdcard=max++ext4-preload=min+wipe-i9100.zip
[Galaxy S II Original Android Development] Lanchon:
then it should, try it!