yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] Lanchon:
so you were able to successfully TRIM and you noticed no difference? maybe you were on a 4.1.2 stock-derived kernel (they allow trim, only AOSP derived kernels block it, as explained in the first post) and running a 4.3 or later android, and the combo was trimming your device already and without your knowledge. risky...
[Galaxy S II Android Development] Lanchon:
yes!
[Galaxy S II Android Development] Nickthegr8:
Works fine ... u r maybe a great person or the einestein of i9100. ... modding without a device ... i bow :D
[Galaxy S II Android Development] Lanchon:
lol the changes are very very small! the building process was a bit hard to get right without a device because the instructions are actually wrong and produced dud roms. oh well...

what did you flash then? did you flash the rom, the recovery, or both?
[Galaxy S II Android Development] Nickthegr8:
Both ur M9 rom , ur dirty recovery then ran lagfix and Boum... launched to the moon
[Galaxy S II Android Development] Lanchon:
lol

do you see any difference in performance? i expect apps that write to the disk to be much more smooth, and also multitasking. when the phone is finishing boot but already usable, while it is initializing many apps at once, it should clearly be more responsive i think.
[Galaxy S II Android Development] Nickthegr8:
First Bug... WiFi not working anymore ... doesn't tturn on ? any suggstions

---------- Post added at 08:36 PM ---------- Previous post was at 08:35 PM ----------

it is faster ... i can see a boost
[Galaxy S II Android Development] Lanchon:
crap!!! it must be the blobs im using! :(

yes, suggestion: flash official M9, then flash only my recovery again. i think that will overwrite the kernel in your device. if the wifi works, keep it that way. if not, go back to official kernel. the speedup will remain for some time, while the trimmed free space is used up. tell me how it goes!
[Galaxy S II Android Development] Nickthegr8:
By ur kernel means the non dirty one right ? can i flash ur M9 also? i don't want offical m9 i love urs (ur rom...don't get me wrong) :)
[Galaxy S II Android Development] Lanchon:
lol both kernels should be the same, i dont really know what that dirty thing means. my M9 has nothing special, its only the kernel and recoveries patched. try flashing official M9 then my recovery (includes kernel) over it. it should replace the kernel (confirm and tell me), and if the wifi works, you are all set.

meanwhile... im about to go for a bike ride :)
[Galaxy S II Android Development] Nickthegr8:
working ... enjoy see u later ..gtg sleep
[Galaxy S II Android Development] Lanchon:
hey, be more specific before you go!

flashed official rom, then my recovery and...

1) you ended up with my kernel?

2) wifi works?

thanks!
[Galaxy S II Android Development] Nickthegr8:
Yes
[Galaxy S II Android Development] Lanchon:
thanks! based on your input i updated the installation steps...

now i recommend:

1) flash official M9

2) flash my M9 recovery/kernel

in this way:

1) wi-fi reportedly works

2) ART may work... if anybody tries let me know (have official M9 ready in your phone to flash if you enter a boot loop; flash it, disable ART, reflash my kernel)
[Galaxy S II Android Development] Lanchon:
in your "before" bench post, you posted the same snapshot twice :) so we really cant tell. but you say there's no change, got it.

some people report no change. also these people say trim is successful but almost instantaneous. normally trimming /data takes something like 10 seconds, not 0.2 seconds. i think that when samsung realized that certain commands were killing the emmcs, instead of halting production until they fixed the bug, they just disabled all of the commands. even the ones that are not dangerous. i suspect there is no way to trim your device.
[Galaxy S II Android Development] gazdajezda:
Oh, i see... Here is the right screenshot. Nevertheless, you fixed the brick bug :) And yes, trimming was almost instant...
[Galaxy S II Android Development] chrhei:
WLAN drops connection in standby/screen off

Has somebody experience with this issue: IPv6 enabled LAN and WLAN drops connection in standby/screen off?

Reference: http://developer.samsung.com/forum/board/thread/view.do?boardName=General&messageId=239890

Currently I do

echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6

after I enable WLAN to mitigate this problem.

THX.
[Galaxy S II Android Development] Lanchon:
thanks! [MENTION=3125028]chrhei[/MENTION] explained on PM that this is a CM kernel issue so i won't be fixing it here.
[Galaxy S II Android Development] Acid0057:
Hopefully it gets fixed soon my ISP is bring ipv6 soon plus some devices on my router are already using it.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk

EDIT:

Just tried to take on partitioning the phone and it isn't working. For some reason the internal SD Card resizes properly but the Data partition gets stuck at 648MB every time. I was trying to increase my data partition to 6GB with no preload and the remaining on the SD Card. I've been using Heimdall on OS X to do the repartition.

Any thoughts as why this is happening? Thanks! Should I try to get ahold of a Windows PC and use Odin?

For now I've restored my Nandroid and Internal SD card and flashed my original downloaded PIT file from Heimdall.

Here's my exact steps.

1. Backup everything (Copy Internal SD to PC)

2. Put phone into download mode

3. Run Heimdall command from terminal "heimdall flash --repartition --pit i9100mod.pit --RECOVERY recovery.img --no-reboot" (I just renamed the PIT file I was using to i9100mod.pit and the recovery is a CWM Recovery)

4. Reboot to recovery copy CM11 M11 to internal SD

5. Flash CM11 M11 in CWM

6. Boot phone and here I see that the internal is less than before but the SD card is partitioned properly.
[Galaxy S II Android Development] zekenka:
Hello!

I'm also a proud user of SGS2 and was wondering what this kernel is about and what are the benefits that are able.

Note that I did read throu the first 2 posts i think it was really messy and hard to understand what is the benefit of this product.

So could anyone explain in simple manner the PROs and CONs and what should be kept in mind installing this kernel

[IMG="brickbug?"]http://oi58.tinypic.com/fpat0x.jpg[/IMG]

[IMG="rom"]http://oi61.tinypic.com/2nuj4mg.jpg[/IMG]
[Galaxy S II Android Development] Acid0057:
Sorry on mobile so can't see if you have brickbug in your image.

Pros:

- can be faster if your phone is older (mine is way faster) this is due to bad blocks being trimmed just like laptop and desktop ssds and modern phones

- if you repartition at the same time you can get bigger app space. (this you'll need to read up on as it requires more steps.

Cons

- can brick your phone depending on you're emmc.

Note : I fixed my problem repartitioning. Forgot to format in cwm after flashing

So in summary, check and make sure you don't have emmc bug link in op, find kernel matching your snapshot build. Boot into recovery, flash kernel, reboot, run lagfix, reboot again.

Hope this helps.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] zekenka:
Thanks for the reply what about the battery life improvements or antutu benchmark scores?
[Galaxy S II Android Development] mparus:
Maybe you can build trim kernel for omnirom i9100?
[Galaxy S II Android Development] Lanchon:
its explained in the title and first paragraph of the OP

1) this is for cyanogenmod users

2) "this project restores TRIM capability to CyanogenMod kernels for the Galaxy S2 family of 4210-based devices: i9100, i777, d710 and n7000. TRIM is needed to avoid "aging" of the state of the eMMC, the internal flash storage, that eventually slows the device to a crawl. TRIM functionality is built into android 4.3 and later. however, due to historical and safety concerns, TRIM capability was removed from the CM kernels for these devices (and from most if not all other AOSP-based kernels)."
[Galaxy S II Android Development] Lanchon:
i wont. but... i will provide an alternate solution for users of other roms :) stay put!
[Galaxy S II Android Development] Acid0057:
I'll be posting mine soon. Phone is faster battery life is a little better I get an extra hour or two after trimming.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] M0RT3ZA:
[MENTION=4141005]Lanchon[/MENTION]

Thanks for your great kernel.

Your kernel works well on CM and made my phone extremely fast. Can you build a kernel with swap support for Omni?
[Galaxy S II Android Development] teraßyte:
I'm interested in trying this kernel but I use Markox89 build of CM 11 which is more optimized. On which nightly would I be able to use the current M11 kernel safely?
[Galaxy S II Android Development] Terr20114:
Used this On My i777 running the GT-i9100 CM11 build. I had to reboot into recovery, flash the GT-i9100 Cm11 kernel (after removing the getprop lines of code from the updater-script) reboot without wiping, run lagfix then reboot into recovery again and flash back my i777 kernel cause I can't use a GT-i9100 kernel (no mic on calls, capacitive buttons don't work).

Results: PHONE IS FLYING! GREAT SPEED UP

Bug: insane chip (VLY00M)
[Galaxy S II Android Development] Lanchon:
but why didnt you use my i777 kernel instead of the one for i9100??
[Galaxy S II Android Development] Terr20114:
I'm using a GT-i9100 CM11 so i can't use a regular i777 kernel or it won't boot. Does the kernel support Intl S2 Roms?
[Galaxy S II Android Development] Lanchon:
i suppose not, i dont know! pardon my noobness, but why r u using the i9100 build on the i777?
[Galaxy S II Android Development] Terr20114:
The CyanogenMod Roms for the i777 stops at CM10.2 no updates after that. The i9100 has updates that are up to date. That's why I choose them
[Galaxy S II Android Development] Lanchon:
got it! yeah :)
[Galaxy S II Android Development] Stefan2142:
Here is my situation.

I had 4.1.2 JB. Installed CM-11-20140708-SNAPSHOT-M8-i9100 and CWM_6.0.4.7(coming previously from Siyah-s2-v6.0b4) at the end of July. In the beginning of October my phone just shut down. That was happening before on the same and previous roms so I wasn't worried. I turned it on and phone was in bootloop. That was strange because the last time that my phone was in bootloop I knew the reason - I installed Chainfire3D. So bootloop without any cause..that was strange. I tried making a backup before flashing the ROM from CWM but I got an error. I can't remember the message but I can dig if it is important. I tried then flashing recovery(bad idea) and Odin reported an error. When I restarted phone I noticed that my Recovery mode was gone. Just gone and with no solution on how to restore it. I tried numerous methods OMAP drivers, heimdall, .pit file method but nothing. The only thing that worked was using Heimdall but the success was partial. Only 2 files could be flashed to their partitions. So I brought my sgs2 to the store where I bought it and they concluded that it was bad eMMC chip and they replaced the motherboard.

Now, I checked with the emmc brickbug checker app and I have the VYL00M chip with FwRev: 0x19, Date: 05/2011. I am currently running the stock JB 4.1.2 rom with Siyah-s2-v6.0b4.

I think that it was something wrong with that CWM recovery that caused the superbrick.

My question is - Which of kernels/recoveries would you recommend me that have the least percentage of producing the eMMC brickbug? And also,

And I know that this was probably asked many times before but I am reading too much information about it and the more I read the more it confuses me. Thanks in advance.
[Galaxy S II Android Development] Lanchon:
no, it wasnt brickbug. you had a faulty emmc, thats all. the standard CM kernel/recovery is totally safe. recovery and kernel are the same thing in the i9100, so even if your system was ok when you had the failed recovery flash, the system would have been gone anyway (no kernel) so dont be hard on yourself.

if there was a way to boot it (probably, flashing a short chaining bootloader in place of the kernel with odin and a kernel elsewhere) maybe a low level secure partition resize would have saved the board (google kindle fire brickbug fix). maybe. and it would probably have taken months of work to pull off :)

or maybe the emmc was physically busted.

no need to worry about brickbug these days. stock 4.1.2 and official kernels are safe.
[Galaxy S II Android Development] Stefan2142:
Oh thanks God someone on this part of forum who knows things. :) But I don't know how could it got busted. That day around 5pm it worked well and when I checked it around 8pm it was off. I really don't know what could have caused that.

Thanks for clarification but what is the difference betweent emmc brickbug and faulty emmc? I mean, how can I recognize it if it happens again?

I know that stock 4.1.2 is really safe but I want to install CM 10.1 on sgs2(afraid to go again on CM11 :). Is that ROM safe in terms that it won't make my emmc chip faulty? And what cwm/recovery should I install to lower the risk of brickbug?

Sorry for so many questions but I really need the info from someone who has the knowledge.
[Galaxy S II Android Development] Lanchon:
it just broke, it was not your fault. you can install either CM10 or CM11, they DO NOT trigger brickbug. you cant lower the chance because the chance is zero.

brickbug is a software bug in the firmware of the emmc module (yes, the module has a separate processor inside running its own software and nobody can modify or upgrade it). it predictably locks the module (hangs) if you trigger it by sending some commands. brickbug safe kernels wont. ever!

a faulty emmc is just that, faulty.
[Galaxy S II Android Development] Stefan2142:
Thanks for clarifying it to me. But is there a way to say if some emmc chip has the tendency to become faulty? And, do they become faulty right when they are made or it happens after a long use?
[Galaxy S II Android Development] Lanchon:
no there isnt. chips fail sometimes.
[Galaxy S II Android Development] Stefan2142:
so you are saying that it would have happen even if I had the stock JB 4.1.2, right?
[Galaxy S II Android Development] Lanchon:
yes! it wasnt your fault
[Galaxy S II Android Development] Stefan2142:
So emmc brickbug won't happen out of the blue and while phone is actually in the system. And if I understand it correctly, I have to do, for example, wipe or restore data (the bug is triggered by some options in CWM) in a version of CWM that has MMC_CAP_ERASE flag and most of today's CWMs 5.x and 6.x don't have it, right? I mean, it won't happen when phone is already booted in the actual system?
[Galaxy S II Android Development] Lanchon:
no, its more complex than that. look, this is a support thread for a kernel, we've been off topic for long enough. please search for technical details on other threads, there is a lot of information if you want to read.
[Galaxy S II Android Development] Stefan2142:
Yes, I have been reading a lot about it but I am asking you because you seem to know a lot about it and you are one of the few that is still in this part of the forum. Also, nobody nowhere wrote everything about it, there is only pieces of information that when combined still don't make the full picture to someone who is new on xda. I just don't want to end up paying 50€+ for repair, that's all. But anyway, thanks for the info you gave me so far.
[Galaxy S II Android Development] teraßyte:
A little bump for my question :)
[Galaxy S II Android Development] Lanchon:
its for the M! but feel free to experiment :)
[Galaxy S II Android Development] nhmanas:
Slows down my device! Gallery thumbnails shows in 5 minutes

And i think something has happened lol

I deleted a manga (about 1200 pages jpg) on my /sdcard1 (external) before I trim

Then I flashed neatrom then BAM!! Manga is still over there :S

(Rev 0x19)
[Galaxy S II Android Development] Lanchon:
UPDATE: this project now supports all roms and kernels!

if you are not running CyanogenMod M snapshots, please see this post.
[Galaxy S II Android Development] stefan_city:
It's stock CM kernel plus Trim? As i read, performance is much better at most devices, while battery life is better than stock too. Any advice for governor/scheduler?

If i flash it, must flash music bug fix too, or it's included?

Regards.
[Galaxy S II Android Development] Lanchon:
not included. this is a kernel. music bug fix is in /system.

i use interactive and ROW (or else SIO)
[Galaxy S II Android Development] chhapil:
On Stock JB Kernel?

Hi,

Sorry for acting noob.

I'm on stock rooted kernel with Neat rom JB(4.1.2 Based) with following eMMC details

Type: VYL00M

fwRev: 0x19

From the description of eMMC and the reference table, looks like that can be affected by Brick Bug.

Should i run LagFix with Stock JB kernel or should i be using CM?
[Galaxy S II Android Development] Lanchon:
you are affected by brickbug. you are safe to trim WITH MY KERNEL.

it is assumed that release (not a leak) 4.1.2 stock kernel contains this patch and thus is brickbug safe. but there might be different versions, and there is no way to be sure if the corresponding source code was patched by samsung, so...

WARNING: IF YOUR EMMC IS AFFECTED BY BRICKBUG, THE POSSIBILITY HARD BRICKING YOUR DEVICE CANNOT BE COMPLETELY RULED OUT without access to the kernel source code. proceed at your own peril, or better yet, switch to a custom rom/kernel.
[Galaxy S II Android Development] chhapil:
Thanks for the heads up.

As of now my benchmark scores are comparable to your screenshots in first post.

I'll schedule the trimming in my next flash of cm then
[Galaxy S II Android Development] chhapil:
Or I guess i can use the trimming from recovery.
[Galaxy S II Android Development] Lanchon:
kernel and recovery are monolithic on these devices.

if you flash my kernel, boot to recovery, trim, and restore your kernel you'll be ok.
[Galaxy S II Android Development] chhapil:
Trimming on Stock JB 4.1.2

Here are the steps i followed after few encouraging words from Lanchon :)

My Setup, 3 years old S2 running NeatRom 6.4(4.1.2 Based) with Apolo JB Kernel with 4GB data partition

Steps.

1. Reboot to recovery, make the full backup

2. Flash Lanchon's trim support kernel and reboot to recovery again.

3. Mount system, data, cache and preload partitions.

4. From PC, start adb and go to shell and run following commands

fstrim -v /system
fstrim -v /data
fstrim -v /cache
fstrim -v /preload

Here are the results of the commands

$ su
~ # fstrim -v /cache
fstrim -v /cache
/cache: 96460800 bytes trimmed
~ # fstrim -v /preload
fstrim -v /preload
/preload: 366084096 bytes trimmed
~ # fstrim -v /data
fstrim -v /data
/data: 1229262848 bytes trimmed
~ # fstrim -v /system
fstrim -v /system
/system: 31236096 bytes trimmed

4. Once done, flash the original kernel again (in my case apolo)

5. reboot to recovery, check everything is fine and reboot system.

check the benchmarks in attached screenshot

Thanks a ton to [MENTION=4141005]Lanchon[/MENTION], my S2 is more snappier now :)
[Galaxy S II Android Development] el_dobre:
Hi, I want to use your kernel on a CM11 nightly of 18th October, but I have some questions:

1) Which kernel I have to use? this:? https://www.androidfilehost.com/?w=files&flid=19790

2) when I flash back the nandroid backup (beacuse I don't have original CM11 kernel of my nightly) which option I must to choose in advanced cwm restore?

3) when I flash a new nightly I won't loose the benefits of trimming, right? (I haven't used repartitioning)
[Galaxy S II Android Development] Lanchon:
1) the newest for your device (which you didnt mention btw)

2) you can use advanced restore to restore only the boot partition (ie: kernel). its unnecessary to do a full restore.

3) you'll have the preload partition trimmed, which would provide *some* speed benefits (my guess is that they should be significant)
[Galaxy S II Android Development] Sancho567:
I have flashed, but I can't see this Kernel in my Device...
[Galaxy S II Android Development] Acid0057:
You've got the kernel installed. That's what shows up under kernel for my device.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
UPDATE: sad times for the i9100... CM stopped issuing nightlies and sure enough the M12 snapshot is also missing. CM's device status page hasn't been updated so we don't have an official reason for this yet.

i'm releasing a kernel for the latest nightly instead:

cm-11-20141109-NIGHTLY-i9100

enjoy... the consolation prize :(
[Galaxy S II Android Development] ahmedelhofy:
It seems they stopped both i9100 and i9300

I have no clue what is the reason for that since they are still releasing nightlies for n7000 and n7100, so probably it has nothing to do with the exynos crap I think
[Galaxy S II Android Development] Lanchon:
interesting, happened on the same day... doesn't look good, i couldnt find build failures in jenkins, it looks like an administrative decision.

"devices that we do not own should not be added to the ‘supported’ column"?

http://www.landofdroid.com/2014/cm12-roadmap-leaked-exciting/

oh well, we'll know soon enough.
[Galaxy S II Android Development] Lanchon:
those on nightlies from November 3rd or before, would still be upgrading if switching to M12, so you may want to hold off on this latest nightly. (newer nightlies would be a downgrade.)

i might build an M12 myself, is there any interest?

since there will be no newer features on CM11, only bugfixes, it seems nightlies will be kinda stable going forward anyway.
[Galaxy S II Android Development] Acid0057:
I'd be interested in M12 lanchon. Thanks! I noticed that we have a nightly from the 13th now too.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] ahmedelhofy:
CM Nightlies are back on the list... Great

http://download.cyanogenmod.org/?device=i9100
[Galaxy S II Android Development] Lanchon:
ok, nightlies are back! and with nightlies not taking anything but bugfixes anymore, in a few days nightlies will be as stable as M snapshots, so it doesn't seem worth it for me to build an M12. given that i build blind (have no device) there would surely be some problems anyway.
[Galaxy S II Android Development] Acid0057:
Makes sense to me lanchon. Can you build your kernel on a nightly release weekly or even monthly then?

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
i do it monthly! *if* there's gonna be an M13, i9100 will have it. its probably not that Ms are stopped for the i9100, only for some reason builds were interrupted, and just coincided with M12.

note that 11/11 nightly for the n7000 does not boot! that was output one day before M12. could be the reason builds were stopped?
[Galaxy S II Android Development] Acid0057:
Okay okay. I got ya. Maybe I'll switch to the 11/09 monthly that you have a kernel for, then wait for M13 if it happens.

Really I just want those POODLE SSLv3 security fixes that are in M12 or any nightly after November 4th, I think.
[Galaxy S II Android Development] Lanchon:
was fixed in october:

https://jira.cyanogenmod.org/browse/CYAN-5663

i'll build in a month, monthlies are ok for a kernel i think. but if you have reason to ask for a kernel sooner, dont hesitate! i really dont mind
[Galaxy S II Android Development] Acid0057:
But the m11 snapshot was built on October 8th and that was marked fixed after that date.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
yes, what i meant was that the 11/9 was ok. m11 is not. the 11/9 was up alone for 4 days, it should have negative comments by now if it has problems.
[Galaxy S II Android Development] Acid0057:
Agreed. I'll be switching to it soon and you're kernel for it.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] ajislav:
Am I correct in assuming that Lanchon's kernels are OK to use with newer than originally intended ROMs? E.g. it would be OK to use the Nov 9 kernel even on the latest nightly...

It's not like there are big, compatibility breaking changes every other day. Right?
[Galaxy S II Android Development] Lanchon:
i agree with you 99.9% :)