yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] Acid0057:
You're welcome. Yes Cyanogenmod 11 and 12 support ext4 and so does op kernel. Note those commands only try to trim partitions, they don't format them to ext4. And you'll need root access on you're terminal app too. If the partition can't be trimmed it won't do anything and just say that the partition is not a typewriter.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Skorvy:
Ill reformat partition after i come home from work. This on terminal goin well. thx
[Galaxy S II Android Development] Acid0057:
You're welcome! Good guide to format internal to ext4 here

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

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
i suggest you repartition to 6GB /data and leave the /sdcard in FAT for compatibility and stability.

plan to leave 2 to 1GB of /data free for trim to work best. so if you need 4GB of data, a 6GB partition would be best.
[Galaxy S II Android Development] Skorvy:
Thx.

Of data have 1,5gb free, coz am not using much apps, so this should be enought then. Just tell me, when i format internal to ext4, i need to fix permissions right? And this can be don trought terminal and recovery aswell? Or is not affected by this.
[Galaxy S II Android Development] Lanchon:
1.5GB free is ok. i do not recommend you format sdcard in ext4.

this is a kernel thread, not a reformat thread. please go to/create an appropriate thread for your reformatting issues.
[Galaxy S II Android Development] Skorvy:
Ok. :)

Sorry :D:D
[Galaxy S II Android Development] Acid0057:
I'd have to agree with [MENTION=4141005]Lanchon[/MENTION] too. I've had more trouble than speed improvements in formatting internal SD to ext4.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] kudos1uk:
Can I use this on Lysergic Acid's unofficial Rom or do I have to go official? I'm still on the last unofficial with stock kernel and stock CWM recovery, if yes, do I use latest 19100 kernel from downloads?

I have insane chip.

SGS2

ROM:

12.1=20150617-UNOFFICIAL-i9100

Kernel:

3.0.64-CM-g7e7a10d

lysergic_acid@Caio #3

Tue Jun 16 22:30:52 BRT 2015
[Galaxy S II Android Development] Malhavoc Blackdrake:
Have insane chip too, and had no issue while I was in your same spot. I flashed Lanchon's kernel, rebooted to recovery, used the USB connection to run the TRIM commands (remember to mount partitions first!), and then reflashed my ROM.

If you go Official first, it gets trickier, since official CM doesn't have CWM, but CM Recovery, and you can only flash signed kernels.
[Galaxy S II Android Development] Lanchon:
i guess my (only) LP kernel should work fine on official and unofficial, but it is made for official.
[Galaxy S II Android Development] Lanchon:
it is better if you keep using a trim kernel.

my LP kernels are all signed so you can flash them from CM recovery without problems.
[Galaxy S II Android Development] Malhavoc Blackdrake:
I was more inclined to keep using the official CM Kernel, to avoid any possible issue (unrelated with the TRIM itself). Gsstudios told me that having the Preload partition formatted and trimmed (as a sort of provisioning space) should grant a good permormance upkeep for a fair amount of time, as long as it's not written. Isn't it?
[Galaxy S II Android Development] kudos1uk:
Thanks guys, I have a test S2 with the same setup I can test it on (both insane too) being unofficial I cant match the build date, do I just use the latest: kernel-Lanchon-TRIM-FPBug-20150713-cm-12.1-i9100.zip

or should I use the closest build to the date of the unofficial kernel?
[Galaxy S II Android Development] KindleTester:
hey Lanchon,

you directed me from the other topic here, I already took the backup, but I'm confused on how to flash this kernel, my device is now rooted stock 4.1.2 and I have SiyahKernel S2-v6.0beta5 installed.

I would highly appreciate if you can explain to me in a simple way how can I flash the zip file or what to flash out of zip file?

I have kernel-Lanchon-TRIM-FPBug-20150713-cm-12.1-i9100.zip downloaded is this the right one to use for 4.1.2?

thanks
[Galaxy S II Android Development] Malhavoc Blackdrake:
BTW, do your current kernels include CM or CWM as recovery for CM12.1?
[Galaxy S II Android Development] Lanchon:
i've been saying that for a long time:

http://xdaforums.com/galaxy-s2/deve...kbug-aftermath-speeding-t2843238/post54724523

but it's better to use a trim kernel IMHO, especially if you repartition and have a big /data partition.

btw, the same function of a trimmed 0.5GB /preload can be obtained with a trimmed 1GB /system partition in android 5.1, if you only flash nano or pico gapps once. each system flash writes a fresh 0.5GB image of the system partition, which is then resized to 1GB, and then gapps are written. so each time the same areas are written and roughly 0.5GB of the area remains forever untouched.

EDIT: as far as avoiding issues, there shouldn't be any. take a look at the kernel commit history:

https://github.com/CyanogenMod/android_kernel_samsung_smdk4412/commits/cm-12.1

as you can see, it almost never changes. latest changes of 22 days ago are the FP Bug fix, needed before the first official released. then there is one SE Linux commit needed for lollipop, and not much more since KK. some KK commits still need to be merged into the tree, but the devel is procrastinating a little :). point is, kernel is fairly stable and whenever there are commits you can know by looking at that link. no need to be superstitious about using the official kernel.
[Galaxy S II Android Development] Lanchon:
my kernels are almost official. they come with official recovery. CM12.1 has CM recovery.
[Galaxy S II Android Development] Acid0057:
I'll give you a hand. Are you on 4.1.2 official Samsung rom? The lanchon kernel you've downloaded is for 5.1 lollipop. I don't think lanchon has made a version for 4.1.2. [MENTION=4141005]Lanchon[/MENTION]?

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
cool, thanks! no i just wanted to know if there was a perceived improvement as no one was posting and i cant test. but good idea, i will amend instructions to suggest doing before and after benchmarking.
[Galaxy S II Android Development] Ganjax:
It will good steps?

On already installed rom 4.1.2 neatrom make full wipe via recovery (system/data/cache/dalvik cache)

Then install your recovery, reboot into cwm.

Install your rom

boot

install lagfix?
[Galaxy S II Android Development] Lanchon:
lol, no! please follow the instructions! you have to be on CM11 to use this. if you are on a stock 4.1.2 kernel and dont have brickbug, just try LagFix; it may work.
[Galaxy S II Android Development] Ganjax:
so should i install clear M9 CM11, then without wipe flash your kernel, then rom?
[Galaxy S II Android Development] Lanchon:
lol NO! dont install my rom, just follow the instructions on the first post! you must start with working official CM11. if you dont understand the instructions, ask for clarifications. the instructions are supposed to be clear.
[Galaxy S II Android Development] Ganjax:
i told it.. now i installed Official CM11 M9.. official!

I have 6GB pit flashed, and im ready to install your kernel/cwm, then rom, without any wipe.

Right?
[Galaxy S II Android Development] Lanchon:
no, just the recovery file. the instructions never ask that you install my rom. do not install any rom of mine. please follow the instructions, check your emmc version, or you can brick your device forever.
[Galaxy S II Android Development] Ganjax:
Okay, so im on Official M9 CM11.

I have VLOOM 0x19 fw eMMc

And i should just install your kernel/recovery right?
[Galaxy S II Android Development] Lanchon:
yes
[Galaxy S II Android Development] Ganjax:
VYL00M 0x19 :)

Flashed.. booting! And no brick, im glad :)

Successfully trimmed by LagFix! :)
[Galaxy S II Android Development] Lanchon:
ok your phone has brickbug (last time you posted the incorrect model code). you are risking q brick. but others are in the same situation and they are not having any problems. i think nothing bad will happen, but theres always risk.

in any case, this speedup is for CM users, if you were using a stock kernel before, there is a chance you might not notice a difference.
[Galaxy S II Android Development] Ganjax:
I know, i read all posts, that's why i decided to flash on proably brickbug..

ohh. noticed. my wifi doesn't work.

Full trimered, in about phone it show your kernel, steps was correct

Installed PIT 6GB, then format (sdcard0, system, data, cache, dalvik cache)

Installed Official CM11 M9

Rebooted

rebooted to recovery

installed your kernel/recovery

rebooted

installed lagfix, trimmered

rebooted

and my wifi now doesn't work
[Galaxy S II Android Development] Lanchon:
hmmm i dont know, i dont have a phone to test. people that installed official + my kernel had ok wifi. people that installed my CM and kernel had wifi problems. for now i need more reports. sorry i cant test.
[Galaxy S II Android Development] Ganjax:
i didn't test your builds, just official cm11 m9 from cyanogenmod.org

and wifi doesn't work, now i back to official, if this will solved, then i'll use trimm again, because it's realy faster than stock
[Galaxy S II Android Development] Lanchon:
the trim will make your phone fast on stock for a few days. you can always go back to my recovery, trim, and back to stock. sorry for the inconvenience
[Galaxy S II Android Development] Ganjax:
yeah i know, but i need wifi working, because don't have internet on my simcard.

I will back to your kernel, when it will be solved, that's no problem, im glad to your support on this :)
[Galaxy S II Android Development] Toby0897:
Is your kernel comparable with other cm11 based ROMs like markox89's builds or slimkat

EDIT: never mind WiFi doesnt work :/
[Galaxy S II Android Development] Lanchon:
i dont know other people's roms, sorry
[Galaxy S II Android Development] Aerotinge:
eMMC Type:VZL00M 10/2011 (32GB model)

FwRev:0x1a

Test for a week. Now I'm free from lags, and in my case wifi works. Great work!

The only problem is that I cant format the sdcard with your recovery, neither in ext4 nor in fat32. I'm not sure that's a issue from official source codes...

For potential secure erase issue with your recovery, I didnt see any text regarding erase/secure erase in log.
[Galaxy S II Android Development] Lanchon:
i think problems with wifi may be people not following instructions, maybe not wiping before going to CM9 official from who knows what.

have you looked in the advanced/show log option in the recovery? thats where it should be i think.

glad ur phone is working better :)
[Galaxy S II Android Development] KindleTester:
well, he was kind enough to advise me Check out his topic and I was kinda lost because I'm trying to go from 2.3.3 to [ROM][5.1.1]Nameless Rom lollipop [Unofficial] [I9100][18-07-15] and I didn't knew what recovery tool shall I use.

So, I believe his kernel works for 4.1.2 lets wait for his reply and thanks for assisting

Update

: after flashing kernel-Lanchon-TRIM-FPBug-20150713-cm-12.1-i9100.zip on the stock 4.1.2 the device will keep booting to the recovery, when I flash Siyah using odin it goes back to normal but Siyah is outdated I don't want to risk flashing lollipop on it.

PS: all what I need is the steps where and with what shall I start doing what he mentioned in that post.
[Galaxy S II Android Development] Lanchon:
load my latest CM11 trim kernel and the latest CM11 nightly (i have it mirrored) into internal or external sdcard. (optionally KK PA gapps nano too.). make sure they are good downloads.

now it would be a good time to flash a recent modem. i would use XXMS4.

go to your current recovery

flash my kernel

reboot to recovery

optional: flash modem, then advanced -> reboot recovery

wipe data/factory reset

mounts and storage -> format /system

(now you can trim everything via adb if you want)

flash latest CM11 nightly

flash my kernel AGAIN

optional: flash gapps

reboot to android

(or else you can trim now via the Trimmer app)

once CM11 is working, you can choose to:

-keep it as is

-repartition phone (erases everything including system)

-go to CM12.1 with partitions as they are

to go to CM12.1:

load my latest CM12.1 trim kernel and the latest CM12.1 official nightly into internal or external sdcard. (optionally LP TK gapps nano too.). make sure they are good downloads.

reboot to my CM11 recovery

wipe data/factory reset

mounts and storage -> format /system

(now you can trim everything via adb if you want)

flash latest CM12.1 nightly

flash my CM12.1 kernel

optional: flash gapps

reboot to android

(or else you can trim now via the Trimmer app)

once CM12.1 is working, keep both my CM12.1 and CM11 kernels in the phone. if you ever need a better recovery than what the CM12.1 kernel provides, temporarily flash my CM11 kernel, then reflash my CM12.1 kernel again before rebooting android.
[Galaxy S II Android Development] KindleTester:
Take that Quote to the OP

Thanks a lot man, first of all this guide in the quote up there, must be in the OP for the noob and rusty users coming from 2.3.x(like me).

Using your kernel I was able to test multiple 51.1 ROMs (CM12.1 Nightly, Ressurection, Nameless) all of them flashed without any issues running well.

I also found XXMS4 modem flashed it as well.

I settled on CM12.1 Nightly seemed like the most stable although Resurrection had more features, but overall so far everything is great.

thanks again
[Galaxy S II Android Development] ultravy:
Got the brickbug!! Used the temp recovery kernel and commands from adb shell and it took 20 sec to trim all partitions on [4.4.4][04/06] SlimSaber!
[Galaxy S II Android Development] kudos1uk:
[MENTION=4141005]Lanchon[/MENTION]

I know this is a massive ask but I also know it would make a lot of people very happy.

Is there any chance of making a trim kernel with CWM recovery?

This would give us the opportunity of adding trim but at the same time allowing nandroid backups, flashing unsigned zips, better formatting options. I really think the uptake would be massive, people on official are really missing CWM recovery and all it offers and are finding CM recovery painfully limiting.
[Galaxy S II Android Development] Lanchon:
hi, sorry, please use one of the other kernels. thats what the nice kernel devs we have are for!! :)
[Galaxy S II Android Development] kudos1uk:
Thanks anyway, I know it was a lot to ask.

The problem is the other alternative kernels have issues (yours being stock does not have them) and most simply want a stock kernel with CWM, trim of course would be the huge bonus, nobody makes a stock kernel with CWM & trim.
[Galaxy S II Android Development] daniu:
Hi

I agree ... yours with cwm would fill an important gap.

I am using official cm 12.1 on my s2 now and got no problems so far. Dorimanx made lots of trouble and has so many features I don't need that might very well be the cause for the problems.

But of course nobody can force you ...

Regards
[Galaxy S II Android Development] kudos1uk:
deleted, got it now.
[Galaxy S II Android Development] cherryb8844:
Still using 12.1 with trim kernel 20150713 phone was good and fast then before but freezing issue not gone and UMS not writeable when I trying to copy any item from PC to my phone any fix ?
[Galaxy S II Android Development] Typhoon_Master:
hi i never used custom kernels so far, but im interessted in this one, because it seems it gives phone lot of extra boost.

currently im using cm12.1 nightlies with my phone (I9100). will it be compatible with the rom?

and with recovery do i have then? can i install a backup made with twrp?
[Galaxy S II Android Development] kai1313:
Its compatible, the recovery from this kernel is CM recovery

Sent from my GT-I9100
[Galaxy S II Android Development] varun94:
[MENTION=4141005]Lanchon[/MENTION] can the last cm 12.1 trim kernel(13-7-15) by you be used for latest nightly (20-8-15)?
[Galaxy S II Android Development] Lanchon:
yes, absolutely!
[Galaxy S II Android Development] BenjyTec:
Where to download? Can't find the download section :(

Gesendet: S2/ XDA Forums
[Galaxy S II Android Development] Lanchon:
download section in OP?
[Galaxy S II Android Development] kostelo:
Not to sound noob or disrespectful, but the kernel in latest nightly is the same as it was a month ago or so? I mean by flashing the latest trimming enabled kernel aren't we missing any updates of the official cm kernel? I hope you get my point.
[Galaxy S II Android Development] varun94:
thanks.are u sure there are'nt any kernel changes after the last kernel you made with trim
[Galaxy S II Android Development] Lanchon:
i thought you were refering to cm11 and my recent build. sorry, my mistake, my head was elsewhere.

no, im not sure it works. questions like that i will never be able to answer.

it's just a kernel. CM worked with it at the time i made it. i don't control CM, CM can stop working with it anytime.
[Galaxy S II Android Development] Lanchon:
of course you are.

that said, there hasn't been any changes to the kernel itself:

https://github.com/CyanogenMod/android_kernel_samsung_smdk4412/commits/cm-12.1

although had there been, it probably wouldn't be a must have, since you've been doing just fine to date without it :)

but the kernel flash file also includes the init ramdrive, the recovery, etc and they might have gotten changes, idk.

so you think there is a reason to build another kernel? is there a specific feature or commit missing?
[Galaxy S II Android Development] kostelo:
Actually I don't know if it's needed, I mean a new build. If you feel like building a new one, or let's say once every 5-10 nightlies, that would be fine. But again, do as you wish, as I am a total noob compared to you. :o Or we could just have one kernel build with TRIM enabled and TWRP recovery.
[Galaxy S II Android Development] Lanchon:
lol noooooo! im not going to build a new kernel for no reason every 5 days!

if somebody has a problem, please do report.
[Galaxy S II Android Development] Lanchon:
FYI:

http://xdaforums.com/galaxy-s2/help/qa-trim-speed-cyanogenmod-galaxy-s2-t2910715/post62424223
[Galaxy S II Android Development] varun94:
will you make stock kernel with trim support for recent cm 12.1 builds
[Galaxy S II Android Development] makix13:
Hi Lanchon,

Sorry for the question, I'm on Lysergic latest unofficial LP 5.1.1 rom, but I wanna use trim.

I will flash your kernel thru cwm recovery, any recommendations? Do I need clean cache and dalvik before reboot?. I did a nandandroid backup, but any advise it's welcome, thank you sir[emoji6]

S2 LA Cyanogenmod 5.1.1 [unofficial] [06/17] - Xposed [unofficial romracer's framework] - [rovo's beta 4 apk] - Viper4Android
[Galaxy S II Android Development] Forsquall:
Similar observed here. Jumped from 15/08 to 22/08 and saw Settings FCs and instant reboot during phone calls.

15/08 was OK in this respect. I had post-applied your 12.1 Trim kernel in both cases (thanks!). I retried with 23/08. No change.

I then tried 23/08 on the default kernel. All works OK - strange! Can't be the kernel itself?
[Galaxy S II Android Development] Lanchon:
lol, yes! i posted that just before your post, FYI link
[Galaxy S II Android Development] Lanchon:
no, you dont need to clear anything. no specific recommendations.

EDIT: my kernel IS NOT for unofficial, i dont know if it will work or not.
[Galaxy S II Android Development] Lanchon:
yes it is. there were changes, i need to output a new kernel.

i am researching other options, but in the meantime i think i'll just do a new kernel for the time being.
[Galaxy S II Android Development] Lanchon:
UPDATE: new CM 12.1 kernels are up!

enjoy!
[Galaxy S II Android Development] Mario1968:
[MENTION=4141005]Lanchon[/MENTION], thank you for your Kernel, can I use with Resurrection Remix (CM 12.1 based)? And why there are modules to install in the zip file with the Kernel? Is safe to flash only boot.img without modules?

Phone: GT-I9100

Rom: Resurrection Remix 5.5.4

Kernel : Stock

Theme : Stock

Gapps: Delta gapps

Add-on: Google camera

Mod: 1Gb system, 6Gb data pit
[Galaxy S II Android Development] Lanchon:
you can try. depending on the age of the fork, you might need the previous to last.

because the kernel modules are part of the kernel. no, you cant just flash boot.img. itd be nice if switching kernels involved just the kernel partition, but it doesnt work that way.
[Galaxy S II Android Development] Mario1968:
I've been trying, so far so good, thank you again

Mario

Edit: after 20 minutes the phone hung, i've flash philz kernel then the resurrection remix (with the rom modules) but something goes wrong and now my S2 is always on the "Samsung S II GT-I9100" white logo, i can't enter recovery, only download mode. I'm away from my PC to try ti recover with Odin. So for now i think this kernel is not compatible with RR ROM. Thank you anyway for your work.

Mario

Ps i'm write this edit with an iPhone (my work phone) and i miss my S2 very much!!![emoji30] because i can try to fix it only when my holiday ends then next weekend and i can use my Pc.

Phone: GT-I9100

Rom: Resurrection Remix 5.5.4

Kernel : Stock

Theme : Stock

Gapps: Delta gapps

Add-on: Google camera

Mod: 1Gb system, 6Gb data pit
[Galaxy S II Android Development] Lanchon:
im sorry to hear that. the kernel changed recently in an incompatible way. thats why i told you you needed to check the age of the fork. anything but the last week means you need to use the july kernel, not the august one.
[Galaxy S II Android Development] Lanchon:
UPDATE: new CM 11 kernels are up!

latest CM 11 builds, official or otherwise, are incompatible with the old kernels; so here is the fix.

enjoy!
[Galaxy S II Android Development] Acid0057:
Awesome lanchon. Thanks! Sorry to ask here but would you mind doing another build of cm 11 for the Samsung Galaxy S2 GT-i9100? Would love to get those new fixes.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Spyr0s:
CM12.1 kernel will also need an update
[Galaxy S II Android Development] ajislav:
Which CM11 build are you referring to? I am on [MENTION=233493]Thunder[/MENTION]'s Aug 16 build, happily trimming with your Jul 13 kernel..
[Galaxy S II Android Development] Lanchon:
UNOFFICIAL RELEASE: CM11 SNAPSHOT-XNG3C for i9100

http://xdaforums.com/galaxy-s2/deve...yanogenmod-11-nightlies-t2634693/post62662901
[Galaxy S II Android Development] Acid0057:
Thunders will work with the old kernel just fine. Lanchons below will need the new Kerenel.

Thanks!

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
i suspect you are right, but im not sure. XNG3C is a snapshot; supposedly stable, but a little older than head. maybe someone can try it with the old kernel and see if the sky comes down in flames or not.

but yeah, i suspect it need the new kernel.
[Galaxy S II Android Development] 7med:
[MENTION=4141005]Lanchon[/MENTION]

I'm getting the following error when flashing your pit file with heimdall:

Uploading HIDDEN
0%
12%

25%

37%

50%

62%

75%

87%

100%
ERROR: Failed to unpack received packet.

ERROR: Failed to confirm end of file transfer sequence!
ERROR: HIDDEN upload failed!

Ending session...

Is it normal ?

After that I did format everything but the I can't format the sdcard it gives me error while formatting

Tried Philz recovery without success

What can I do?

EDIT: Flashed TWRP recovery via heimdall then I formatted the sdcard and installed Official CyanogenMod 12.1 and gapps, everything was OK until I rebooted the phone after setting up CyanogenMod.

Now I'm stuck at the Samsung Logo.

No way to boot the phone neither enter recovery nor download mode

What's happening?? plz help