yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] zeitferne:
I count 13 here: https://github.com/CyanogenMod/android_kernel_samsung_smdk4412/commits/cm-11.0/. The missing #14 comes from the fact that I have squashed it into #13. Why #10 (here it is at CM's github repository) is missing at http://www.cmxlog.com/11/i9100/, IDK; but it consists only of changes to comments (code documentation) anyway, meaning it isn't really important. So don't worry, CM has my most up to date patchset.

EDIT: I now know why #10 is not showing up at cmxlog: It's classified as translation. Uncheck "Hide translation" in the options and you can see it.
[Galaxy S II Android Development] Nojevah:
I saw this fix has just been applied in Apollo Kernel, which is quite popular I think. I just wanted to know: Does this bug really concern Samsung stock ROM (4.1.2) ? I remember this bug was really visible with SD card, but I'm not sure of seeing case it bothered stock ROM users.
[Galaxy S II Android Development] Lanchon:
yes. that is stated in the OP, btw.
[Galaxy S II Android Development] Mahonni:
Hi guys,

After 2 weeks with CM 11 M12 + this kernel patch, I had absolutely no problems until I tried to untick USB debugging option while I had my S2 connected to my PC, and it froze. After rebooting, the phone was bricked, and now it can only access download mode, but can't flash anything with ODIN (recognizes it, but never finishes flashing). I followed this guide and nothing worked. I still need to try the last resource: flashing a .PIT file, but I have doubts it can work.

Could this patch have a small chance of doing a brick like this? And in case it can, since you know how it works, is there any other thing I can try before flashing a .PIT file?

Thanks!!
[Galaxy S II Android Development] Acid0057:
[MENTION=4141005]Lanchon[/MENTION] will know for sure. But have you tried flashing a new Rom in download with hemidall instead? I've found hemidall to be more reliable.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Mahonni:
Thanks Acid0057, I haven't tried it. I flashed several roms and kernels, but not this one. I'll try it now and I'll tell you something.
[Galaxy S II Android Development] Lanchon:
i'm very sad to hear that. it seems your hardware is failing.

no, the FPBug fix has ABSOLUTELY ZERO chance of bricking anything. ZERO.

the only good thing i can say is that luckily you were using my FPBug kernel and not my FPBug+TRIM kernel. had you been on trim people would start to say that trim killed it, when in reality hardware just fails. flash in particular degrades with time (and much faster when not using a kernel with TRIM).

i'm sorry to say this, but odin not finishing the flash looks very, very bad. it might well be the case that your phone is dead.

1) do you care about recovering any info from your phone? (though by using odin its probably mostly gone)

2) after the freeze, were you able to boot into recovery?

before you mess with PITs, i would extract the EFS partition if possible. do you have a backup of EFS?

if that was my phone, the first thing id try is flashing my kernel again using odin or heimdall. if it succeeds and you can boot into recovery, you can adb shell to it and from there start working on a possible solution.

do you want to do this?
[Galaxy S II Android Development] Mahonni:
Thanks for your answer, Lanchon.

Considering all I've tried and read, I was also thinking that would be a hardware failure. I'm glad your fix was not responsible of that, I read all this thread and I didn't want to be the first one with a bricked phone because of that :P

Answering to what [MENTION=5173535]Acid0057[/MENTION] told me, I have just tried flashing a kernel with Heimdall and I had no luck either. At the end of the post I'll paste the log.

And to [MENTION=4141005]Lanchon[/MENTION]:

1) If it's possible to first check if I can recover some stuff, then I'd be great. Luckily, almost all important stuff was in my external card and I could see the folders in another phone, so I guess they're ok. It's something. Oh, and yes, I have a backup of my EFS partition.

2) No, right after the freeze I couldn't access recovery, just download mode.

I will do as you say and try flashing your kernel again, but the one I flashed before (kernel-Lanchon-FPBug-20141218-cm-11-20141115-SNAPSHOT-M12-i9100) is for CWM. Where and I find a version for ODIN?

Thanks!!
[Galaxy S II Android Development] Lanchon:
you just have to extract the boot.img file from the zip and package it in a tar, details are discussed elsewhere. or you can use heimdall for flash the img.

assuming that it doesnt work...

its too bad stupid brain-dead sammy bootloader cant boot a kernel image, only flash it. if it doesnt work, try odin with repartition. if that doesnt work (it probably wont) we can try move the kernel partition to a different area of the emmc to see if we can flash it and boot. do you use linux or just windows?
[Galaxy S II Android Development] Lanchon:
im not familiar with odin.

given that the flash is faulty, i wouldnt attempt to write the bootloader. i think that odin reflashes everything, including BL. i'd be wary of that.

if i were you id try to apply a PIT using heimdall without flashing a boot loader; flash just the kernel.

google my i9100 trim thread. in the OP there is an attached zip. it has a script in it (for unix). that is how i repartition using heimdall. you can base on that but using the stock PIT.

heimdall has a bug that wont flash a PIT without a partition. that is why i also flash HIDDEN (ie: /preload) with zeroes; it is unused in CM anyway. flashing of HIDDEN fails because of the image format, but the PIT before it works, which is what i want.

you can flash the kernel instead of /preload.
[Galaxy S II Android Development] Lanchon:
if the PIT flash doesnt work (bad flash area) and the kernel flash doesnt work either (we already know that) then theres nothing else you can do IMHO.
[Galaxy S II Android Development] Acid0057:
I'm also glad to hear it says hardware. I also suspected that. How old was your s2?

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Mahonni:
Ok, so I've flashed your kernel using Heimdall and Odin and none of them worked. Logs are in the bottom of this post. I don't have enough time today to read all instructions for the PIT, I'll do it between today and tomorrow, but I'll do as you say and try not to touch the bootloader.

I'm using Windows, but if it's needed, I have Ubuntu in a USB stick for situations where Linux is a must, no problem.
[MENTION=5173535]Acid0057[/MENTION], my phone just turned 3 years old, but I didn't flash it many times. Let's hope it can reach 4, even as a secondary phone!

[MENTION=4141005]Lanchon[/MENTION], if nothing works, then the only solution would be replacing the motherboard? Maybe I can find one, but it won't be easy.

With Heimdall

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading BOOT
100%
ERROR: Failed to confirm end of file transfer sequence!
ERROR: BOOT upload failed!

Ending session...
Releasing device interface...

With ODIN (sometimes it timeouts, sometimes it lasts forever)

<ID:0/007> Odin v.3 engine (ID:7)..
<ID:0/007> File analysis..
<ID:0/007> SetupConnection..
<ID:0/007> Initialzation..
<ID:0/007> Get PIT for mapping..
<ID:0/007> Firmware update start..
<ID:0/007> boot.img
<ID:0/007> NAND Write Start!!
[Galaxy S II Android Development] Lanchon:
could be the emmc not responding to the BL while wrtining... bad!

try this:

heimdall flash --repartition --pit theStockPIT.pit --KERNEL zImageAnyKernel --no-reboot

the kernel flash will fail. but the repartition might succeed. if it works, it means that the BL can still write to the partition table, which means we have a shot at relocating the kernel.
[Galaxy S II Android Development] Acid0057:
My s2 turns 4 in September. Maybe it will make it till the s6 release

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Mahonni:
Ok, so I've followed your instructions using Heimdall and maybe we have some hope on that. PIT was uploaded sucessfully, but not the kernel. The phone still enters download mode :)

Initialising connection...
Detecting device...
Claiming interface...
Setting up interface...

Initialising protocol...
Protocol initialisation successful.

Beginning session...

Some devices may take up to 2 minutes to respond.
Please be patient!

Session begun.

Uploading PIT
PIT upload successful

Uploading KERNEL
ERROR: Failed to initialise file transfer!
ERROR: KERNEL upload failed!

Ending session...
ERROR: Failed to send end session packet!
Releasing device interface...
[Galaxy S II Android Development] Lanchon:
ok great!

i'll make a PIT for you to try. i assume you have the i9100 16GB version.

please check back in 10 minutes
[Galaxy S II Android Development] Mahonni:
Thanks, Lanchon! Yes, it's this version.
[Galaxy S II Android Development] Lanchon:
this pit has a shrunk /preload (usually the last partition), the kernel partition moved to the very end of the emmc, and an unused hole where the kernel usually goes.

try it and see if you can flash my kernel.

if you can, try booting into RECOVERY.

if it works, don't try to flash anything else, just get back!
[Galaxy S II Android Development] Mahonni:
Unfortunately, looks like this area is also corrupted. I could flash the .PIT, but not your kernel.

I was thinking that this may not be the problem, since when I flash .PIT + kernel, while flashing kernel I get an error saying it can't even start the transfer but, if I just flash the kernel (with this new partitioning), it starts but gets an EOF error. It's like it looses connection after a short time, and PIT works because it's faster to load than kernel.

Session begun.

Uploading PIT
PIT upload successful

Uploading KERNEL
ERROR: Failed to initialise file transfer!
ERROR: KERNEL upload failed!

Ending session...
ERROR: Failed to send end session packet!
Releasing device interface...

Session begun.

Downloading device's PIT file...
PIT file download successful.

Uploading BOOT
100%
ERROR: Failed to confirm end of file transfer sequence!
ERROR: BOOT upload failed!

Ending session...
Releasing device interface...
[Galaxy S II Android Development] Lanchon:
yes. with both PITs, flashing the pit makes the kernel flash end with a different error. "Failed to initialise file transfer!", which maybe means that the BL died while writing the pit.

the correct way to check what happens is: using heimdall, download the current pit and print it redirected to a file. compare it to the ".txt" versions of the stock and my pit (both included in the previous zip), and see which one it matches.
[Galaxy S II Android Development] Mahonni:
I have compared current PIT with both and is the same as the PIT you sent me, meaning it didn't die writing it.

BTW, I have also tried to flash your kernel with odin (just kernel, without PIT), and as expected, it also gets suck flashing.

Just to make sure I explained it well, the different errors are between just flashing the kernel (it starts but can't end) and flashing kernel + PIT (finishes pit, but can't even start flashing kernel).
[Galaxy S II Android Development] devloz:
[MENTION=4141005]Lanchon[/MENTION] is there any chance, that "VFP bugginess" was allowing faulty phones to work, and after fixing it they just died? Just to make sure, i'm asking my friend to update his CM to 20150111 :)

PS: Should wipe be applied to get better results?

PS2: After upgrading (he uses nightlies but flashes them once per 1-2 months) he got immediate reboot, but it's ok for now He's testing :)
[Galaxy S II Android Development] Lanchon:
sorry for the delay.

i sent u two PITs. so you are telling me that the new PIT was written correctly and reading it back confirms it, is that true?

i thought that the emmc had gone into read only mode. this sometimes happend when the emmc firmware detects an error in its data that it doesnt know how to handle.

but the PIT write working means: either the emmc is not write-locked, or the PIT is stored outside of the "normal" emmc area, and the normal area is locked.

so i'll prepare another PIT with the kernel in a different position as a last resort. after that, there is not much more you can do.
[Galaxy S II Android Development] Lanchon:
absolutely no chance of any bricks related to fixing FPBug.
[Galaxy S II Android Development] Lanchon:
here are two more kernel positions. if they dont work -and i have very small hope- then i dont think there's a way forward.

the problem with the exynos 4210 is that we can't sign a BL to make it boot from USB or sdcard (we dont have the keys).

besides replacing the emmc chip, your only option is to use JTAG to:

-push commands into the emmc to resize it, which as a side effect resets the complete internal state of the emmc.

-push commands to partition the emmc.

-flash the BL.

this is the cure for devices dead by brickbug, which is just a corrupted state of the FTL data in the emmc. it has only been done on some kindles, because we can boot those, but never on a i9100 device. on the kindles, we did it from the main CPU instead of via JTAG. on the i9100 the commands should be pushed to the emmc via JTAG because we can't convince the CPU to do anything not signed by sammy. revive via JTAG is theoretically possible but was never attempted. AND... your emmc could be physically busted and maybe a full reset wont bring it back to life.

assuming success, later you'd also need an EFS backup to restore the IMEI, etc.

this is all theoretical and im not recommending that you go this complex path.
[Galaxy S II Android Development] Mahonni:
Thanks Lanchon, I really appreciate your help.

Yes, PIT write works. Let's hope your new PIT solves it!
[Galaxy S II Android Development] Lanchon:
(FYI, i posted the PITs before you wrote this)
[Galaxy S II Android Development] Mahonni:
Yes, I saw it later haha!! I forgot to refresh I guess :P

Unfortunately, I've tried all your PITs and there was no luck, I got the same results. Looks like a dead end to me too. Anyway, thank you for your help, I've learned a lot with it. Too bad there was nothing we could do!

Considering that using JTAG exceeds my skills, there's a chance that I can get a s2 with a broken screen from a friend of mine (I've also seen adds selling it for 30€). In case I can get one, what would I have to do? Change the whole motherboard? I've seen videos replacing the emmc and it looked pretty hard, with soldering and so.
[Galaxy S II Android Development] MikiGry:
I u will get SII with broken screen (but rest works) u will have :

SII with broken screen

SII with damaged emmc/motherboard

I u think (srsy i dont know how to replace any of components) that replacing motherboard from SII with dead screen to SII with broken emmc is too hard that replace screen from motherboard damaged SII to screen damaged SII.

Wysłane z Cyanofonika 12 beta...
[Galaxy S II Android Development] Lanchon:
its very simple! you use your display assembly, complete with the frame (the chasis of the phone, display and frame are glued together), with your friend's motherboard. you'll end up with your friend's board and IMEI and your own frame, which has the sticker with your original IMEI, the sticker won't match the reality, but that's just a cosmetic problem. the rest of the parts, you can choose whatever is in better condition.

be careful when buying a phone without display: they can be dead, or not have an IMEI, or the IMEI can be blacklisted by the operators. always test with a sim card.

changing the emmc is not possible without advanced tools.
[Galaxy S II Android Development] Lanchon:
btw, which country are you in? maybe i'd be interested in getting one of those cracked phones for 30 euro.
[Galaxy S II Android Development] Mahonni:
Thank you guys, I will try to do that.

Lanchon, I live in Barcelona (Spain). The cheapest I've seen is 30€ (from today), but looks like it's possible to find one easily for <50€. This one is not in Barcelona, so I guess I have to add extra for the shipment (5€ maybe?). If you're interested, I can try to help you contacting the seller.
[Galaxy S II Android Development] Lanchon:
gracias. solo compraría una cosa así si pudiera probarla antes de pagarla, y te recomiendo lo mismo. para mi estos sitios solo son útiles si la compra se hace de manera presencial, no por correo, gracias igual!
[Galaxy S II Android Development] Lanchon:
hi!

please try one last PIT. it also relocates the kernel to the end but does it differently, it's worth a try.

good luck!! :)
[Galaxy S II Android Development] Mahonni:
Hi Lanchon, sorry for answering so late, I've been abroad these days and I barely had time to be online. Now I have another S2 with a broken screen that I thought I could use to get a new motherboard, but the screen was not as broken as I thought and the owner wants it back one day. I guess I'll have to find another one.

Vaya, no sabía que también hablabas español, vaya sorpresa!! De dónde eres? :o

Pues sí, pienso igual, por eso estoy mirando si encuentro algo en Barcelona o cercanías. Si encuentro algo de más, te lo comento.

I have just tried it without luck, same error as always. Anyway, thanks to trying so hard! I'm still thinking that there could be something else to do since pit flash works, but we've tried lots of positions and all of them end the same way.
[Galaxy S II Android Development] JulGer01:
After some extensive testing, I can say that the old non TRIM kernel is the most stable kernel for my n7000. Not the newer cm11 stock kernel. Don't know what it is, but with your kernel I don't have any fatal freezes. On cm11 stock, I often have freezes that I only can resolve with a reset. The same with the TRIM. Hope you keep working on this "ordinary" kernel. Hope I can keep using it... ?

Gesendet von meinem GT-N7000 mit Tapatalk
[Galaxy S II Android Development] kenop123:
thx alot....
[Galaxy S II Android Development] nhmanas:
I am experiencing screen freeze on fixed kernels [MENTION=4141005]Lanchon[/MENTION] especialy on chrome

Anyone experiencing too?
[Galaxy S II Android Development] Lanchon:
well there are two fixes, mine and later zeitferne's. my kernels made for nightlies prior to 20150111 have my fix. from that date on, CM incorporated zeits fix, so my kernels inherit his fix instead.

you can try one of my pre-0111 kernels and see if you have freezes. its easy to show that my fix wouldnt create any problems while solving the fpbug issue. zeits fix however could potentially introduce problems (and has in the past, but the bad fix was supposedly fixed).

make sure you report if you test.
[Galaxy S II Android Development] Lanchon:
thanks for the comment. i hope you are still around. could you please read the message previous to this one? thanks!
[Galaxy S II Android Development] Mahonni:
Hi all,

I have my s2 working again, now with cm-11-20150209-NIGHTLY which I read has zeits fix. This time I have also decided to increase system and data partitions and try ART, we'll see how it performs!!

Anyway, a Spanish guy contacted me after I put an ad and sold me an s2 motherboard for 30€+posting. Great price :D. I took the risk and it had a happy ending: I received an s2 motherboard (which I had no guarantee at all), it was working (good IMEI) and I could replace it flawlessly.

So here I am again!!
[Galaxy S II Android Development] Lanchon:
that's great! glad you could get a cheap mobo and had luck with it :) remember to backup the new efs!
[Galaxy S II Android Development] nhmanas:
I don't mean your kernel. Your or zeitferne's code (which is default on cm12 by Lysergic Acid's kernel idk)

Is it possible to improve code?
[Galaxy S II Android Development] Lanchon:
i dont understand.
[Galaxy S II Android Development] Acid0057:
I think he's asking, can you fix the freezing. But I know you want him to find out if it's your kernel or zei`s causing the problem.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] Lanchon:
he said fpbug fix causes freezes. he needs to run two exactly mirror kernels, one with, one without the fix, and test that freezes happen on the fixed one. anything other than that is not applicable to this thread.
[Galaxy S II Android Development] Acid0057:
Ah my bad.

Sent from my GT-I9100 flowing on SwiftKey in Tapatalk
[Galaxy S II Android Development] casperusm:
Is this kernel only for cm or can we use it sammy stock roms?

THanks
[Galaxy S II Android Development] Saber:
These kernels are for custom roms. If you want fpbug fix on stock 4.1.2, you would have to use apolo kernel 4.15b
[Galaxy S II Android Development] j1gga84:
I think this bug is not present on stock ROMs or Android versions below 4.4, correct me if I am wrong.

Regards

Sent from my GT-I9100 using german Tapatalk 4
[Galaxy S II Android Development] Lanchon:
is it too much to ask to read the first sentence in the OP??
[Galaxy S II Android Development] lilicaull:
can i install one of these kernels to slimsaber 21/12 ?
[Galaxy S II Android Development] x3dnd3x:
After testing for coming a month, seems like with this kernel its able to load Themer but only able to load the smaller size themes but not the large ones. It will still be laggy even with the smaller themes but still able to use.
[Galaxy S II Android Development] Lanchon:
this kernel is obsolete now that the fpbug fix has been integrated into official CM, please read the OP.

but... do use my trim kernel if you want more performance!
[Galaxy S II Android Development] x3dnd3x:
Opps! I replied in the wrong thread. I subscribed to both of your kernel thread. Meant to reply in the trim kernel thread. Haha.
[Galaxy S II Android Development] mahaseno:
is there anyway to turn bln off ?
[Galaxy S II Android Development] Lanchon:
i didnt know it had it! these are standard CM kernels, feature wise. so look for your answer on the CM kernel threads. (i assume you are using the 10.1.3 kernel btw.)
[Galaxy S II Android Development] ninestarkoko:
if i remember well on JB 4.1.2 i had a problem because the CONNECTIVITY_CHANGE action often was not broadcasted during screen off (logcat demostrated this) and apps could not get the new connection parameters (even if the connection type was effectively changed). Maybe this bugfix could solve a lot of strange issues we've had in 4 years
[Galaxy S II Android Development] Lanchon:
screen off is exactly the trigger of the problem. phones work very well now, im told. the fix is in almost all kernels now.
[Galaxy S II Android Development] Facy87:
Has this been merged into CM11 and/or 12 stable yet?
[Galaxy S II Android Development] ajislav:
Yes., it has. Did you read the OP?
[Galaxy S II Android Development] Lanchon:
lol :)
[Galaxy S II Android Development] haris1976:
[MENTION=4141005]Lanchon[/MENTION] would you make kernel for SlimLP base rom , I know you are genius
[Galaxy S II Android Development] Lanchon:
wtf! lol absolutely not, but thanks for your generous opinion :)
[Galaxy S II Android Development] avispi11:
Galaxy S2

Hello I have a very big problem with my S2. I'm using Official CM12.1 nightlies and my phones battery is terrible!. It drains from 100 - 0% in 2 hours and I always wake up in the morning to find my phone dead after charging to 100% every night.

Also my network signal randomly disables time to time and the phone heats up( near the camera area where the processor is). Does that mean the CM12.1 has not yet received the fpbug fix? If so when will they fix it? Is there any other CM12 ROM which has this fix?

Please help :(
[Galaxy S II Android Development] :
Try installing better battery stats or similar app to find out what is using the battery. I don't think your problem is fpbug, the problems you describe have nothing to do with that. It sounds like a background app or process that is keeping your processor working.