yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] Spyr0s:
Type: VYL00M

Date: 09/2011

FwRev: 0x19

Insane Chip

Another success here :good:

no benchies, i was on Paranoid. You made me flash CM after a year on Omni and PA :p
[Galaxy S II Android Development] Lanchon:
how is omni better?

unfortunately contributing to omni is exactly as bad as contributing to CM, they both require you to sign a copyright assignment of sorts. i wish there was a really free fork, something that was as mine as it is anyone else's. in both cases they can relicense my contributions any way they like ($$$) but i can't relicense theirs.

since both projects are on equal footing in this regard (even though omni tries to position itself as a being more 'free'), i have very little incentive to move away from CM. although i change phones every few months, i haven't fully wiped since CM9 days. :)

btw, since you are moving to CM, you may want to give my openpdroid fork a look.
[Galaxy S II Android Development] Spyr0s:
Omni was good for i9100 but no theme engine (boring) so i switched to Paranoid (they use omni kernel sources), no bugs and great design. I didn't switched to CM, just waiting for trim capable kernel to use with paranoid and go back :p
[Galaxy S II Android Development] agsola:
I don't understand why CM don't add the TRIM support.

I will test this out, and benchmark before and after.

We'll see...
[Galaxy S II Android Development] defecat0r:
Ok so i've just been through the process with my Galaxy note 1 (n7000) with emmc details: Type: VYL00M, Date: 09/2011, FwRev: 0x19, Insane Chip

I also decided to go through the TEDIOUS process of repartitioning the device to get 6GB /data. 3 versions of Odin were not playing the game very well at all, but after lots of hanging, and device restarting and trying Odin on a different computer i finally got it to flash.

I've spent the last day trying to get the internal SD card to work as ext4 but it doesn't seem like that's going to happen. I format it in CWM to ext4, i can browse to it no worries in file explorer and settings-storage can see it, but apps can't seem to read/write to it. (Gallery comes up with "no external storage available") Tried Kitkat SD fix apps, changing permissions as instructed in relevant sounding threads, but no joy, and not a widely reported issue from what i can find so i'm giving up on that for now. Back to vfat.

Anyway, i threw cm-11-20140915-NIGHTLY-n7000 on and booted it up to run Androbench on the ROM while it was still fresh.

I then rebooted and flashed the TRIM fix kernel, restarted and ran Lagfix, restarted again and ran Androbench.

Here's the results!

http://i.imgur.com/ljhgm0F.png

As you can see it's seeing some pretty healthy increases, although i'm surprised to see such a big jump in random read, i was expecting that sort of increase on random write?

Anyway, It's all looking very promising, but it's definitely too early to tell how much of a change it has made. In my experience, the problem with this phone has been doing the same operation 5 times, but on the 6th it'll just decide to slow to a crawl. Ie all of a sudden taking 5-10 seconds to open the keyboard(swiftkey), or take 20 seconds to get back to homescreen when google maps navigation has been running for a while. A few weeks of testing will reveal whether those annoying scenarios are in the past.

I've been dicking around copying stuff back and forward, factory resetting and restoring cwm recoveries while on this kernel for a day now, if this fix was going to trigger superbrick i'm sure it would have done it by now. As far as i'm concerned this is safe as houses.

Lanchon, thanks again dude, heroic work on all of this. This is the biggest thing to happen to these devices since i don't know when!
[Galaxy S II Android Development] agsola:
Benchmarking before and after

I have just finished in my Galaxy SII (i9100) under CM11 M10, using bechmarks.

And..., not everything improved. Sequential writes worsen...

Test passed OK:

http://i.imgur.com/kg8mSJo.png

Here my results (before running the tests I stopped everything and cleaned the last used apps in both cases):

- Before the TRIM:

First part: http://i.imgur.com/F9BYBY9.png

Second part: http://i.imgur.com/fS425pe.png

- After the TRIM:

First part: http://i.imgur.com/4D9xHed.png

Second part: http://i.imgur.com/D13Q86D.png

What do you think?

Do you have better or worse results?
[Galaxy S II Android Development] Lanchon:
hey thanks!! amazing write up, and thanks so much for benchmarking! i will link this post from the OP when i have the time. it gives a good idea of what to expect... if you are lucky; cause it seems not everybody is getting good results. btw dont worry, your device wont brick :)

regarding random writes, it gets a 50% increase which is healthy value. but still we are talking about less than a 100 operations per second! this shows these emmcs are total crap! a 1000 times slower than desktop SSDs :( i suppose the emmc controller software must simply be crappy and thats that. too bad its not open source :)

i look forward to your update and hope those freezes you talked about get better. thanks again!
[Galaxy S II Android Development] Lanchon:
sorry u didnt get results. its strange how some people do and others dont.

here are some options im thinking of:

1) somehow u didnt need trimming. but your numbers should be both high, not low!

2) maybe the firmware in some emmcs just completely ignores trim commands.

3) maybe a bugfix (kernel workaround) is inhibiting trim from reaching your particular model of emmc. btw, you didnt say which is it.

4) some mistake you did in following the instructions, like maybe you dont have enough free space?
[Galaxy S II Android Development] agsola:
Don't get me wrong, they improved, except for sequential writes.

And, of course, that's good (the general improvement)!! :)

Are there any other benchmarks from GalaxySii i9100 people with CM11 to compare?
[Galaxy S II Android Development] smoke2tun:
My phone is blazing fast

I think you did sometring wrong and trim is not working for you.

My phone is a Galaxy S2 i9100. I don't have a benchmark with the stock M10 kernel, but here are my results with Lanchon' kernel.

As i sad before, i have a sane chip, type V3U0M with FwRev 0x0e.

L.E. I'm on ART, not Dalvik.

[IMG="Part 1"]http://i.imgur.com/pYxzaoi.png[/IMG]

[IMG="Part 2"]http://i.imgur.com/WSW8iUP.png[/IMG]
[Galaxy S II Android Development] agsola:
:-O

Yes, there is a huge difference with respect to mine.

Here there are a few pictures of me doing it again:

Before running: http://i.imgur.com/p3oGtIB.png

Configuring LagFix: http://i.imgur.com/T0G4yCt.png

Root request: http://i.imgur.com/dGGLaiO.png

Just after running: http://i.imgur.com/rD7gIhL.png

My phone: http://i.imgur.com/HuYYeOQ.png

How can I check if there is something wrong??

Do you see anything wrong in my steps?
[Galaxy S II Android Development] gazdajezda:
Eh, not possible...
[Galaxy S II Android Development] Lanchon:
ensure you have enough free space in the /data partition. trim is only effective is you have free space there. id recommend around 20%.
[Galaxy S II Android Development] smoke2tun:
Maybe is partition related...

I did the exact same steps as you did.

Have you repartitioned the internal storage? Maybe there isn't enough space for the trim command to do his job.

I used the pit files from post #190 to repartition my emmc. http://xdaforums.com/showpost.php?p=55157629&postcount=190

My system partition is 1 Gb, data partition is 6 Gb and the rest is considered internal storage and is formated as FAT.
[Galaxy S II Android Development] agsola:
Still weird...

I am going to try to repartition to see what happens.

Furthermore, I will try to set the internalSD partition as EXT4.

In the meanwhiles, I will run different tests to see how it performs...
[Galaxy S II Android Development] Lanchon:
i dont think you ever mentioned:

-your current free space in /data

-your eMMC (screenshot, or model fwrev date etc)

if you have enough free space in /data, repartitioning wont help you i think.
[Galaxy S II Android Development] agsola:
This is my eMMC:

http://i.imgur.com/g61p2n3.png

I have re-formatted /data, now it is 6 GB, big enough, I hope.

However, I think that the limit is in the memory itself. I have re-installed CM10 M10 from scratch and re-run the tests, not much improvement.

Then, I have enabled ART, and, still, a bit of improvement in some tasks, not reading.

After that, TRIM re-enabled, these are the results.

With ART, before TRIM:

http://i.imgur.com/y9WaIkz.png

http://i.imgur.com/Jg4BQFK.png

With ART, after TRIM:

http://i.imgur.com/GdZ45tB.png

http://i.imgur.com/tITelsA.png

Still, way worse than those from smoke2tun (http://xdaforums.com/showpost.php?p=55661785&postcount=322), or mparus (http://xdaforums.com/showpost.php?p=55194465&postcount=246), twice as bad.

How is that possible?

Any possible fix?
[Galaxy S II Android Development] bihslk:
I dont have brickbug on my phone and will try this but i dont know wich kernel to chose??? M9 or M10? I have Cm11

cm-11-20140928-NIGHTLY-i9100.zip
[Galaxy S II Android Development] smoke2tun:
Lanchon's kernel is not for CM nightly. You have to flash a CM snapshot (M9 or M10). I am currently on cm-11-20140916-SNAPSHOT-M10-i9100

If you have a Galaxy S2 (i9100) you can download the rom from here: http://download.cyanogenmod.org/?device=i9100&type=snapshot

I also suggest to repartition your internal storage. (For more info on that you can read post #190)
[Galaxy S II Android Development] Lanchon:
do not try my kernels. you have to be on an M release to try them.

1)keep your current nightly, stop upgrading NOW before the M11 code freeze.

2)M11 will be out in a week or two and then it will not be an upgrade for you. i will immediately publish the corresponding kernel
[Galaxy S II Android Development] Lanchon:
repartition is not needed, but you need to have at least 20% free space in /data. (but it sure makes for a better phone.)
[Galaxy S II Android Development] Lanchon:
thanks for the info.

all eMMCs are different. different hardware running different software (ie, really different: some use different microprocessors). some may just be slower. and its conceivable that some may completely ignore TRIM commands. as a quick and dirty emergency fix for brickbug, samsung may have chosen to disable all TRIM commands in some eMMCs.

the "before" part of your latest before and after tests is not meaningful because you had already trimmed by then. partitioning could not have helped if you had enough free space in /data (we still don't know).

at this point there is nothing else that you can do. your eMMC is simply slower than others, i'm sorry!
[Galaxy S II Android Development] bihslk:
Thanks will try..

---------- Post added at 07:32 PM ---------- Previous post was at 07:01 PM ----------

OMG!

Installed CM11 M10 and your TRIM. Phone is flying now,,, WoW man realy good TRIM stuff. Thanks again for help. Just last question. Can i now install annother kernel like Dorimanx or do i need to stay on yours?
[Galaxy S II Android Development] empulse92:
if you want to trim you need this kernel, you can trim -> flash other kernel -> after some while flash this kernel again and trim again
[Galaxy S II Android Development] Lanchon:
that is correct. the more free space in /data when you trim, and the less you write to the partition, the more the trim will last.
[Galaxy S II Android Development] bihslk:
Thanks will do that
[Galaxy S II Android Development] Acid0057:
I plan on doing this in a couple of weeks when I have time to make sure it goes okay.

I have a few questions. I'm currently running CM11 M10 Stock Kernel and ROM. I'd like to repartition while I'm in the middle of getting this kernel ready with a 1 GB System and 6 GB Data small preload. Can I make a nandroid backup, go through the process of partitioning and getting the kernel ready then restore my backup? I'm guessing after restoring my backup I'd have to flash Lanchon's M10 Kernel again and run Lagfix, etc.

Thanks!
[Galaxy S II Android Development] Lanchon:
absolutely, you can. but in addition to making a nandroid you have to backup the sdcard contents somewhere outside of the phone too, as everything will be wiped during repart. (including the nandroid backup itself!!! be sure to backup the nandroid backup somewhere outside the phone!) mount it USB mass storage and backup on your PC.

may i suggest that you flash the kernel now and repartition later? it only takes a few minutes and you don't need to repart to use trim. afterwards when you repart you'll restore my kernel from nandroid.

and yes, after a nandroid restore, its a good idea to run lagfix again due to the extensive eMMC writing involved. (but if you don't, android will by itself within 1 or 2 days anyway.)
[Galaxy S II Android Development] Acid0057:
Thanks Lanchon for the quick answer! My main reason for repartitioning is the fact that I only have 300mb free on data right now

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
still no problem, 15% free space is enough to see gains. the worst thing that can happen is reduced gains while free space continues to be low. no reason not to do it.
[Galaxy S II Android Development] Acid0057:
I sure will do it. Once I get a chance I'll take before and after benchmarks.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Jann F:
[MENTION=4141005]Lanchon[/MENTION] shouldn't the MAG2GA be safe whan the B&N HD+ patch and/or Nexus 7 patch are applied as long as the revisions are the same?

I am having a SGS2 with VYL00M fwrev 19 but a B&N HD+ with MAG2GA fwrev 06 and having no problems with the Trim enabled CM11 kernel (with patch by verygreen).

What fwrev do the SGS2 MAG2GA users have?
[Galaxy S II Android Development] Lanchon:
yes it *should* be safe. but we haven't tested, or those who tested haven't reported. some fire HD's are doing fine with that chip and a trimming kernel (i think their *official* CM kernel trims :) ). IIRC, so far only 2 family devices showed up here, i think they were both d710's. and their owners never replied to my messages. it seems only the very old fwrevs of that chip had the problem anyway, older than the ones that showed up here.

i'm sure it's safe (with all fwrevs), but i need to disclose the fact that i have no actual test data on these devices to prospective users. more importantly, we can't go to CM or omni and tell them "mainstream this" without fully testing all options. btw the objective of this project is that, restoring trim to mainstream kernels and then die. i dont want to do this silly patched kernels for long! :) (but i'll keep them coming for as long as needed, its mostly automated now, i just need to know that the new Ms are out.)
[Galaxy S II Android Development] defecat0r:
Hello, so I've been using my phone a fair bit over the last week and a half and have been really happy with it's performance. The phone has never been a rocket, but this seems to have cut out all of the intermittent slow downs, freezes and stuttering it's been plagued with for so long.

A few times now, I've been close to throwing my phone out the window of the car when using google navigation, but now there is no freezing at all!

Very happy with this, great results! We just need to get more people on board and get this the attention it deserves.

Amazing work Lanchon, thank you!
[Galaxy S II Android Development] ShOgYzzz:
Where is the cm11 kernel zip file download
[Galaxy S II Android Development] Lanchon:
please read the OP!
[Galaxy S II Android Development] Lanchon:
UPDATE: kiddies, it's that time of the month again!

the CM team is releasing M11 as i write and my matching kernel is already online. :)

enjoy!
[Galaxy S II Android Development] Acid0057:
Lanchon first time upgrading with you're kernel. You can't use the Internal updater right? You need to download the zip and your kernel and flash in Recovery? Along with flashing you're music bug fix after?

And wow short time between m builds this time around!

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
yes, you need to manually flash my zips over (after flashing) official M11.
[Galaxy S II Android Development] burninghouse:
i installed it and i can say only one word....."AWESOME"...

My s2 is blazingly fast with same battery life
[Galaxy S II Android Development] Lanchon:
thanks! but i take objection, your battery life should be better! with reduced write amplification, less flash programming is needed for the same amount of written data. it saves battery exactly as much as it is faster :) thanks again!
[Galaxy S II Android Development] Acid0057:
Maybe he installed Facebook Messenger in the transistion ;) Man is that thing a battery hog.
[Galaxy S II Android Development] Lanchon:
LIKE :thumbup:
[Galaxy S II Android Development] Acid0057:
Its actually bearable (Facebook and the Messenger App that is) if you use Privacy Guard in CM 11 to restrict their wakeups then also the Unbouce Xposed Module, or you could just not install them.
[Galaxy S II Android Development] Lanchon:
you can use PG to restrict wakeups?? i didnt know. i use greenify for that and openpdroid for privacy. no xposed in my phone.
[Galaxy S II Android Development] gazdajezda:
May i ask why? Is there something wrong with Xposed/Xprivacy? Just wanna know since i'm using it heavily...
[Galaxy S II Android Development] Acid0057:
Yep when in PG on Kitkat CM 11 long tap on an app to bring up AppOps and then restrict by permission. Works like a charm.

No problem with Xposed here and running it for a long time maybe a year or more.
[Galaxy S II Android Development] koolkunz:
Im running CM11 20141007 NIGHTLY on my i9100 but in your downloads there is no file for i9100 nightlies...shall i flash the CM11-M11 one?
[Galaxy S II Android Development] ajislav:
You can try but you may end up with problems as you are essentially downgrading... Since M11 was branched on Sept 30
[Galaxy S II Android Development] Lanchon:
this is correct, i only do kernels for M snapshots (for devices that have them).

as ajislav said, flashing a non-matching kernel is unsupported.

however to give you a better answer i just went though the commits in the various relevant repos and it looks like the M11 kernel should work just fine on all newer nightlies released until now.
[Galaxy S II Android Development] Lanchon:
as i wrote in another thread: it seems to me that it's almost impossible to upgrade a rom without leaking info all over the place. part of the problem is xposed itself. i studied xposed when it was a completely unknown thing and thought that it was really cool. then thought of many ways to improve it, even thought of starting to work on it myself (never did). i expected someone to evolve xposed in the right direction, but it never happened. in my view xposed is a proof of concept, not a finished product.
[Galaxy S II Android Development] gazdajezda:
Aha. Thank you for answer, but now i'm eager to know which is the right direction :)

And thank for your work on now pre-historik i9100 :)
[Galaxy S II Android Development] gazdajezda:
Before i flash to M11 and start from scratch agaim i started Androbench and here are results. Do i need trim? Or why my scores are so high already?
[Galaxy S II Android Development] Lanchon:
maybe ill do i write up some day. but now that xposed is so trendy itd look snob. plus there's cydia substrate to look into before proposing changes to xposed. maybe cydia is all we need.
[Galaxy S II Android Development] Lanchon:
i don't know! you dont say the rom/kernel you r using (not that i know them all), nor your emmc. im not psychic lol

1) you could be running a trimming kernel already (i know of none, but who knows...)

adb shell or open a terminal in the phone, then:

su

fstrim -v /data

if it says "XXXX bytes trimmed" you are running a trimming kernel. which is it?

2) this is for CM users only. i DONT RECOMMEND that you move to CM just to trim!

what rom/kernel are u using? would you prefer me to help you trim your current rom? or would you rather wipe and move to CM?
[Galaxy S II Android Development] gazdajezda:
I know you're not pshychic hehe :) I run CM10 with Siyah kernel, mainly because to me it is a killer combo regarding speed (fastest combo i have ever tried on my S2). And also i don't have to be on latest system. Your thread made me interested, so i will trim partitions and if speed of CM11 will not be satisfactory i will revert back... My emmc has a brickbug but i guess it is known to be safe with your kernel.
[Galaxy S II Android Development] Zile995:
CM10... [emoji1]

Yes, that chip is safe. I have same emmc. (Trebalo bi da radi bez problema ehehe [emoji6] )
[Galaxy S II Android Development] gazdajezda:
Well, so long it literaly fly - i don't care. I try all or most of roms and kernels, but those 2 works like a charm :) (sto se vidi iz slike i j**e mi se ako je 'samo' 4.1.2 verzija)
[Galaxy S II Android Development] Lanchon:
yes, its safe.

test if your kernel trims, do steps in 1) here..

http://xdaforums.com/galaxy-s2/deve...kbug-aftermath-speeding-t2843238/post55966369
[Galaxy S II Android Development] gazdajezda:
Sorry, i forgot to mention that before: it does not trim, i'm 100% sure. Also, there is no fstrim command...
[Galaxy S II Android Development] Lanchon:
i suppose there is no point in trimming with your current setup then, you can just upgrade.

if you want to benchmark, please bench after upgrade and before flashing my kernel and trimming. some kernels achieve exceptionally good numbers by doing unsafe or dangerous stuff, like partially disabling fsync, which puts you at risk of data loss. the only valid comparison is apples to apples, so if you want to know if trims helps your device or not, to a before-after test with official CM already in place.

make sure you empty then fstrim the /preload partition before running the after benchmark.
[Galaxy S II Android Development] Lanchon:
if you want to avoid upgrading just tell me.

there is also a bugfix you need fro CM11 to be stable.

google lanchon music bug fix
[Galaxy S II Android Development] gazdajezda:
I will install it as a fresh copy. If i will be satisfied, then i will configure it my way & use it as a daily driver until new toy arrive :) Also i will test before and after flashing your kernel. Will post results here, np.
[Galaxy S II Android Development] Lanchon:
i dont mean to pry, but why do that? just nandroid and install CM11 over CM10. don't waste time reconfiguring.
[Galaxy S II Android Development] gazdajezda:
I will, but now i go to sleep :) Bye all...
[Galaxy S II Android Development] gazdajezda:
Hi. I installed CM11 and your kernel. Benchmark of fresh non-trimmed system are:
[Galaxy S II Android Development] gazdajezda:
Then I installed your kernel, trim /data, /system, /cache & /preload from terminal. Trimming was done very fast. After reboot benchmark was:
[Galaxy S II Android Development] gazdajezda:
As i can say, trimming work, also device still works either, but with no notable difference in speed. So I will restore my cm10 backup.
[Galaxy S II Android Development] empulse92:
as fast as always :p
[Galaxy S II Android Development] Nickthegr8:
Add this to your table

[MENTION=4141005]Lanchon[/MENTION]

Seems not working...
[Galaxy S II Android Development] Lanchon:
(deleted, i confused the person i was talking to lol!)
[Galaxy S II Android Development] Nickthegr8:
seems i'm willing to brick my device ... my current kernel says 3.0.64 rod@rod...

I'll test this trim kernel ... Cross ur fingers :D
[Galaxy S II Android Development] Lanchon:
sorry! i though you were someone else in your previous message!!! lol! :) yes, go ahead, i dont think you are under any risk. just follow the instructions and do the backups.
[Galaxy S II Android Development] Nickthegr8:
Now Kernel says 3.064 dirty,,, i should run again lagfix ?