yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Original Android Development] zeitferne:
Another test kernel

I don't know if that would work. After all, CPU1 must also be prevented from calling exynos_target or doing anything other with the cpu frequency while CPU0 is idling.

I propose the following patch: https://gist.github.com/Oberon00/70da36f5df80605d0c52. (Once I have tested that on my phone, verifying that no obvious bad things happen, I will upload a matching kernel.)

The patch works by calling "get_online_cpus" and "put_online_cpus". Between these calls no CPU can go online or offline and if I understand correctly, get_online_cpus also waits if an onlining/offlining operation is already in progress. I also added this to the other idle states to be safe: They depend on just CPU0 being online and who knows what would happen if they run in the same race condition. See the patch for some more information.

EDIT: Sorry, it seems that does not work as interrupts are already disabled when entering exynos4_enter_idle, so the get_online_cpus API cannot be used. Maybe we can draw inspiration from the mainline Linux kernel: https://github.com/torvalds/linux/tree/master/drivers/cpuidle.

EDIT2: I have a new approach. It is a bit inelegant but should work: Instead of normally testing if a CPU is online, let's also treat CPUs that have just started the onlining process as online. Since I have already tested that unlike the previous patch this seems to at least not cause obvious problems, I have added a kernel build for you to test (with all logging still in there).

Full patchset: https://gist.github.com/d28dbeb15df5770aa37e (The relevant one is: "cpuidle-exynos4: Treat onlining CPUs as online.") Download attached (unlike the previous kernels I uploaded, this is more than just a stab in the dark). As usual, please report any freezes or reboots you might have, preferably with a last_kmsg.
[Galaxy S II Original Android Development] Naudiz:
Omg [MENTION=5948587]zeitferne[/MENTION] you are a true hero!

I'm so excited... Will we finally be able to see a CM12 stable release on our S2? Can't wait to test and already cross my fingers. :)
[Galaxy S II Original Android Development] ammcom:
No it is not a hardware issue, I have installed the latest nightly version and WIFI is back to life
[Galaxy S II Original Android Development] Dark1Angel:
Hi! It's a little off topic, but not too much. I wish to repartition and checked the link lysergic suggested in the initial thread: http://xdaforums.com/galaxy-s2/development-derivatives/mod-increase-partition-size-t3011162 . There it says gustavo kernel is recomanded. Did you all use gustavo or is the kernel lysergic provided also good. Btw I don't exactly know were to get lysergic's kernel from were i to use it. I use twrp if it helps answering(if the kernel is in the recovery zip). Can anyone clarify this issue for me, please? And if i were to uae gustavo kernel, is it recomanded to keep it or switch to lysergic's? Thx
[Galaxy S II Original Android Development] BenjyTec:
Just want to say that the thread you linked is about increasing /system partition. It's not touching the /data if you use those pit files.

I think it doesn't matter which kernel you use for repartition. Just make sure you have it as a tar file and that it is compatible to S2. I'm not sure if LAs TWRP also exists as a tar... Guys correct me if this is wrong.

And yes, kernels are included in recovery in S2 (I think because there's no extra recovery partition).
[Galaxy S II Original Android Development] ringen00:
On my SGS2 Nova Launcher has problems keeping some widgets settings:

- cLock

- Regen Vorschau

Both are repeatedly switching back to it's default settings.

Any ideas on this?
[Galaxy S II Original Android Development] Dark1Angel:
Yes, I want to increase sistem partition from 2GB to 4GB. Thx for answering, I'll wait for more opinions about the right kernel just to be 100% sure.
[Galaxy S II Original Android Development] DevisG79:
The TWRP Kernel in tar for odin is in the 6.0 Thread. Don't know if it works for repartitioning. Just do it like in LA's repartitioning thread with Gustavos. It worked for me. After repartitioning and formating flash Rom and then you will have stock kernel and no more Gustavo. After that you can flash twrp stock kernel from LA if you wish
[Galaxy S II Original Android Development] makix13:
Uhmm,

To clarify, you want 4gb in data partition and probably 1gb in system partition.

In the original s2, data partition is 2gb and system 512 mb[emoji6]

S2 LA Cyanogenmod 5.1.1 [unofficial] [06/17] - Xposed [unofficial romracer's framework] - [rovo's beta 4 apk] - Viper4Android
[Galaxy S II Original Android Development] Dark1Angel:
I hope i'm not making a fool of myself. I have two partitions: a 2GB one, where the sistem and apps are installed on and a 11.5GB partition for images, muzic etc. I want to increase the 2GB one to 4GB
[Galaxy S II Original Android Development] pilgrim011:
You are making fool of yourself. ;) Every i9100 (unmodified) has 512 mb system and 2 gb data partition. I have modified mine, so now I have 1gb system partition (for ROM) and 4gb data (for user apps, updates of system apps etc.).
[Galaxy S II Original Android Development] Dark1Angel:
Well, i told you what's written in settings>storage. There are those 2 i named. I want the one with 2GB to be 4GB
[Galaxy S II Original Android Development] the.gangster:
[MENTION=6559665]Dark1Angel[/MENTION]

To understand what you claim as system and Data I recommend to install DiskInfo from PlayStore before you change anything. Then you might better understand of what partitions we and the repartition thread are talking about. And then you can choose an appropriate pitfile.

And yes, I already used TWRP to format after pitting. Also already the tar from CM13 thread.
[Galaxy S II Original Android Development] makix13:
As the.gangster said, this is my diskinfo, I pit 1gb system 6gb data, the rest is internal SD. The preload partition it's the original.

S2 LA Cyanogenmod 5.1.1 [unofficial] [06/17] - Xposed [unofficial romracer's framework] - [rovo's beta 4 apk] - Viper4Android
[Galaxy S II Original Android Development] levio:
If you want to increase the 2gb then you mean the /data partition. You can use this link http://xdaforums.com/galaxy-s2/deve...memory-app-t2538947/post47746656#post47746656.
[Galaxy S II Original Android Development] the.gangster:
This is no partitioning-thread, but a last comment from me:

[MENTION=1106045]makix13[/MENTION]

I wouldn't recommend others to format internal SD to ext4 as that causes problems here and there. Use the default (vFat) instead.

[MENTION=6730891]levio[/MENTION]

If he now only enlarges /data he might fail with installing GApps tomorrow.

That's why I wanted him to first understand, what partitions exist on a phone, how he currently uses them and what all the discussions in the repartition threads (and here) are about, before deciding which one fits best for him.

This is mine, ready for CM13

;)
[Galaxy S II Original Android Development] levio:
You are right, i assumed that Dark1Angel flashed tkpicogapps recommended by lysergic in open post.
[Galaxy S II Original Android Development] JoshinPl:
and why we can't create this partition and use the recoveries how the other phones?
[Galaxy S II Original Android Development] khal_nayak:
im on the CM 11 and my system partition is 500MB now i was following your guide but it says to also flash kernel in pda section so being on cm11 what file i feed there?

is it possible to just repartition without flashing anything else?
[Galaxy S II Original Android Development] nguyenthuongvu31:
not install

i can't install cm-12.1-20150703-NIGHTLY-i9100.zip .....please help me and take me screenshot about rom ! thanks
[Galaxy S II Original Android Development] mrdave68:
Resizing /system

I managed to install latest official and resize /system partition to 1GB so I can now install official CM Gapps (and also move other files to /system):

After flashing CM, I used resize2fs to increase partition size to 1GB (my device was already re-patitioned).

# e2fsck -f /dev/block/mmcblk0p9
# resize2fs /dev/block/mmcblk0p9

The problem is resize2fs is on /system partition and it does not work if /system is mounted, so I copied all of /system to /preload and then mounted /preload as /system and it worked.

(I know, probably it is sufficient to copy /bin/resize2fs and some /system/lib fles, but after many unsuccesfull tries using /tmp I sorted out copying the whole thing to preload...)

However there should be an official way to better manage our device's layout, I had to keep that 512MB /preload since changing it's size or removing it render CM unbootable...

The best thing should be having 1GB /system and the whole rest as /data using standard /data/media for user data as on newer devices...
[Galaxy S II Original Android Development] wowee_zowee:
Thanks! Coming from CM11 I did what the first post says and everything is fine.
[Galaxy S II Original Android Development] Sercan Ali:
So, if we repartion the device and update via ota, will the system be partioned to 512 again? Does a system partion of 512 with small gapps reduce performance? ( data partioned to 6 gb already)
[Galaxy S II Original Android Development] ajislav:
After OTA the ROM thinks that /system is only 512, but no repartioning takes place. It is possible to regain this lost space (see few posts above)

LA is working on a fix, see http://review.cyanogenmod.org/#/c/102514/
[Galaxy S II Original Android Development] juanjosepablos:
Naming cm-11-20150614-NIGHTLY-i9100.zip as snapshot make sense. it the last cm-11 version. Some people may prefer to stick to that one.
[Galaxy S II Original Android Development] Athawulf:
Sorry for ot!!!!!

i want thank [MENTION=6159291]Lysergic Acid[/MENTION] for his great work. ;) hey man you are the best!!!! :good::good::good: you made me very happy so i want share with you my happiness. :victory::silly::fingers-crossed::p:D

everything works perfectly!!!! now galaxy s2 is much more beautiful than ever!!!!;););)
[Galaxy S II Original Android Development] LonsDead:
Dorimanx Kernel update

Hi all,

I found on the web, the updated kernel dorimax 3.6 to 02.07.2015, but for models LG D800.

In the pages dedicated to S2 i9100 I did not find anything only old versions. ... At this time use dorimax 3.14.0 LP 26/06 on 12.1 cm.

Does anyone know where to find the updated kernel mica ?? check on the update of the same kernel that says there an update to do.

Thanks to all sorts.
[Galaxy S II Original Android Development] Ferretx:
Successfully updated to 05/07 build, and no problems at all :good::D
[Galaxy S II Original Android Development] Sercan Ali:
Sorry for the noob question, Before official update, my system is 1 gb partioned, after update it shows 512, so is it indeed 1 gb?

Thanks
[Galaxy S II Original Android Development] wdevil12:
1) Is gps working properly?

2) After switching wifi on and off for several times does it still switches on and connect without rebooting the phone?

3) What about UMS connection? does it allow you to transfer your files between PC(Windows)?
[Galaxy S II Original Android Development] ShaggyM:
unable to boot into rom

Hi

After flashing the latest build it worked and after i flashed the dorimax non trim kernal it was working fine as well but after that i tried to flash supersu.zip 2.46 and the while booting into rom switchoff in between and when i turned on it again it got stuck on dorimax logo and now the phone is not booting i tried flashing every kernal and rom but the phone switch after samsung logo.

note my recovery mode is still working but the phone is not booting

edit: no problem with rom or dorimax kernal just replaced my battery and my mobile is working fine now :)
[Galaxy S II Original Android Development] khal_nayak:
i did a fresh install and restored my apps and all good but soon noticed the recovery doesnt have backup and restore options and now i cant seem to be able to get back to cm11, is there any way i can flash a recovery on it other than the CM recovery?
[Galaxy S II Original Android Development] ShaggyM:
check the below post

http://xdaforums.com/showpost.php?p=61647924&postcount=30
[Galaxy S II Original Android Development] khal_nayak:
i managed to get back to CM11 from the nandroid backup but will there be any backup and restore option in the CM recovery ever or its just because it still needs some work because so far the ROM worked perfectly fine for me but the only reason i wanted to get back to CM11 was because i will need to resize my data partition as installing apps keeps complaining of no disk space
[Galaxy S II Original Android Development] wolfcore94:
What is recommended?

I have currently installed the nightly 07/03 with non trim kernel dorimax, performance is very good and is quite stable unlike when I try to install heavy applications such as Facebook and the like, but I'm considering upgrading to the latest build cm-12.1-20150705 -NIGHTLY-i9100.zip.

Is it more advisable to update through CyanDelta Updater or CM Updater, or is not compatible with the Kernel I have installed? Which of the two would be the one?

If I have to do a clean installation flashing, what would be best for the system performance? Should I Keep Cyanogen Recovery or replace it with Kernel Dorimax?

Thanks for the reply. :confused:
[Galaxy S II Original Android Development] JetPistol:
Thank you so much for your fantastic work, Lysergic Acid! :D

At the moment, I'm running one of your previous (unofficial) builds which had some problems with battery duration for me and I'd like to test the latest official one.

Since I'm pretty new to custom ROMs, I'd like to know the 'best' way to upgrade to the latest official ROM. Would the guide from your thread apply?

Coming from previous CM 12.1 build

- Wipe caches

- Flash cm-12.1-XXXXXXXX-UNOFFICIAL-i9100.zip from sdcard > cm-12.1-20150705-NIGHTLY-i9100.zip in this case

- Flash GApps again if you're using PA version > PICO MODULAR PACKAGE in this case

- Reboot

Are there any further hints for extended battery life?

Again, many thanks for your work! ;)
[Galaxy S II Original Android Development] Dark1Angel:
I've checked the app and i saw how little i knew about partitions. Thx a lot guys . [MENTION=964877]pilgrim011[/MENTION] or anyone can you please point me to the pit file for 1gb system and 4gb data? Sorry for bothering you so much with this offtopic question, promise it's my last one ;)
[Galaxy S II Original Android Development] the.gangster:
[MENTION=6559665]Dark1Angel[/MENTION]

As you obviously don't read what people recommend you:

Follow the link that [MENTION=6730891]levio[/MENTION] posted already and look at the currently last post.
[Galaxy S II Original Android Development] pilgrim011:
Follow this guide and choose I91001GB_4GB.pit.
[Galaxy S II Original Android Development] lukss12:
After reading your patch carefully i think it should fix the bug. Very thanks for your effort here you're great!

P.S:Can I ask what does put_cpu() do? Could it affect the result of cpu_online() ?
[Galaxy S II Original Android Development] zeitferne:
get_cpu() is equivalent to calling preempt_disable() and smp_processor_id(). put_cpu() is preempt_enable(). Both preempt_disable and preempt_enable should be without effect, i.e. redundant, since that code is running with interrupts disabled (I think even the local_irq_disable is redundant as it seems that idle code is always run with interrupts disabled).
[Galaxy S II Original Android Development] Klaus20:
Import/Export SIM Contacts

How can I Import/Export SIM Contacts ??

Regards Klaus
[Galaxy S II Original Android Development] KickerTom:
Can you be, please, a bit more specific? What kind of problems? I am using ext4 on internal SD for about a year now without any apparent problems (except for the obvious one, that you can't easily use mass storage mode with windows). On the other hand, it solved my problems with corrupted filesystem after a crash (leading to more crashes), which I was observing with vFat.

---------- Post added at 11:49 AM ---------- Previous post was at 11:46 AM ----------

Running for almost a day without crash, and subjectively feels better - does not seems to slow down sometimes, which I had with stock kernel. Still early to celebrate, but looks promising. Thanks for your work!
[Galaxy S II Original Android Development] lukss12:
Same here, I think it was possible a situation where the phone went into 150 Mhz and the frequency the kernel "think" is real is not the max (12000Mhz) so it scales up and the processor goes out from the 150Mhz mode. This situation on a high loaded state of the system could be the cause of that little "hangs/lags" we had. What do you think [MENTION=5948587]zeitferne[/MENTION]?

P.S: if true also battery consumption should increase a bit too
[Galaxy S II Original Android Development] Naudiz:
There are no problems with ext4. It's the best filesystem for Android, why else would it be the default for all other partitions?

Some people just like to complain, because you have to adjust some permissions on initial format. Just leave them with their inferior vfat or exfat ;)

Same here. So far no crash, which of course doesn't say much, but it seems to run much smoother. Stock kernel often had slowdowns, even when it didn't crash. This new test kernel so far didn't show any slowdowns.
[Galaxy S II Original Android Development] zeitferne:
That's thinkable in theory. The freeze always happened when the phone should be at 1200 MHz, because the kernel would never again change the frequency since at 150 MHz the CPU is 100% busy, so no reason to scale "down". When the frequency gets set from some lower frequency to 150 MHz, the kernel might subsequently scale it up.

However: Usually that scaling up should happen immediately so no lag should be noticeable, unless the 150 MHz makes it so slow that it does not get to scaling up fast enough. Also, I inserted the check for mismatches between the real speed and the one the kernel thinks it should have even before the fix and it only ever got triggered when the kernel thought it was at 1200 MHz. So the bug seems to happen only at 1200 MHz in practice.
[Galaxy S II Original Android Development] Dr.Fix:
What to [MENTION=6159291]Lysergic Acid[/MENTION] say about this?

Are you testing the patch too and is there hope to see it merged in official builds?
[Galaxy S II Original Android Development] Andrea900:
False, i had freezes even in the 200/500mhz range, using Kernel Adiutor.

EDIT: I'm testing your new freezefix kernel. So far, so good right now. BTW, is you kernel including the "mali leaks" patches?

---------- Post added at 04:45 PM ---------- Previous post was at 04:43 PM ----------

I've just got a freeze with the latest zeitferne's kernel! :banghead: :banghead: :banghead:

Btw, here you are the logcat and the last_kmsg

https://www.dropbox.com/s/5qzfh4b6du2sg4h/logcat_last_kmsg.zip?dl=0
[Galaxy S II Original Android Development] zeitferne:
That's bad. But unfortunately your last_kmsg is basically empty. Maybe you accidentally rebooted twice (because the last_kmsg has just a forced reboot after six seconds).

This kernel does not contain a patch for any Mali leaks, there probably aren't any. The other Mali change seemed to change nothing so it is also not included.

EDIT: If the freeze bug is the same as before, waiting about a minute should lead to the phone rebooting itself. Waiting for that is better than manually long-pressing the power button.
[Galaxy S II Original Android Development] Andrea900:
OK, i'll do it. Thanks again for your effort!
[Galaxy S II Original Android Development] jojobg:
Hello All,

I have issue with full device encryption. Have anyone of you achieved encrypting their device?
[Galaxy S II Original Android Development] Andrea900:
[MENTION=5948587]zeitferne[/MENTION] I'm so sad... Second freeze of the day. The situation is getting worse, at least for me.

I had to reboot manually the device after a couple of minutes of inactivity. I'm including a Dropbox link of the logcat/last_kmsg, as usual.

Fingers crossed!

https://www.dropbox.com/s/muh4oteumhqe8u9/logcat_last_kmsg2.zip?dl=0
[Galaxy S II Original Android Development] the.gangster:
To make it short: I am not complaining. But maybe I've read too many times here and in other threads about people that were experiencing problems with e.g. camera and other Apps, not to mention those that installed a DorimanX kernel and searched their SD-card then....

So yes, even If Naudiz has the solution for all this (I doubt for DorimanX ;) ), I just made made a suggestion that works for all. Why else is it not the default for SDs? Otherwise you are very welcome to answere the upcoming questions of the noobs, that are already now fighting with almost perfect step-by-step instructions for the repartitioning of their devices. So instructing them to format with a filesystem that is causing trouble for many is not what I would call a good advice. And the biggest disadvantage that I can see with formatting to standard (vFAT) is that it cannot be trimmed.

Regards
[Galaxy S II Original Android Development] makix13:
This is not a thread for this question but I think it's necessary to clarify some questions before end this.

First of all, there isn't any problem with ext4 format. The problems can happen when someone it's using kernels that not support ext4 (gsstudios it's trying to bring ext4 support to Dori kernel).

And for example I can access ext4 sdcard0 from Windows without any problem.

But none of us it's telling that sdcard0 must be ext4, it's up to you.

In my case, 1gb system / 6gb data and sdcard with ext4 it's the best without any issue, but don't mean that every one has to do the same.

And, what do you think in trying to help [MENTION=5948587]zeitferne[/MENTION] with freeze issue and stop to spam the thread with this [emoji6]

S2 LA Cyanogenmod 5.1.1 [unofficial] [06/17] - Xposed [unofficial romracer's framework] - [rovo's beta 4 apk] - Viper4Android
[Galaxy S II Original Android Development] Andrea900:
A short update: 2 more freezes, last night and this morning, same behaviour...
[Galaxy S II Original Android Development] zeitferne:
Sorry, your last last_kmsg was also effectively empty (contained only bootloader messages). This seems to happen sometimes when force rebooting. If all is well, the last_kmsg file should be about 1 MB in size.

If anyone else has freezes too with my latest freezefix1 test kernel, please also report!
[Galaxy S II Original Android Development] kanyb:
Also using your freezefix1 test kernel but no freeze until now (37h uptime). Will report if i get one. In combination to the freezefix1 kernel I am using 20151211 nightly. I have the impression that it runs more smoothly with this kernel.
[Galaxy S II Original Android Development] Klaerchen:
Also on freezefix kernel, uptime 38 hours, no freeze up to now.
[Galaxy S II Original Android Development] lukss12:
Is very strange I didn't have any freeze. What about inserting a panic as before to know if [MENTION=6592513]Andrea900[/MENTION] freezes are related with frequency?
[Galaxy S II Original Android Development] zeitferne:
All panic checks and logging are still included in the freezezefix1 kernel, so yes, it is really strange. Maybe a different problem.
[Galaxy S II Original Android Development] lukss12:
[MENTION=6592513]Andrea900[/MENTION] are you sure you're running the right kernel? Did you update nigthly or something?
[Galaxy S II Original Android Development] zeitferne:
In the first last_kmsg was the startup log message with the kernel version. According to that, it should be the right kernel version (commit 8762188).
[Galaxy S II Original Android Development] Andrea900:
For sure! Running Cm12.1 snapshot and freezefix kernel... And still a bunch of freezes, yesterday and today (5 or more in total).

Edit: now I'm trying to download and reinstall the kernel again. I hope that it can be enough...
[Galaxy S II Original Android Development] Dr AM:
Try it on latest nightlies and not on snapshot

Sent from GT-I9100 - 5.1.1