[Galaxy S II HD LTE Android Development] diabolicalprophecy:
UPDATED

Since these issues have been fixed in newer builds but as a s2 hd lte users, we have no option but to use older builds which have many issues. I found a workaround for them. If you are having wifi or other radio related issues, contact the ROM developer. This post can't help you. Flashing latest baseband helped me and could work well for you as well. Lets talk about two of the most common bug that haunts our device

1 Apps auto closing

->( only for LMY48G builds,if you have newer builds,just flash gapps and reboot. to check go to about phone-> build number)

This is a webview related bug.

Download latest gapps from opengapps.org.

I prefer aroma installer as smaller packages don't have webview included,which will make the bugs worse.

Flash gapps. Dont forget to select 'android system webview' from the aroma installer.

Download the zip file from the

link

https://mega.nz/#!0d5Tiaja

Decryption key !JAG5Im-T75YN1CKIOiOcyDDaBH2ILD6dzwxw4xnhrBc

Extract "libwebviewchromium.so" and "libwebviewchromium_plat_support.so"

It is taken from stock samsung ROM and only works on armv7 devices.

Copy them to /system/libs using ESfile explorer or any other root explorer.

Overwrite the original file if asked.

give permission (-rw-r-r) to both file

Reboot to recovery

Flash this file "cm12.1 android system webview" from this thread(only for cm12.1, will cause bootloops in Xenon hd and resurrection remix)

http://xdaforums.com/xperia-m/themes-apps/mod-google-android-webview-t3109216

Apps will now no longer auto close in your face without warning

((-> After testing for a month, I concluded that these steps are optional and use only if you want to have google android webview instead of cm12.1's built in 'android system webview'))

2) Now the most important part, random reboots.

This was reported on earlier builds of lollipop by many users.This is mostly caused by minfree that android uses to manage memory. If you navigate to sys/modules/lowmwemorykiller/parameters you can see 4 or 5 files. two of those files have wrong permissions. They are "adj" and "minfree".

If you give them (rw-r-r) permissions, you can adjust minfree values. the stock values are too aggressive and would cause constant reboots, freezes. Download romtoolbox, navigate to task manager, swipe left. you can choose to use any presets. i use 8,12,24,60,70,80 as minfree values.

Dont check "auto apply on boot" because you need to repeat this whole process after a reboot as those two files"adj and minfree" will be replaced from boot.img on boot by kern

Permanent fix: unpack boot.img. Navigate to ramdisc and open init.rc file in notepad. Find the line

chmod 0220 /sys/module/lowmemorykiller/parameters/minfree

chmod 0220 /sys/module/lowmemorykiller/parameters/adj

Change both values to 0644

save and close

Repack boot.img

Put it back inside the zipfile using winrar or use flashify from playstore to update boot.

I found tool to unpack qualcomm boot.img from this website. Full credits to the developer who made this tool.

http://www.droidbeep.com/how-to-unpa...-img-qualcomm/

download ROM toolbox and apply your preferred values

3. Low storage and optimizing apps(configuring ART compiler)

After google updated android runtime from JIT to ART, apps take up huge space and "optimizing app" takes forever. But there is workaround for that too.

1)Open build.prop in any text editor.

2) find these two lines:

dalvik.vm.image-dex2oat-filter=........(blah blah)

dalvik.vm.dex2oat-filter=...(blah blah)

3) Change both of these lines to

dalvik.vm.image-dex2oat-filter=speed

dalvik.vm.dex2oat-filter=Verify-none

If these lines doesn't exist, in your build.prop,you have to add them manually

4) save your build.prop file

5) reboot to recovery and wipe dalvik cache

After this check your storage space, You will have plenty of storage left and optimizing apps should be faster. It works just like old JIT compiler from older android versions.

if this doesn't work for you, you have to edit these same lines from default.prop by unpacking boot.img