yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] davidvanwijk:
I tried again, with much attention for unmounting. Again with the same (disappointing) result. Then I used with my (linux)pc the command you recommended, with this result:

sudo adb shell cat /proc/mounts

rootfs / rootfs rw,seclabel 0 0

tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,mode=755 0 0

devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0

proc /proc proc rw,relatime 0 0

sysfs /sys sysfs rw,seclabel,relatime 0 0

selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0

tmpfs /tmp tmpfs rw,seclabel,relatime 0 0

/dev/block/mmcblk0p11 /emmc vfat rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0

/dev/block/mmcblk0p11 /and-sec vfat rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0

What do you think of it? I cannot really 'read' this.

Thanks again.
[Galaxy S II Original Android Development] regen01:
I have just executed your 1Gb4Gb-script.

Worked fine, my device is now repartitoned and ready for mm.

In Twrp you need to umount really all partitions. And even the tick by `mount read-only' has TP be removed.

Great script with an excellent errorhandling !!!

Gesendet von meinem GT-I9100 mit Tapatalk
[Galaxy S II Original Android Development] KickerTom:
Just run it on CM12.1, 512MB/5GB phone, with 1G/6G ext4 version from post 30, from external SD card.

I have got several errors from FS check (although I checked for errors before, maybe not all of them), so had to run several times. At the end got stuck with error about mounted system. I haven't found any way around this until I copied the zip to /tmp and unmounted also external SD. Then finished with success. Phone booting, seems no data lost.

Thanks a lot, great work. Can imagine this must have been hell of a work to test during development :).
[Galaxy S II Original Android Development] Drhedphuk:
This sounds like the same error that I experienced. I have yet to try through tmp.
[Galaxy S II Original Android Development] The-Dark-Knight:
Hi, it's not working for me. Dont know why... Tried it from external and /tmp. Always Error4.

Can someone tell me whats wrong?

Thx DK
[Galaxy S II Original Android Development] KickerTom:
It's in the log:

/dev/block/mmcblk0p10: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options)

Your data partition is heavily corrupted. Run fsck from twrp terminal or via adb shell, then restart the script. If fsck does not help, do wipe with format and reinstall.
[Galaxy S II Original Android Development] The-Dark-Knight:
Ok, did not work. Only type fsck @ /data correct? Says no such thing ...

Formatted /data an /system and now I get Error 8.

EDIT: Solved
[Galaxy S II Original Android Development] Acid0057:
Just did it and it was sucessful! Got an Error 1 both times but Diskinfo reports that I have a 1 GB system partition now.

First Pic Diskinfo before and second after. Also attached my recovery.log
[Galaxy S II Original Android Development] 089man:
Hello, have a problem, hope anybody can help.

I'm on cm12.1 RR 5.1.1 Lollipop rom.

I go to recovery and flash successful recovery-Lanchon-IsoRec-CM-6.0.5.1-20160112-i9100.zip

Than I boot in recovery again. The same recovery is available as before, now I start to flash the 1gb system 6gb data zip file from OP.

It's starting but finish with error. Take a look to the picture...

What can I do? Since kitkat a have a 4 gb data portion only. With the script I would like a 1gb system partition too.. But the zip don't work? The files all saved on external sd card.

I9100 Tapatalk, RR 5.1.1 Lollipop
[Galaxy S II Original Android Development] Acid0057:
Read the original post. You need Twrp recovery. Not CWM
[Galaxy S II Original Android Development] 089man:
Ok, you mean I must take zip from arnab before, than all unmount, than flash the script, than format sd card, than flash recovery-Lanchon-IsoRec-CM-6.0.5.1-20160112-i9100.zip, than cm13?

I9100 Tapatalk, RR 5.1.1 Lollipop
[Galaxy S II Original Android Development] davidvanwijk:
It worked!

Hi there, after several attempts to flash this script, it ended successfully! At first it failed due to troubles unmounting all partitions. Secondly I flashed from external SD. When flashing I got in the end an error I did not understand. I looked into the format partitions and discovered that a/system was vfat and eMMC was ext4. Therefore I also flashed the other script especially for ext4. This took only a few seconds and it ended without failure.

Now I have 1GB system with newest CM13 with GApps!

Thanks to Lanchon!
[Galaxy S II Original Android Development] Acid0057:
Yes if you want to end up with CWM as a recovery in the end. Oh but you unmount everything first before running the script in Twrp
[Galaxy S II Original Android Development] 089man:
Sorry, must ask again.

I boot in my 5.11 Cwm recovery again resurrection remix rom, flash this

recovery-Lanchon-IsoRec-TWRP-2.8.7.0-20160113-i9100-(by-arnab).zip

Go to advanced and boot to recovery, but it's the same Cwm recovery and not twrp. Than I have test the Uninstaller zip and flash twrp again for but the same. Cwm always available and not the twrp? When I Flash the twrp no error, successful is coming.

What can I do?

I9100 Tapatalk, RR 5.1.1 Lollipop
[Galaxy S II Original Android Development] levio:
Are you sure that resirrection remix kernel has IsoRec-compatible kernels?
[Galaxy S II Original Android Development] 089man:
The rom is dead and thread is closed, last rom update was 2015...

I9100 Tapatalk, RR 5.1.1 Lollipop
[Galaxy S II Original Android Development] levio:
Then you haven't a isorec compatible kernel. So it is useless for you to flash a isorec recovery if you first don't flash a isorec kernel. Read this thread and download also the kernel compatible.

http://xdaforums.com/galaxy-s2/orig-development/isorec-isolated-recovery-galaxy-s2-t3291176
[Galaxy S II Original Android Development] Lanchon:
you are unable to follow instructions

please don't use this tool
[Galaxy S II Original Android Development] 089man:
Thanks, I have follow instructions now, but the twrp is not flushable for my 5.11 rom. The rom Cwm recovery always avaliable. Think kernel is not compatible with isorec...

I9100 Tapatalk, RR 5.1.1 Lollipop
[Galaxy S II Original Android Development] the.gangster:
That s for sure.
[Galaxy S II Original Android Development] Ham1do:
Wipe system/cache & data .Flash last cm12.1 or cm13 then flash isorec twrp with cm recovery then u must follow Lonchon's instructions on 1st page if u want 1 Gb system repatition
[Galaxy S II Original Android Development] vaxu:
Today I tried this script after some preparations. My S2 was already repitted (but only for 4gb data storage).

- latest IsoRec TWRP (by arnab) installed

- installed repit zip from external SD

After some time it exit with [ERROR 1]. After rechecking the mount (all well), I tried a second time. Script exits with the same error (see photo).

After reboot into system (no problem), to my surprise the data and interal SD partions changed to 6GB/7,5GB. (seen screenshot from DiskInfo)

But sadly /system is still at 512 MB.

My first guess is to less space available, am I right? You wrote:

You mean max 7GB used space from facotoryfs, datafs and ums combined? (speaking for not native english speakers) ;)

According to DiskInfo my S2 should have enough space free.

Have you any suggestions what whet wrong? :confused:

Edit:

The S2 is currently on latest CM12.1 nightly.

And sorry for the wrong turned photo. (damn you windows...)
[Galaxy S II Original Android Development] Lanchon:
there are updated instructions. you need to flash from /tmp. external sd apparently wont work.
[Galaxy S II Original Android Development] asdfvtn:
Hey guys. I'm having an issue trying to get the repartition working. It seemed like it was running fine at first (5-10mins?), then ran into this error:

http://imgur.com/vv1Re5R

I have the latest IsoRec TWRP (by arnab) installed (2.8.7.0), and was flashing from /tmp.

Any idea why this isn't working?

Thanks!
[Galaxy S II Original Android Development] Acid0057:
That's the error I was getting but it worked anyway. Have you rebooted to system and checked with DiskInfo?
[Galaxy S II Original Android Development] 089man:
Have the same error 1,but it's running only 5 seconds. Also it's in red that emm partition can't unmounted. Manually I can't unmounted. I can't disabled the X on the emm partition.

How can I unmounted this emm...?

I9100 Tapatalk, RR 5.1.1 Lollipop
[Galaxy S II Original Android Development] the.gangster:
Go to Install first and select there the /tmp folder.

Then back and into Mount menu. Try to not only uncheck all partitions, but also to change the storage to Micro-SD.

Then back into Install again. (You should still be in /tmp) Start flashing.

That should solve the cyclic reconnecting of eMMC.
[Galaxy S II Original Android Development] 089man:
Thanks, have follow your steps, but don't work. Can't uncheck the emm.

Error 1 and can't unmount emm...

I have Dr Web and cerberus security software installed. Is that the problem?

I9100 Tapatalk, RR 5.1.1 Lollipop
[Galaxy S II Original Android Development] Acid0057:
Nope Dr Web and Cerberus aren't the problem. They can't run in recovery. Please follow these steps EXACTLY.

1. Download your script of choice from the First Original Post

2. Verify the Md5! Use Hash Stamp from the Play Store. It works best for me.

3. Make sure the script is in the internal memory (that's emmc on Twrp) and remove any external SD cards to avoid confusion

4. Boot into Twrp Recovery

5. Using Twrp go into File Manager and copy the script from Emmc to Tmp

6. Go back to the main menu

7. Go into Mounts

8. At the bottom just above the buttons tap on emmc. Select Micro SD.

9. Back at the mounts screen uncheck everything then go back to the main menu

10. Tap install

11. Select the Tmp directory only! Might have to tap Up One Level as twrp will be starting in Micro SD, which will be blank

12. Select Lanchons script and flash.

Twrp will auto mount emmc if you select other directories other than tmp in step 11. These exact steps got it working perfectly without errors for me. Also I'd recommend you delete any copies of the script you have and download a fresh copy. If you get any errors in twrp take a photo of the log or go into advanced and copy log to SD card.

Hope this helps!

[MENTION=4141005]Lanchon[/MENTION] feel free to copy those steps to the Op if you want for clear step by step instructions.
[Galaxy S II Original Android Development] davidvanwijk:
By now I successfully resized /system to 1gb and flashed CM13 and GApps. Thanks!

Verstuurd vanaf mijn GT-I9505 met Tapatalk
[Galaxy S II Original Android Development] 089man:
Thx so much for the great support here, I have all steps do, but I can't uncheck the emm.

No chance....

Here the log. Hope anybody found my problem...

##################################

Lanchon REPIT

A Data-Sparing Repartitioning Tool

Copyright 2016, Lanchon

Device: i9100

####################################

===== PREPARATION =====

info: checking tool: parted

info: checking tool: blockdev

info: checking tool: awk

unmounting all partitions

umount: can't umount /emmc: Device or resource busy

[ERROR 1]

I:Legacy property environment disabled.

E:Error executing updater binary in zip '/tmp/lanchon-repit-v0.1-sys1GB-data6GB-i9100.zip'

Error flashing zip '/tmp/lanchon-repit-v0.1-sys1GB-data6GB-i9100.zip'

Updating partition details...

...done

I:Set page: 'flash_done'

I:operation_end - status=1

I:Set page: 'clear_vars'

I:Set page: 'install'

I:Set page: 'install_image'

I:Set page: 'install'

I:Set page: 'main'

I:Set page: 'clear_vars'

I:Set page: 'main2'

I:Set page: 'mount'

I:Set page: 'main'

I:Set page: 'clear_vars'

I:Set page: 'main2'

I:Set page: 'advanced'

I:Set page: 'sideload'

I:Set page: 'advanced'

I:Set page: 'confirm_action'

I:Set page: 'clear_vars'

I:Set page: 'advanced'

I:Set page: 'main'

I:Set page: 'clear_vars'

I:Set page: 'main2'

I:Set page: 'install'

I:Set page: 'flash_confirm'

I:Set page: 'flash_zip'

I:operation_start: 'Flashing'

Installing '/tmp/lanchon-repit-v0.1-sys1GB-data6GB-i9100.zip'...

Checking for MD5 file...

Skipping MD5 check: no MD5 file found

I:Zip does not contain SELinux file_contexts file in its root.

I:Legacy property environment initialized.

####################################

Lanchon REPIT

A Data-Sparing Repartitioning Tool

Copyright 2016, Lanchon

Device: i9100

####################################

===== PREPARATION =====

info: checking tool: parted

info: checking tool: blockdev

info: checking tool: awk

unmounting all partitions

umount: can't umount /emmc: Device or resource busy

[ERROR 1]

I:Legacy property environment disabled.

E:Error executing updater binary in zip '/tmp/lanchon-repit-v0.1-sys1GB-data6GB-i9100.zip'

Error flashing zip '/tmp/lanchon-repit-v0.1-sys1GB-data6GB-i9100.zip'

Updating partition details...

...done

I:Set page: 'flash_done'

I:operation_end - status=1

I:Set page: 'clear_vars'

I:Set page: 'install'

I:Set page: 'main'

I:Set page: 'clear_vars'

I:Set page: 'main2'

I:Set page: 'advanced'

I:Set page: 'confirm_action'

I:Set page: 'action_page'

I:operation_start: 'Copy Log'

I:Copying file /tmp/recovery.log to /sdcard/recovery.log

I9100 Tapatalk, RR 5.1.1 Lollipop
[Galaxy S II Original Android Development] Acid0057:
Follow my steps EXACTLY. It worked for me.
[Galaxy S II Original Android Development] Ponsel:
Hi [MENTION=4141005]Lanchon[/MENTION],

while sitting bored in a train, I try to figure out how your scripts work. Because I've only my S2 available, I might have overlooked something. So please be patient patient with me. ;)

As far as figured out, the only meaningful difference in your zip files are in 'update-binary'. Every other difference is caused by the signing of the script (please correct me if I'm wrong).

The differences are in the parameters:

lanchon-repit-v0.1-sys1GB-i9100.zip:

system_size=1.0

data_size=same

sdcard_size=max

preload_size=min

preload_content=wipe

lanchon-repit-v0.1-sys1GB-data4GB-i9100.zip:

system_size=1.0

data_size=4.0

sdcard_size=max

preload_size=min

preload_content=wipe

lanchon-repit-v0.1-sys1GB-data6GB-i9100.zip:

system_size=1.0

data_size=6.0

sdcard_size=max

preload_size=min

preload_content=wipe

If I'm right, the difference lies in the parameters. So, here comes my first question:

Is it possible to ship the parameters in an extra parameter file (outside the signed zip). If so, you could give out just one repartition script and several parameter files. Further more it would enable the more experienced users to create their own partition layouts.

That leads me to my second question:

It would be great if the script would accept not only resizing but also deletion and creation of new partitions. By doing so, we could partition our devices to the standard Marshmallow partition layout. If the improbable case occurs that someone wants to go back, he just use the parameter file with stock partition layout and is set for flashing. If deletion and creation of partitions is not wanted we could just shrink unwanted partitions to simulate standard layout.

I'd like to excuse myself for my bad English. I'm not a native speaker and typing on my phone does not make it better.
[Galaxy S II Original Android Development] 089man:
So, now its works. Im so happy.

Thanks for all that help me.

The script was runing only 1 minute, with an error1 on the end.

But now i have 1gb System and 6gb data. Have flash aicp Rom and pico gapps. Also cm13 trim kernel with arnab twrp recovey.

All works fine.

With titanum backup i restored my apps.

Cm 13 much better and smooter as

5.11.

THX again.

I9100 Tapatalk, AICP CM 13
[Galaxy S II Original Android Development] AchiNo:
Downloaded the files days ago, it worked as expected (tried from /tmp). Since I already had repitted earlier with Odin sys1data4 and had wiped afterwards, the script went through very fast. Only noticeable difference was /preload shrunk and internal sd was vfat again. Went back to ext4 and no problem so far.

Thank you for this very simple and clean solution [MENTION=4141005]Lanchon[/MENTION], maybe this will some day lead the way for a data-sparing migration to fuse storage for those afraid of wipe and to further improve our device.
[Galaxy S II Original Android Development] Lanchon:
NEW RELEASE !!!

Better, Easier, Safer

It is recommended that users of the old 0.1 version reflash this update: it will clean up minor issues that the old version might have left behind in some cases.
[Galaxy S II Original Android Development] Lanchon:
that was a prerelease to help guys with CM13 trouble, it wasnt finished.

released now
[Galaxy S II Original Android Development] Lanchon:
i didnt want to answer before. you will benefit from rerunning. thanks!
[Galaxy S II Original Android Development] Acid0057:
Not a problem Lanchon. I did and it worked without error from tmp. Thanks!
[Galaxy S II Original Android Development] wdevil12:
Super! My question is little different. can i specify size on my own? like system=0.7 data=keep preload=0.3 sdcard=keep. because I have second rom in preload running for my certain needs. It fits to 0.3gb and the other 0.2 can be added to system to allow me cm13 pico. Can I me this one running your script or there is not any UI? I am little scared to try zip cause if there isn't any GUI warning, it will shrink my secondary rom. Excuse my request if It seems not valuing what you have already given for us. It's brilliant idea!

I got my answer just looking for new configurable version!

---------- Post added at 08:49 AM ---------- Previous post was at 08:16 AM ----------

@Lanchon Renamed the file to

lanchon-repit-20160212-system=0.7+keep-preload=0.3+keep.zip

Am I correct? Wont it touch any other partition? I only need 0.2 gig from preload for system (not wiping anything)
[Galaxy S II Original Android Development] Lanchon:
i suggest you do this instead: -system=1-preload=same+keep

there is NO REASON to get your partitions unnecessarily full. file systems are not designed to be full.

you need a bigger system? then take space from sdcard, not preload!

and dont resize to 0.7: resizing system takes a long time unless /data is wiped, because all of /data needs to be moved around. so resize to a useful value for some time... 1GB

also de devices works faster with trimmed space in system; it's not wasted! (if you use trim)

BUT IN YOUR CASE, ALWAYS ADD -preload=same+keep!!!!

the script defaults to wiping preload!!! i didn't know anybody used it :)
[Galaxy S II Original Android Development] Lanchon:
i might change the default if people are using /preload...
[Galaxy S II Original Android Development] wdevil12:
ok, Do I only need to add this to file's name?

-system=1-preload=same keep

not mentioning data or sdcard? won't they get wiped? Im still trying to know how system=1 takes extra 0.5 from directly sdcard, not data AS its not mentioned in the name.
[Galaxy S II Original Android Development] Lanchon:
that's NOT the same string that i posted to you! make sure you use the correct string.

please reread the OP -section on defaults- to understand what happens when you don't define something. i've already explained this there
[Galaxy S II Original Android Development] Lanchon:
really, you should be reading the OP! but ill answer the question anyway:

the default for sdcard is:

-sdcard=max+keep+vfat

size is max.

all other patitions have exactly defined sizes. but sdcard has 'max'. this means it will be as big as possible.

if you increase system, sdcard will have to decrease to compensate, as the total size cannot change.
[Galaxy S II Original Android Development] wdevil12:
ok, plus sign just got left because of my browser's fault.
[Galaxy S II Original Android Development] Top_Fuel:
Hello, you need to put two + before ext4?
[Galaxy S II Original Android Development] Lanchon:
yesss!!! read the syntax in the OP please!
[Galaxy S II Original Android Development] Top_Fuel:
Oops sorry you're right, I've read more than once but did not see the [ ] properly, sorry again.
[Galaxy S II Original Android Development] Top_Fuel:
I just finished running the script and everything works.

I was with 1GB system, 4GB data, original preload and the rest in the sdcard formatted to ext4.

I am now with 6GB data and minimum preload, and kept my sdcard formatted with ext4.

Here's the parameters I used:

-data=6-sdcard=++ext4

I started the script in /tmp and unmounted all partitions before starting.
[Galaxy S II Original Android Development] :
Unbelievable. You sad, sad person [MENTION=4415879]CHEF-KOCH[/MENTION]. Maybe xda is not for you, since you clearly have no respect for anyone(more importantly, for the developers who spend countless hours providing the community with roms/kernels/innovative tools for our devices). For what it's worth Lanchon, you are one of the very few (elite)developers in the S2 community who really deserves all the recognition you get. Your work has benefitted many, many users. I hope you don't lose your motivation because of a moron like this
[Galaxy S II Original Android Development] Kevin3014:
Or rather "CHEF-CROOK". ;)
[Galaxy S II Original Android Development] makix13:
Agree with you [MENTION=6418283]noppy22[/MENTION], this kind of bastard should be out of this planet (some kind of virus attacks this insane & ****ing idiots to put them out of here?).

My eternal respects to you [MENTION=4141005]Lanchon[/MENTION], for your amazing work, hope this **** person goes to Mars and never come back,

S2 Cyanogenmod 5.1.1 [official nightly] - Lanchon's kernel isorec - arnab isorec twrp - Xposed [official framework] - Viper4Android
[Galaxy S II Original Android Development] cherryb8844:
Hay [MENTION=4141005]Lanchon[/MENTION] why don't you report about him to their forum moderater and administration say to them they have a thief and stole your work that already posted on xda.

And clam fight for justice buddy we all with you.

Me

Xda members

DAVS

moderater and administers of XDA
[Galaxy S II Original Android Development] jer194:
blockdev: /dev/block/mmcblk0: Device or resource busy

Really nice work, thanks a lot Lanchon!

I did the repit before already, all ok for me so far on my S2 / CM13.

In order to shrink the preload, I tried the 20160212 version, however didn't succeed.

I first tried adb sideload, then TWRP Install, finally via adb shell, running the /tmp version:

/tmp # df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 402512 52 402460 0% /dev
tmpfs 402512 548 401964 0% /tmp
/tmp # ./updater lanchon-magic -system=1
####################################
Lanchon REPIT
A Data-Sparing Repartitioning Tool
Version: 2016-02-12
Device: i9100
Copyright 2016, Lanchon (GPLv3)
####################################

===== PRELIMINARY CHECKS =====
info: valid package name: <prefix>[-system=<conf>][-data=<conf>][-sdcard=<conf>][-preload=<conf>]<suffix>
info: valid partition configuration: [<size-in-GiB>|same|min|max][+[keep|wipe][+[ext4|vfat]]]
info: defaults for 'system': size=same, content=keep, fs=ext4
info: defaults for 'data': size=same, content=keep, fs=ext4
info: defaults for 'sdcard': size=max, content=keep, fs=vfat
info: defaults for 'preload': size=min, content=wipe, fs=ext4
info: parsing package name

----- CONFIGURATION -----
system: size=1, 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

info: unmounting all partitions
info: rereading partition table
blockdev: /dev/block/mmcblk0: Device or resource busy

===== PREPARATION =====
info: unmounting all partitions
info: rereading partition table
blockdev: /dev/block/mmcblk0: Device or resource busy

That's where I'm stuck in all my attempts.

No clue what's wrong with my device (it seemingly works for others ...).