yashsingh1/xdaforums huggingface dataset:
[LG Optimus 4X HD] Demetris:
[MENTION=5799877]csk1jw[/MENTION]

Got it from Sony 3.4 kernel source tuned for 1gb ram phone.

Sent me the patch of the revert and i have no problem to merge it since you tested it and works.

[MENTION=5889675]streambinder[/MENTION]

Give me some time to merge csk1jw changes before you fire up a new compile.

M looks like a bug fix release for L slowness and kernel needs very few changes are you up to get M working on P880?

If so i can get you a new branch(cm13) for experiments :)

Let me know...

Regards
[LG Optimus 4X HD] csk1jw:
I am currently testing 5.1.1_r24 (LMY48W) build. I would like to have a stable final Lollipop ROM before trying out M.
[LG Optimus 4X HD] csk1jw:
kernel - lowmemorykiller.c

[MENTION=1149134]Demetris[/MENTION]

I attached the entire source file I used. It is basically the same file from the link below with my earlier fix for kernel-3.1 prototype on sysfs node.

https://android.googlesource.com/ke...3.4/drivers/staging/android/lowmemorykiller.c

Built perfectly, 0 warning(s) 0 error(s).

[MENTION=5889675]streambinder[/MENTION]

I still have 1 more patch for system/core/lmkd/lmkd.c
[LG Optimus 4X HD] pokeguy4:
Marshmallow

Will this rom be updated to android 6.x?
[LG Optimus 4X HD] sunsettrack4:
It's done when it's done. No ETA.

Please note that each great step to a new Android version requires a lot of work invested by the devs. Additionaly, the hardware of the x3 is outdated, so the new builds may need special workarounds. The most custom ROMs almost have specific problems, the CM-based projects never left the BETA state since Android 5.0+. Just stay tuned... ;)

Gesendet von meinem SM-G850F mit Tapatalk
[LG Optimus 4X HD] AndroidholicCOL:
I'm having problems with the "phone" process, it is keeping awake my phone all the time, of course, draining battery because it never goes to deep sleep. I have googled it but I can't find anything to solve it, the closer thing I found was something about the Galaxy S2 with another ROM. Is anyone having this problem too?? If so, how did you guys solve it? I have attached some screenshots of the battery use, the wifi is always on because I have activated that option, it's very useful for me, and I used it all the time with KitKat but I didn't have any problems with battery use, so, I think that's not the problem here.

Thanks a lot for those who can help me with this problem!!

https://www.dropbox.com/s/dsyraix0fwv3zba/Screenshot_2015-10-27-18-31-19.png?dl=0

https://www.dropbox.com/s/8kps1pitn5k0l38/Screenshot_2015-10-27-18-31-36.png?dl=0

https://www.dropbox.com/s/7j1yskceksm1wj4/Screenshot_2015-10-27-18-31-46.png?dl=0

https://www.dropbox.com/s/rqqczs55ngz7p2v/Screenshot_2015-10-27-18-32-00.png?dl=0
[LG Optimus 4X HD] csk1jw:
lmkd, bluesleep

Patch for system/core/lmkd

- Enable memory pressure event to have user-space daemon handle OOM before the kernel.

- Enable framework (ProcessList.java) to update adj and minfree while using memory pressure event in lmkd.

Patch for kernel bluesleep

- Sync up with Google upstream code from android-tegra-3.10. Fixed potential wakelock leak when probe function failed.
[LG Optimus 4X HD] Demetris:
will be merged soon. thank you for your contributions

Στάλθηκε από το GT-I9300 μου χρησιμοποιώντας Tapatalk
[LG Optimus 4X HD] csk1jw:
kernel - lowmemorykiller, binder

More kernel goodies... Full source codes attached.

- Sync up binder from Google upstream. Based on changes from kernel-msm Android-6.0.0_r0.4/r0.5 and kernel-tegra android-tegra-3.10 tags.

- More advanced lowmemorykiller from Google upstream kernel-msm tagged Android-6.0.0_r0.4. This is the last tag for kernel-3.4 from MSM. The latest Android-6.0.0_r0.5 has switched to kernel-3.10, which is harder to backport into existing CM12.1 kernel.

I am currently testing my build with the advanced lowmemorykiller without applying the patch for system/core/lmkd which I posted in earlier post. So far, the result has been positive with reduced likelihood of foreground ANRs.
[LG Optimus 4X HD] Demetris:
Just let me know when ready and tested.
[LG Optimus 4X HD] kamiol2:
why a person I call, doesn't hear me ?
[LG Optimus 4X HD] csk1jw:
[MENTION=1149134]Demetris[/MENTION]

All changes were tested before I posted on XDA. For lowmemorykiller, I think we should check in the 1st version which is simply the standard Google upstream version, then followed by the more advanced version, such that we created a git record if we need to go back in future.

[MENTION=5889675]streambinder[/MENTION]

We can drop the system/core/lmkd patch to keep the AOSP source pristine.
[LG Optimus 4X HD] Subhajitdas298:
Isn't this rom prerooted? ROM Manager not working.
[LG Optimus 4X HD] Demetris:
All changes are up, enjoy.

Have in mind i cant test as my phone is still disassembled [bad power on/off and (Vol-) buttons]
[LG Optimus 4X HD] csk1jw:
kernel config

Attached my kernel config.
[LG Optimus 4X HD] Demetris:
Changes?
[LG Optimus 4X HD] csk1jw:
Sorry. I thought you would be able to tell by diff'ing it.

Anyway, the changes are

- NOOP I/O scheduler, and remove other flavors

- Remove ZCACHE, CLEANSWAP

- Enable Tegra HW SE crypto support.

Would you also take the kernel F2FS patch I ported from Moto G? It's up there for quite some time, and I think fritzcola had also tested it.

---------- Post added at 09:24 AM ---------- Previous post was at 08:42 AM ----------

Thanks. I can start posting my next kernel update with just the patch, less changes for me to track locally.

I am currently testing the below 2 changes from Moto G kernel-msm.

CONFIG_ANDROID_LMK_ADJ_RBTREE

staging: android: lowmemorykiller: implement task's adj rbtree
Based on the current LMK implementation, LMK has to scan all processes to
select the correct task to kill during low memory.
The basic idea for the optimization is to :
queue all tasks with oom_score_adj priority, and then LMK just selects the
proper task from the queue(rbtree) to kill.

performance improvement:
the current implementation: average time to find a task to kill : 1004us
the optimized implementation: average time to find a task to kill: 43us

CONFIG_ANDROID_BG_SCAN_MEM

staging: android: lmk: check free memory when tasks switch to background
Add more free-memory check point.
This patch trigger low memory killer to scan free memory when a process is moved
to background task groups.

I think Motorola had definitely put lots of efforts into OOM tuning to pay for the cost saving of releasing Moto G with just 1GB of RAM and a promised Lollipop OTA. The above 2 changes clearly manifest that Moto G is trading off even more CPU time beyond the existing means of KSM and Swap to zRAM. The idea is to have lowmem shrinker to be triggered more frequently to preempt actual OOM, optimize and reduce the time to find a task to kill by using rbtree structure to track process fork/exit/killed.

Anyone knows any other 1GB RAM device with 1280x720 screen with official Lollipop OTA other than Moto G? It would be interesting to see how other vendors deal with OOM on such device.
[LG Optimus 4X HD] ze7zez:
There are two such models with the same open source software.

Andrdoid 5.0.2 for Sony Xperia C3 D2533 and Sony Xperia T2 Ultra.

Andrdoid 5.1.1 for Sony Xperia C3 D2533 and Sony Xperia T2 Ultra.
[LG Optimus 4X HD] b886b:
Are you trying to repair your phone?? Just hope that u can get back into the game soon. :good:
[LG Optimus 4X HD] Specu3800:
You've got to flash SuperSu also.
[LG Optimus 4X HD] csk1jw:
kernel update - lowmemorykiller

Update: Replace faulty patch.

Attached patch for additional enhancements for kernel lowmemorykiller with addition of the following 2 extras ported from Moto G 4G (aka "peregrine") Lollipop-5.1.1 release.

CONFIG_ANDROID_LMK_ADJ_RBTREE

CONFIG_ANDROID_BG_SCAN_MEM

Tested with 5.1.1_r24 "LMY48W" and 5.1.1_r26 "LMY48Y".
[LG Optimus 4X HD] lg-optimus:
How can I setup a static ip address? Don't know why, but I have 2 P880 now with the same MAC-address, which leads to Wifi-problems of course.
[LG Optimus 4X HD] csk1jw:
The wifi MAC address is taken from /system/etc/wifi/bcmdhd.cal. You should note down the wifi MAC address on official ICS/JB ROM before updating to any custom ROMs. Only LG Official ROMs are able to obtain unique wifi MAC address embedded with the phones.

Once updated to custom ROMs in recovery, before rebooting you need to modify /system/etc/wifi/bcmdhd.cal to inject the designated wifi MAC address for the phone. I do that through ADB.

$ adb pull /system/etc/wifi/bcmdhd.cal
$ vi bcmdhd.cal <-- edit file to inject MAC address
$ adb push bcmdhd.cal /system/etc/wifi/
$ adb shell chmod 644 /system/etc/wifi/bcmdhd.cal

This applies to all non-LG custom ROMs. I don't think any non-LG ROMs are able to extract the embedded MAC address from TF protected storage, including any official CM10.2/11 ROMs.
[LG Optimus 4X HD] lg-optimus:
So I have to install stock ROM to get the old MAC-address? No idea, what is the "real" MAC-address of the phone.
[LG Optimus 4X HD] lg-optimus:
adb push bcmdhd.cal /system/etc/wifi/
failed to copy 'bcmdhd.cal' to '/system/etc/wifi//bcmdhd.cal': Read-only file system

What would be the easiest way now?
[LG Optimus 4X HD] csk1jw:
Remove the battery and check if you can find the serial/MAC addr sticker. You can also get the similar sticker on the box package.
[LG Optimus 4X HD] lg-optimus:
The original MAC-address to find out ist my minor problem, I have installed stock in the meantime and I am back to custom ROM. The box doesn't mention a MAC-address and the label behind the battery with the IMEI doesn't contain a MAC-No. too.

After exchanging/copying /system/etc/wifi/bcmdhd.cal with ES File explorer (but forgot to set permissions), the phone didn't boot anymore.

Can you help me with this permission problem?

I do not understand while the TWRP-shell does not show a folder /system/etc/wifi and I could not find bcmdhd.cal. Setting the rights wtih TWRP and chmod would be probably the easiest thing.

I suggest an option during the installation to set a MAC-address. All people with 2 phones of the same model will get problems with DHCP.
[LG Optimus 4X HD] csk1jw:
The permission won't soft-brick the phone. I used to forget that as well. I don't think ES explorer can modify files on system partition unless you have root and remount it as rw. Anyway, the best is to do it from recovery, either TWRP or CWM is fine, and adb.

$ adb shell mount /system
$ adb pull /system/etc/wifi/bcmdhd.cal
$ vi bcmdhd.cal <--- Edit and inject MAC address
$ adb push bcmdhd.cal /system/etc/wifi/
$ adb shell chmod 644 /system/etc/wifi/bcmdhd.cal
[LG Optimus 4X HD] lg-optimus:
I found a way to change to MAC-address, starting with adb push I change the text-file and then I copy it with Dav Drive back to the phone. With ES File explorer in root mode I copy (overwrite) it in /system/etc/wifi/ and change the permissions to rw- r-- r--

Note screenshot.
[LG Optimus 4X HD] lg-optimus:
As already mentioned, Es File Explorer can do it with root permissions. With root (adb and apps) and " adb push" it doesn't work, I got the quoted permission problem above and with TWRP I could not find the file. I cannot change to the path /system/etc. /system contains a subdir bin and that is all.
[LG Optimus 4X HD] csk1jw:
[MENTION=5889675]streambinder[/MENTION]

I got AOSP android-6.0.0_r2 (MRA58N) built successfully with minimum patches for now. Haven't tried on my device yet. I have pending changes for device tree which I would like to submit to at least get the build going. Can you create "aosp-mm" branch for platform_device_lge_p880 on MoltenMotherBoard github?
[LG Optimus 4X HD] streambinder:
As I won't be in the active P880 development code upgrading process anymore, but in the publishing LP ROMs with few fixes provided by you one, I suggest you to use your own repositories. In this way, you won't be slowed down by MMB (closed) channel restrictions.
[LG Optimus 4X HD] csk1jw:
Revised patches - RIL, GPS

I have been looking into the device/lge/p880/patches, especially on the RIL/telephony. I think using "needsOldRilFeature(...)" method to check system.prop at various places is a very bad idea. For worst case, this may require access to EMMC and parse system.prop for the ro.telephony.ril* statement. And, having to do that periodically upon handling messages/events from RIL is simply insane. Quite a large portion of the patches are dealing with conditions that aren't applicable for LG-P880 or X3RIL. This theory sorts of lead to my observation that LGP880 feels more lagging when SIM card is present.

So I have simplified the following patches to completely remove "needsOldRilFeature(...)" method and keep only the relevant.

patches/frameworks_base/0001-telephony-SignalStrength-hotfix-GSM-and-TD-SCDMA.patch
patches/frameworks_base/0003-frameworks-base-fix-GPS-for-old-GPS-HALs.patch
patches/frameworks_opt_telephony/0003-telephony-RIL-squashed-support-for-old-RIL.patch
patches/frameworks_opt_telephony/0004-frameworks-opt-telephony-implement-UICC-TLV-Data.patch

I have also revised the GPS HAL fix to remove "config_legacyGpsHAL" in the overlay.

diff -wu overlay/frameworks/base/core/res/res/values/config.xml overlay/frameworks/base/core/res/res/values/config.xml
- <!-- Enable support for legacy GPS HALs -->
- <bool name="config_legacyGpsHAL">true</bool>
-

From my testing so far, everything is working fine. Cellular data, SMS send/receive, phone call/receiving call, voicemail, SIM detection and PIN unlock, tethering. However, RIL testing with different carriers/MVNO/postpaid/prepaid plans is a daunting task. I can only do so much. Anyway, I can say that the phone feels more fluid and smooth.

[MENTION=5889675]streambinder[/MENTION] & [MENTION=1149134]Demetris[/MENTION]

I am leaving up to you folks to decide a new build.
[LG Optimus 4X HD] AndroidholicCOL:
Have you activated the '"OK Google" from any screen' option?. I had that problem with that option activated, but not just calls, I couldn't record whatsapp messages, or tune my instrument, the microphone was always "busy", because of that, maybe it is for you too. Best regards.
[LG Optimus 4X HD] bilbo75:
deleted.
[LG Optimus 4X HD] csk1jw:
[MENTION=3803661]bilbo75[/MENTION]

You already got the answer....

But if you have a clean tree, then you shouldn't have this issue.

If you have applied the patches I posted, then "needsOldRilFeature" method should have been removed. Or if you have built the tree prior to my patches, then you should repo sync the tree to return to its pristine state.

Assuming your tree is located at ~/myrom/aosp/mmb/...

$ cd ~/myrom/aosp/mmb
$ repo sync -j4
$ cd ~/myrom/aosp/mmb/device/lge/p880/patches
[I]{Replace existing patches with my attached patch files.}[/I]
$ bash install.sh
$ cd ~/myrom/aosp/mmb/framework/base
$ git status

Make sure none of the modified files showed up with "git status". Otherwise, do "git checkout -- {file}" to discard the changes.

You should be able to build the ROM, now.
[LG Optimus 4X HD] bilbo75:
Thank you for your help, I've really appreciated.

I did repo sync and copied the patches. git status says nothing to commit.

Anyway I have another error:

target thumb C++: libGLES_android <= frameworks/native/opengl/libagl/TokenManager.cpp
target thumb C++: libGLES_android <= frameworks/native/opengl/libagl/TextureObjectManager.cpp
make: *** Nessuna regola per generare l'obiettivo «vendor/lge/p880/proprietary/lib/hw/audio.primary.tegra.so», necessario per «/home/andrea/android/lollipop/out/target/product/p880/system/lib/hw/audio.primary.tegra.so». Stop.
make: *** Attesa dei processi non terminati....
target thumb C++: libGLES_android <= frameworks/native/opengl/libagl/BufferObjectManager.cpp

#### make failed to build some targets (12:22 (mm:ss)) ####
[LG Optimus 4X HD] csk1jw:
I can only understand English. You need to translate the last two make errors to English for me to help.
[LG Optimus 4X HD] streambinder:
audio.primary.tegra.so is expected to be found in vendor/lge/p880/proprietary/lib/hw, but it doesn't seem to be there. Just check you've correctly synced vendor/lge/p880 repository and - if so - that its makefiles suggest the environment to copy that "audio.primary.tegra.so" blob to the path suggested by the error ("/home/andrea/android/lollipop/out/target/product/p880/system/lib/hw").

If you didn't understand what I mean, feel free to PM me - even speaking Italian, and I will help you. ;)
[LG Optimus 4X HD] csk1jw:
I can hardly imagine anything could go wrong if you follow the README instruction for setting up the source tree.

https://github.com/MoltenMotherBoard/platform_local/blob/aosp-lp/README

I started from there, and it worked for me right from day one. MoltenMotherBoard had really done a very good job in keeping the Android development know-hows friendly to Android beginners.

Hat off to [MENTION=5889675]streambinder[/MENTION] and the MoltenMotherBoard team in upholding the spirit of GNU GPL! :good::good::good:
[LG Optimus 4X HD] bilbo75:
Thank you streambinder for your help.

I checked the folder and the file indicated was missing indeed. So I started from scratch , deleted the sources and synced again. Building right now.
[LG Optimus 4X HD] bilbo75:
Ok, I've built the rom (make completed successfully) , created a flashable zip with make otapackage and installed in recovery. so far everything is working fine. I'll report here any issue. Thanks to streambinder and csk1jw for your help!
[LG Optimus 4X HD] streambinder:
Dude, can you please summarize all the patches you worked on and that need to be included in next build?
[LG Optimus 4X HD] csk1jw:
[MENTION=5889675]streambinder[/MENTION]

Replace those 4 patch files in device/lge/p880/patches/... with my attached files. Apply the patch on a clean tree. This provides cleaner fixes for RIL issues. So far, RIL is clean from my daily test, but I definitely need to test more, especially for the following 2 issues:

- Cannot connect to celullar data after numerous switching between WiFi<->3G

- Cannot make phone calls. Signal strength fixed at max.

[MENTION=1149134]Demetris[/MENTION]

The more advanced lowmemorykiller from Moto G is not merged into CM12.1 kernel yet.

And, I have also provided my modified kernel config, which I think, is more suitable for LGP880.
[LG Optimus 4X HD] streambinder:
If it's that way, I will wait for you. Just ping me up when you'll be sure your fixes are actually correctly working. Thank you, mate :)
[LG Optimus 4X HD] csk1jw:
[MENTION=5889675]streambinder[/MENTION]

This is my 7th day into testing. The revised RIL/GPS patch files does not bring any new changes, just trying to see if the intermittent RIL issues I had in the past were due to improper/too many invocation of Android system properties method within RIL handling. One observation I have is the phone seems more responsive and less stalled during 3G/HSPA network.

Quite a few LGP880 users have experienced the same intermittent RIL issues I had. I think it is good to have a new ROM release with my new patch files, so that more people can help to test it.

Again, this AOSP 5.1.1 ROM is the best I have now. Other than minor issues with Google Maps, I think I am starting to enjoy the phone a lot including browsing with Chrome.
[LG Optimus 4X HD] bilbo75:
+1. I'm using the latest patches since last sunday and I'm not experiencing any issues too. I have also these annoying RIL problems, and I feel that phone is a lil better now

Sadly the gps didn't get any improvement. Still quite inaccurate IMHO. Anyway the overall usage of the phone is pretty good, smooth and a nice memory management :good:
[LG Optimus 4X HD] csk1jw:
Obsoleted, abandoned Nexuses now also get Android 6.0 Marshmallow.

Nexus 4 (Mako)

Nexus 7 2012 (grouper/tilapia)

Check out the link:

http://dmitry.gr/index.php?r=06. Thoughts&proj=04. Android M on Grouper

I am able to build MRA58N for LGP880. All patches under device/lge/p880/patches/... ported accordingly. Camera and audio wrappers build errors resolved. However, it didn't boot and I couldn't even get adb for visibility. According to CM13 devs threads, the ramdisk did not boot.

I don't have any experience into debugging initial boot. Hopefully, someone will be able to resolve this to at least having adb available. Once this is accomplished, I am more than happy to venture into Android 6.0 Marshmallow.
[LG Optimus 4X HD] G4l4xio:
Developer Options

Can someone please help me, I have installed this rom and all working great but I can't find developer options anymore on settings, also google playstore is not working anymore, I need to send to my phone lg 4x hd google gapps so it will work. Can't do that because when I connect my phone to pc via usb cable it does not show it on pc anymore? Also this is my 1st custom rom on my lg 4x hd.

Ok found how to show developer options, so help me with other problems mentioned above pleaseee.

Before all of this I rooted and unlocked boot loader on this phone, and now superuser is gone?

When I enter google play store all I can go is on some "redeem" and they asks me for some code which I don't get on email. And on screen on mobile every sec pop ups google play services stop working (google play services won't run until you update) but I have updated them, downloaded apk because I can't download from play store (redeem code problem).
[LG Optimus 4X HD] Subhajitdas298:
What will be proper Gapp for this? TK GApps don't work.
[LG Optimus 4X HD] G4l4xio:
Sooo do I need Gapps on my phone can work with normal google play store, downloaded apk. And why my laptop is not seeing my phone after I connect it on usb after this rom... I can't enter gmail, can't enter anything without making google play services working.
[LG Optimus 4X HD] Subhajitdas298:
Can't install Gapps and SuperSU. TWRP 2.8.7.

Please help.
[LG Optimus 4X HD] G4l4xio:
YEEEEEEEEEEEEEEEEEEEEEEEEEEEES it's working, downloaded some GApps from net, all working now except my laptop does not recongize phone when I connect it via usb. Some bad tutorial did not mentioned I needed to download GApps thanks man.
[LG Optimus 4X HD] tiflao:
I can download this version?

Or is a test versión?

Enviado desde mi Optimus 4X HD mediante Tapatalk
[LG Optimus 4X HD] bilbo75:
You can't. You have to download the sources and build it by yourself. Otherwise you have to wait devs.
[LG Optimus 4X HD] fritzcola:
Did you uploaded your device tree somewhere?
[LG Optimus 4X HD] streambinder:
Alright. New build is up! Enjoy!
[LG Optimus 4X HD] G4l4xio:
So, what is new? Do I need to update it because I don't have any problems with this build except I can't connect my LG 4X HD to laptop via usb. No problem for that because I use Wi-Fi file transfer apk.
[LG Optimus 4X HD] bilbo75:
If you are happy, don't update.
[LG Optimus 4X HD] Subhajitdas298:
Working GApps ?

Which Gapps are you using?
[LG Optimus 4X HD] G4l4xio:
Wait I will try to find link for that Gapps, no more play store or play store service errors. If I can't find link I will send them to you in rar.

---------- Post added at 06:43 PM ---------- Previous post was at 06:40 PM ----------

Ok I'm using this http://xdaforums.com/android/software/gapps-google-apps-minimal-edition-t2943330 but downloaded from this link https://www.androidfilehost.com/?fid=95916177934550851.

---------- Post added at 06:50 PM ---------- Previous post was at 06:43 PM ----------

Btw I'm using this one https://www.androidfilehost.com/?fid=24052804347801729 from Aug 26, 2015 instead this new one https://www.androidfilehost.com/?fid=24269982087001281 from Nov 21, 2015. Did you checked with app root checker that is your device rooted succesfuly?
[LG Optimus 4X HD] csk1jw:
Is it a typo that the build is still based on 5.1.1_r13? I think for typical phones, the best build is 5.1.1_r26 which contains security patch level at 2015-11-01.
[LG Optimus 4X HD] streambinder:
Not a typo. New build on the way, then.
[LG Optimus 4X HD] sprite048:
Does it have F2FS support?
[LG Optimus 4X HD] G4l4xio:
I have 2 questions please answer to me someone who knows because I'm new in custom ROM's.

1. If I flash new GApps version will I lose all my apps and settings?

2. If I flash new version of this ROM which came yesterday would I lose my all apps and settings, also I can just flash it over this older ROM?
[LG Optimus 4X HD] streambinder:
1. No

2. No