yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] sennator:
The latest TWRP 3.1.1-0 doesn't work correctly on the i9100. It won't detect the internal SD and system partition, so you can't flash any ZIPs/IMGs or wipe the device.

TWRP 3.1.0-0 works perfectly fine, though.

Just FYI.
[Galaxy S II Original Android Development] Lanchon:
wrong thread
[Galaxy S II Original Android Development] TeutonJon78:
[MENTION=4141005]Lanchon[/MENTION], so with this change being merged with CM mainline, what's different at this point between your kernel and the mainline one? Just the inclusion of TRIM, or is that in mainline now too?
[Galaxy S II Original Android Development] Lanchon:
TRIM. for time being nothing is mainline.
[Galaxy S II Original Android Development] makix13:
I can confirm more than 3 days without problems, latest Lanchon's isorec kernel + arnab's isorec recovery.

Not issues to flash, working great, only a issue recording video but I think it's not related to isorec solution [emoji6]

S2 Cyanogenmod 5.1.1 [official nightly] - Lanchon's kernel isorec - arnab isorec twrp - Xposed [official framework] - Viper4Android
[Galaxy S II Original Android Development] kvevand63:
Lanchon, sorry for the delayed feedback. Currently running my d710 on CM11 latest nightly along with your IsoRec kernel and recovery. Flashed and booted no issues encountered. Speaking of CM12, a few months back dev dastin105 compiled and posted CM 12 for the d710 however it would not boot past the SGS II splash screen. Was able to boot back into the bundled recovery, but was unable to restore nandroid. Odin one click of Agats kernel allowed me to restore nandroid. I am hoping that with further research and your IsoRec CWM 6.0.5.1 recovery (which should work on CM 12 from what I understand) I may be able to compile CM 12 for the d710. Again thank you for your work on continued support of the SGS II. You, sir, are the best
[Galaxy S II Original Android Development] Lanchon:
thanks!

why don't you do better? make sure you can compile cm11 for i9100 and d710, and cm12.1 for i9100. then do a 3-way diff of the device trees: compare cm11 device trees for i9100 and d710, take note of the differences, then try to apply those differences to the cm12.1 i9100 device tree. you'd be stealing all of LA's awesome work and it's probably very simple to do :)
[Galaxy S II Original Android Development] Lysergic Acid:
Sir, your implementation is now on CM kernel, I hope nothing breaks :silly:
[Galaxy S II Original Android Development] Lanchon:
cool thanks!! very good news :)
[Galaxy S II Original Android Development] Dr AM:
Thank you , TWRP works perfectly on CM13 :)

Sent from GT-I9100 - 6.0.1
[Galaxy S II Original Android Development] fubo73:
Everything seems ok here with 12.1 nightly 20160119 and arnab's recovery.
[Galaxy S II Original Android Development] kal4metal:
It works like a charm here. Thanks for this amazing nightly [MENTION=4141005]Lanchon[/MENTION] and [MENTION=6159291]Lysergic Acid[/MENTION]. It would be awesome if we got trim support in the nightlies as well since there are clearly NO side effects.
[Galaxy S II Original Android Development] Lanchon:
i submitted the patch yesterday, let's see how that goes
[Galaxy S II Original Android Development] kal4metal:
That' great! Can you post the link with the patch so we can stay updated?
[Galaxy S II Original Android Development] Lanchon:
lol it is posted on the trim thread where it belongs :)
[Galaxy S II Original Android Development] Dr.Fix:
Hi, what is the procedure for installing the IsoRec recovery (it is not explained in OP)?

Copy to sd and install zip from standard CM recovery?
[Galaxy S II Original Android Development] makix13:
First you need to flash isorec kernel to be able to take advantage of isorec recovery.

In my case, I flashed latest Lanchon's kernel Isorec (from CM recovery) then arnab isorec recovery[emoji6]

S2 Cyanogenmod 5.1.1 [official nightly] - Lanchon's kernel isorec - arnab isorec twrp - Xposed [official framework] - Viper4Android
[Galaxy S II Original Android Development] the.gangster:
Sorry you are wrong!

Since CM12.1Nightly 201601019 the patch is included in stock kernel. So now there is native support for IsoRec Recoveries.
[Galaxy S II Original Android Development] makix13:
yes, and you are right [emoji2] [emoji106]

Thanks for correct me, glad to see isorec in official CM and sorry for the mistake, need to read more before post [emoji2]

So now more easy for us!! Hope trimm will be included in CM, cross fingers.

S2 Cyanogenmod 5.1.1 [official nightly] - Lanchon's kernel isorec - arnab isorec twrp - Xposed [official framework] - Viper4Android
[Galaxy S II Original Android Development] franticfreddy:
I hardly hope that trim DONT will be included in cm12.1 official/snapshot(!), because there is really potential risk of bricking the phone. personally 1 of my 4 s2 i9100's is defective now (all have same most faulty emmc chip) because i used this trim kernel and trimmed the phone. I cant understand why many people say its totally safe and so on. Maybe im just a lone wolf but im that unlucky guy.

--

I respect this hard and very good work of [MENTION=4141005]Lanchon[/MENTION] and say many thanks :)

The recovery part works great and this should be the only patch included for

official noob-user friendly snapshot release.
[Galaxy S II Original Android Development] the.gangster:
There are a million ways to brick a phone. Are you 100% sure, that the trimming bricked it? Meaning both, trimming caused the problem and that it finally is really "bricked"?
[Galaxy S II Original Android Development] Naudiz:
It's way easier to kill your emmc by not trimming it, than by trimming. Also Trim-kernel on i9100 has been tested for 2 years now without any reports of bricks.

That being said, this is not the TRIM thread ;)
[Galaxy S II Original Android Development] T4underbolt:
hello. I had i9100 a long time ago and right now I had an opportunity to help my friend with flashing new software. I flashed philz cwm first, then I flashed newer CWM version and flashed lineage os kitkat version, because lineage os 7.1.2 didnt flash. Now Id like to flash lineage 7.1.2, but unfortunately it is said I need a proper kernel to be able to flash TWRP IsoRec to be able to flash lineage. Can you tell me what to do now? I dont want to brick the phone.
[Galaxy S II Original Android Development] Lanchon:
i suggest you flash one of my old isorec trim kernels, then flash some isorec twrp from zip. reboot recovery and you should be on TWRP. use the flash IMG feature to update twrp to latest version.

you can now flash lineage but dont! the thing wont fit in the /system partition.

go to my repit thread and repartition the phone to use 1GB /system and 6GB /data (at least). make sure you instruct repit to WIPE (not resize) the partitions: it would be a silly waste of time and flash life to resize. read the docs!!!

now you can flsh lineage.

note that in twrp you can transfer files to the phone via USB using both MTP and mass storage (enable the UI) protocols.
[Galaxy S II Original Android Development] DaroAce:
Hi! Is it flashable via ODIN?
[Galaxy S II Original Android Development] Lanchon:
isorec recoveries depend on an isorec compatible kernel flashed and working on the device. so if ODINing you might need to flash a kernel too.

now, reports indicate that many (if not all) windows ODIN executables are unable to flash isorec recoveries due to shortcomings in said programs.

but the i9100 download mode is certainly able to, and you can accomplish the task with heimdall (http://glassechidna.com.au/heimdall/) the free software cross-platform alternative to odin.
[Galaxy S II Original Android Development] exia1:
i9100

Hi Lanchon, thanks for your great work on this.

I haven't been making any changes for your i9100 for a while and wasn't comfortable with flashing my phone before I checked this. I have no idea what I should do and was getting confused with different instructions.

I currently have a i9100 and it is on CM11 i believe and it already has a CWM recovery on version 6.0.5.1

Can I proceed to flash one of the Kernals on your links and then flash the twrp recovery?

Which Kernal should I flash ? ( There were so many versions )

I think the procedure was to flash the custom kernal, flash twrp and then reboot and immediately boot into recovery ? I heard that your recovery will disappear if you don't boot into it straight away after flashing the recovery?

Thanks
[Galaxy S II Original Android Development] Lanchon:
read 3 messages before your post!
[Galaxy S II Original Android Development] Siraj7:
Recover not updating

Hi Lanchon,

currently Im using CM 12.1, using cyanogen recovery. im trying to load lineage os 14.1. i tried the adb root command promt steps to flash twrp-3.1.0-0-i9100.img but its keeps showing the same cyanogen recovery. how to resolve this?
[Galaxy S II Original Android Development] Jochen K.:
Hi, siraj7,

have you looked at #583?

Shouldn't that also work for you?
[Galaxy S II Original Android Development] Lanchon:
you need an isorec compatible kernel. READ !!!
[Galaxy S II Original Android Development] R324D:
Hi, my friend owns galaxy s2 (intl) and want to upgrade it to LOS, so he asked me to, because he does know I also owned it six years ago and have little experience on it.

So in short, the device comes to me, and I noticed it's already pre-installed with cm12+the old cyanogen recovery.

I managed to install twrp using this method, but when I tried booting to recovery it's still shown the old cyanogen recovery.

One thing that makes me wonder is.. Though it's got cm12 installed, but in the odin mode said, "custom binary download=No" and "current binary =Samsung official".

Should it supposed to be "custom" if it's already loaded with cm rom? cmiiw

I don't know what to do, every time i manage to install twrp it's always come back cyanogen recovery..
[Galaxy S II Original Android Development] Prinus:
Read post #589
[Galaxy S II Original Android Development] Little Rooster:
Broken Link: "Official CyanogenMod 12.1 and 13 kernels are now IsoRec-compatible !!! (link)"

I would like to try this Kernel on my Lollipo.

Can i install this Kernel on "Tesla-i9100-5.1.1.Arc_Flash.2.3-MR1-20151113.zip" Rom?

May this solve my DRM incompartibility problem?

Thanx for infos,

Rooster
[Galaxy S II Original Android Development] AnubuRe:
Sorry for lack of my knowledge but can i use this info in post #1 & ADB to

:fix a boot loop that i cant get into recovery by holding down power and volume up? (the home button doesn't work)

Currently in boot loop with android logo, holding volume up and power until Samsung logo does not boot into recovery.

SGS2 rooted International version

Thx
[Galaxy S II Original Android Development] TriboDoP:
Hi

Without home button you cannot reboot recovery.

(All 3 buttons are needed)

But yes you can reboot recovery using adb (device connected to pc and android debugging has to be allowed in developer-options on your s2)
[Galaxy S II Original Android Development] AnubuRe:
Thx

I didn't try again until recently (as its just a mess around spare phone) but still no luck. cant connect to adb because i think the boot loop.

Will try fix it again 1 day.
[Galaxy S II Original Android Development] samarium:
Looking for an updated n7000 IsoRec recovery, and followed the TWRP Patcher instructions from the OP, looking for a n7000 patcher, and found:

There is only a n7000 crossflash patcher in [MENTION=4141005]Lanchon[/MENTION]'s download area, not a plain n7000 patcher.

The cross flasher that I did find failed when updating recovery because it didn't use -9 for lzop, and thus the compressed recovery was too big for the recovery partition. At least that was the case for TWRP 3.2.3-0 i9100.

Below is a patch to correct the compression and to turn it into a normal n7000 TWRP Patcher. The first part of the patch is probably relevant to all the patchers. I have also attached the patched TWRP Patcher for i9100 to n7000 to this post.

$ diff -u -r ../old .
diff -u -r ../old/META-INF/com/google/android/update-binary ./META-INF/com/google/android/update-binary
--- ../old/META-INF/com/google/android/update-binary	2008-02-29 00:33:46.000000000 +1100
+++ ./META-INF/com/google/android/update-binary	2019-01-21 15:24:40.000000000 +1100
@@ -307,7 +307,7 @@
rm -r $tdir

info "compressing"
- if ! lzop <$tcpio >$tlzo; then
+ if ! lzop -9 <$tcpio >$tlzo; then
fatal "compressing failed"
fi
rm $tcpio
@@ -325,6 +325,6 @@
#####################################################

device=n7000
-crossflash=true
+crossflash=

main "$@"

Incidentally, I was hoping that the patched i9100 recovery would detect encrypted /data on n7000 like it does on i9100, but that doesn't seem to be the case, and since the base IsoRec recovery seems to be the same, I guess the issue is unfortunately more ROM related between [MENTION=799465]bauner[/MENTION] 's n7000 NIghtOwl LinageOS 15.1 and [MENTION=2222292]rINanDO[/MENTION] 's i9100 LineageOS 16.1 and I have no idea where I should be looking now, except maybe I need to understand how to extract the base initrds and compare them, but this is probably not the thread to discuss, I'll make a separate post on the NightOwl 15.1 thread.
[Galaxy S II Original Android Development] Rendering:
Hi, during these years I have installed custom ROMs on many S2 devices. Today I have to install LineageOS on a friend's S2 that still has the Samsung stock ROM. What is the first step I have to do to install IsoRec?
[Galaxy S II Original Android Development] linusdan:
See these instructions:

https://xdaforums.com/showpost.php?p=77678814&postcount=3
[Galaxy S II Original Android Development] machuidel:
I tried flashing TWRP using different methods (following all the instructions), but it keeps starting the CM-based Recovery v6.0.5.1 (last time I installed a custom rom was ~5 years ago). I did the following after running "adb root":

$ adb push twrp-3.3.0-0-i9100.img /dev/block/mmcblk0p6

twrp-3.3.0-0-i9100.img: 1 file pushed. 8.9 MB/s (7275589 bytes in 0.779s)

I think my current installation is too old for the instructions to work. What should I do?

Some more info about the hardware:

Processor : ARMv7 Processor rev 1 (v7l)

processor : 0

BogoMIPS : 1592.52

Features : swp half thumb fastmult vfp edsp neon vfpv3 tls

CPU implementer : 0x41

CPU architecture: 7

CPU variant : 0x2

CPU part : 0xc09

CPU revision : 1

Hardware : SMDK4210

Revision : 000e

Got it to work by doing the following:

heimdall flash --repartition --pit I9100_1.5GB-System_6GB-Data_512MB-Preload_by-the.gangster.pit --KERNEL boot.img --RECOVERY twrp-3.3.0-0-i9100.img --no-reboot

From there I followed the instructions at (also had to format data using the "Format Data" option instead of "Advanced Wipe"):

https://xdaforums.com/galaxy-s2/development-derivatives/pie-i9100-t3850588
[Galaxy S II Original Android Development] Lanchon:
you have to update your kernel to one that supports isorec, such as official LineageOS or my old kernels.
[Galaxy S II Original Android Development] MegaSharkXDA:
Hi there guys! Am trying to flash TWRP v3.3.1 on a GT-i9100 currently running cm-12.1-20151116-SNAPSHOT-YOG7DAO1JN-i9100 (TWRP v3.5.2 results in an error adb: error: failed to copy 'twrp-3.5.2_9-0-i9100.img' to '/dev/block/mmcblk0p6': remote No space left on device).

Result:

twrp-3.3.1-0-i9100.img: 1 file pushed, 0 skipped. 0.9 MB/s (7277965 bytes in 7.540s)

But when I press home+power+vol up I'm still booting into Cyanogen Recovery.

Am I missing something?

Thanks in advance!
[Galaxy S II Original Android Development] 2331151796:
Removed
[Galaxy S II Original Android Development] Lanchon:
your phone absolutely did not break because of trim. also trim does not break the millions of stock 4.1.2 phones out there in the world, all with trim enabled as stock 4.1.2 has trim.

your phone died like many others without trim due to emmc fatigue and failure probably. not using trim ages the emmc many many times faster than using it, so your other phones will end up giving in sooner than needed. and this time it will be your fault because you can prevent that now. i suggest u start trimming those phones ASAP.

for the record, you are the first person that ever reports a problem with a trim kernel. due to so many people using trim and the rate of death of these old devices (without trim), it was a question of time before one died on trim of unrelated causes.

you seem to not know the story: devices really died. after a single operation. every time. WITH CERTAINTY. brickbug is a reproduceable software bug, not some ghost that haunts one person only in the middle of the night to mock him. brickbug is cured, it is no more. devices die due to many reasons and happily brickbug is not one of them anymore.

again, not using trim kills your devices, not the other way around. read about write amplification and flash write endurance to know why.
[Galaxy S II Original Android Development] franticfreddy:
Well it could be strange unfortunate accident but my phone which bricked went without any single error since over 4 years , but now when i did execute fstrim -v /system and wanted do normal reboot, i got black screen. and it wont turn on again, no mode is working, no download no recovery, nothing. real bad luck. =/

--

anyways thanks much for your information! [MENTION=4141005]Lanchon[/MENTION]
[Galaxy S II Original Android Development] Lanchon:
im sorry to hear that. was that the first time ever you trimmed and was it the first use of trim kernel? or did you trim before or used the kernel before?
[Galaxy S II Original Android Development] franticfreddy:
as you supposed right some posts before, yes i never did trim that phone before, because it didnt work for me with stockrom and also other cm-roms.

i did flash the trim kernel include isorec only when released, no other.

with this trim kernel i could enter the fstrim command without getting error message and first time ever, i seen it was executed on that phone. it looked like it should.

(i did this on my s4 and s3-neo also, im not unexperienced.)

im also suprised why that happened, but anyways i cant do anything about it.

i have 3 phones left, im going to try again in some days when next nightly with new kernel will release then..

so long, thanks again for your detailed informations and your time! :) [MENTION=4141005]Lanchon[/MENTION]
[Galaxy S II Original Android Development] Lanchon:
too bad. yes the trim commands look normal. and you did everything right.

just a couple of comments:

-stock 4.1.2 kernel does trim. maybe you were missing the fstrim executable.

-AFAIK, brickbugged emmcs dont just not boot: there are areas of the flash to which reading or writing causes the emmc to stop responding. some people have partitioned around these areas. but AFAIK, it doesnt affect the bootloader, so the phones show the logo. or this happens 99% of the time, i'm not completely sure.
[Galaxy S II Original Android Development] yosmokinman:
^The IsoRec is awesome and so simple as you said I can't believe it wasn't thought of earlier. Nice!

The trim on the otherhand I still say is not safe at least with the brickbug chips that you've seen here https://wiki.cyanogenmod.org/w/EMMC_Bugs

[MENTION=7192829]franticfreddy[/MENTION] above clearly experienced it. Do you know the emmc version freddy? If you're going to try it on the other ones check the version first.

Entropy also said it doesn't happen in only one specific area and doesn't always happen the first time. And I'd assume the "millions" still using this phone on the latest stock firmware, and it just "broke," they got a new phone and didn't post about it.

Not hatin on you man! I just don't trust trim on this phone after reading here and the i777 forums since 2012.
[Galaxy S II Original Android Development] Naudiz:
Sorry, I can't find the part where it says that the patch doesn't work. Samsung released the patch in 2012, I find it highly unlikely that not a single user has reported a brick post-patch, just because they all bought new phones, lol
[Galaxy S II Original Android Development] franticfreddy:
Yes i did check my emmc and its the most faulty chip. And sadly its on all my i9100 phones the same. =/

As you can see, its the damn VYL00M chip with firmware rev. 0x19, from 2011.

The fix from samsung was to prevent some instructions on these.

Maybe trim kernel enabled them again..?

Because on some devices it can really work flawlessly, the trim kernel isnt really that bad.

Its not just good to generalize it, on nightly/snapshot release.

Only skilled users who know about their devices if affected, should flash trim

kernel by hand.

--

Sorry for offtopic.

Best regards :)
[Galaxy S II Original Android Development] the.gangster:
Just one question:

Does CM12.1 ever trigger trimming by itself just because the kernel supports trimming?

As I understood it, it has to be fired by the user (or an automated task he creates), hasn't it?
[Galaxy S II Original Android Development] chrisXL:
[MENTION=7192829]franticfreddy[/MENTION]

I don't think your s2 was bricked from the trim. I have your same EMMC chip / fwrev and trim works perfectly (see attach). There must be something else.
[Galaxy S II Original Android Development] Lanchon:
hi! actually you are not saying anything new here. i've started a couple of threads on the subject. read this thread entirely:

http://xdaforums.com/android/software-hacking/project-brickbug-aftermath-recovering-t2823051

then read at least the first posts on this thread:

http://xdaforums.com/galaxy-s2/development-derivatives/rom-brickbug-aftermath-speeding-t2843238

http://xdaforums.com/galaxy-s2/help/qa-trim-speed-cyanogenmod-galaxy-s2-t2910715

then add knowledge if you have some to share. the problem here is being off-topic; in the right thread you would have seen that i've been up to date with every resource on the subject for 2 years now. and no, stock i9100 4.1.2 used on millions of phones at times since 2012 did not brickbug any one of them. brickbug has specific symptoms and it just didn't happen. please keep the trim discussion on the trim thread if possible.
[Galaxy S II Original Android Development] Lanchon:
i thought you would have given this info if you had it! VYL00M fwrev 0x19 is the most common eMMC on the i9100 by far. it is the most tested eMMC on trim. trim is absolutely safe on these devices.

trim saves a lot of wear on the emmc, on future writes, by lowering write amplification. but the command itself can actually erase (and can also write) a lot to the flash. so if your flash is giving in, trim might be the last drop that triggers a failure. in your case, if you hadn't trimmed, i guess you device could have lasted a couple more boot ups and that's it.
[Galaxy S II Original Android Development] Lanchon:
CM11 trimmed by itself, during maintenance windows. you can look in your phone logs, it should be there. CM12.1 probably does too, as do all AOSP androids since 4.3, unless somebody specifically disabled that functionality in your build.

sammy i9100 sock 4.1.2 did not trim automatically because that code wasn't in android yet. but sammy could have mounted the /data partition with the DISCARD mount option, in which case trim happens online with emmc access, every time you free up space in the file system. i don't know if stock partition is mounted with DISCARD or not. AOSP android recovery also trims (actual emmc command used is ERASE) from android 4.0 whenever it wipes a partition. sammy i9100 sock 4.1.2 does this, i know it for a fact.
[Galaxy S II Original Android Development] Lanchon:
UPDATE: new TWRP for the i777 contributed by [MENTION=5294352]cyril279[/MENTION].

thank you so much cyril279!!!
[Galaxy S II Original Android Development] MikiGry:
Emm. But as far as i know TRIM and NON TRIM kernels act in exactly the same way unless you havent installed any trimming app/excuted trim command. So if TRIM gets manarged in official CM kernel , there will be no differance unless you havent installed for. ex trimmer. Am i right [MENTION=4141005]Lanchon[/MENTION] ?