yashsingh1/xdaforums huggingface dataset:
[G2 Android Development] RenderBroken:
To build my kernel yourself:

Source for LP Kernel: LINK

Toolchain: LINK

I use a build script to help juggle all of the different variants (Thanks [MENTION=4316709]savoca[/MENTION]). LINK

First you will need to initialize the build environment, Follow this link to do so: LINK

So if using the build script you will need to setup certain folders in certain places. They are this way for a reason and if you really want to know, ask in thread and I would be happy to explain the reasoning.

You need to create folders using the command "mkdir". To create the folders:

mkdir ~/android

Note you can only create one folder at a time with "mkdir"

mkdir ~/android
mkdir ~/android/source
mkdir ~/android/source/toolchains
mkdir ~/android/source/kernel
mkdir ~/android/source/out
mkdir ~/android/source/out/g2
mkdir ~/android/source/zips
mkdir ~/android/source/zips/msm8974-zips

Now we need to clone the Source into the proper folders:

~/android/source/kernel/ < From here run:

cd ~/android/source/kernel/
git clone https://github.com/RenderBroken/msm8974_G2_render_kernel
git clone https://github.com/RenderBroken/msm8974_G2_render_kernel_ramdisk

~/android/source/toolchains/ < From here run:

cd ~/android/source/toolchains/
git clone https://github.com/RenderBroken/g2-linux-gnueabi-4.9.3

~/android/source/out/g2 < This is a temporary location to create Boot.img from Ramdisk.gz, dt.img, and zImage-dtb.

~/android/source/zips/msm8974-zips/ < Final Location of completed ZIP

Now that you have all the prerequisites you just need to "cd" into the kernel directory:

cd ~/android/source/kernel/msm8974_G2_render_kernel

Then run the build script:

./build

You will then be prompted to make selections. I use the D800 so my output would look like so:

Pick variant...
1) d800
2) d801
3) d802
4) d803
5) ls980
6) vs980
7) f320x
8) l01f
#? 1
Panel variant...
1) lgd
2) jdi
#? 2
Pick target...
1) lg
2) aosp
#? 2
Checking for build...
Nothing has been made...
Clean working directory..(y/n)? : y
CLEAN drivers/tty/vt
CLEAN firmware
CLEAN kernel
CLEAN lib
CLEAN security/selinux
CLEAN usr
CLEAN arch/arm/boot/compressed
CLEAN arch/arm/boot
CLEAN .tmp_versions
CLEAN scripts/basic
CLEAN scripts/dtc
CLEAN scripts/genksyms
CLEAN scripts/kconfig
CLEAN scripts/mod
CLEAN scripts/selinux/genheaders
CLEAN scripts/selinux/mdp
CLEAN scripts
CLEAN include/config include/generated arch/arm/include/generated
CLEAN .config .version include/linux/version.h Module.symvers
Working directory cleaned...
Begin build now..(y/n)? : y

Essentially, you will first select what phone you are building for. Next you pick the panel variant which is now irrelevant since I use scripts to automatically select the proper one upon flashing. Lastly you are selecting if the kernel is for AOSP or Stock LG. At the moment only the AOSP version will work. Then it will ask if you want to clean then if you want to build. At the end you should have a completed zip in this folder:

~/android/source/zips/msm8974-zips/
[G2 Android Development] iytrix:
THANK YOU!

Edit: Oh no d801? Is that coming later today or still working on it?
[G2 Android Development] 1ceb0x:
i like this kernel!!! thumbs up for Render! thank you mate
[G2 Android Development] RenderBroken:
Yep! I am trying to work out the new script so I dont have to build all the variants and for each panel type.
[G2 Android Development] iytrix:
Oh that would be nice! As far as I've seen Mahdi was working more on that? It seemed like something was wrong but his latest kernel used that script (I have JDI) and it worked perfectly fine. Maybe I was mis-reading what he was saying.

Can't wait, I've heard great things about this kernel!
[G2 Android Development] undeadking:
Interested to flash this, Anyone know if I can/should flash this with gummy 4.4.4 VS980 today's nightly?
[G2 Android Development] Lazy79:
I guess so.. Just flashed it on latest AICP nightly. Works great.
[G2 Android Development] SeVIIn:
Can't wait to give this a try on my D801 ;)
[G2 Android Development] Giocarro:
This kernel is not compatible with CM11, isn't it?
[G2 Android Development] risis78:
Into download page there is not the f320 version. It's in working for future release?
[G2 Android Development] typow102:
Can't wait to try this when the ls980 varient uploads. I use aosp and its great to see another kernel dev! Thanks for your hard work.
[G2 Android Development] djvoleur:
D801/JDI here...let's see how this goes ?
[G2 Android Development] Fuse8499:
Does this support Cloudy or Optimus G3 ROM? I know it doesn't mention it in the OP, but I figured I'd ask before I flash it and cause myself a headache if it bootloops.
[G2 Android Development] Lawlrus:
No. Two different varients of caf. paranoid android, and cm use their own variation, the rest of aosp should he able to use this kernel.

Sent from my Vs980 running Jackpotclavins Cm11 4.4.4
[G2 Android Development] r00sick:
Just installed on Mahdi. How can I use (switch on) Sweep2Wake?
[G2 Android Development] JRJ442:
You need Trickster for that.
[G2 Android Development] RenderBroken:
Not yet though I am seriously looking into building for it.

I will be releasing builds for all variants today. They will be in the Release folder when ready. I will also post about it.

I will be building for Stock as well but it uses a different ramdisk. I have to modify the Ramdisk for EACH variant and setup my build script to handle them before I can really start ripping them off.

TricksterMod would be easiest. I don't remember the sysfs command to do it via terminal at this time.
[G2 Android Development] reas0n:
I see... Thanks for explaining
[G2 Android Development] matrixios:
Great battery.... What rom use;;??
[G2 Android Development] crnkoj:
Already reported it for d802. Never had this issue before with any other kernel or rom.
[G2 Android Development] reas0n:
I suppose it's Mahdi ROM, because most people use it.

Well, I see some guys showing battery life, so here you go :D

I have 4h screen-on-time (50% battery left) with pretty heavy use (music, Dolphin, Messenger, Viral Pro). I frozen/deleted a lot of system apps and customized App Ops, maybe that's also why the battery is even better. The Theme is Herathon, before someone asks lol.
[G2 Android Development] Raagh:
Mahdi rom, android L theme

Sent from my D806
[G2 Android Development] Lawlrus:
[MENTION=5438598]RenderBroken[/MENTION]

I know [MENTION=5071747]bart452[/MENTION] Is/was making a patch for his dorimanx port for vanir, that would switch the kernel to n5 audio because his dorimanx kernel uses lg, and a lot of people are trying to use that on Mahdi.

Might be worth it to toss him a pm about it.

Sent from my Vs980 running Jackpotclavin's Cm11 4.4.4
[G2 Android Development] RenderBroken:
I am getting close. Had a weird issue causing lag that I had to track down. Fortunately I was able to so we are back on track! I am putting in last minute changes then I will build for everyone.
[G2 Android Development] dubsflyt:
I tried to flash this last night, used the d802 version for my phone but the kernel never boots, just sits on the static lg logo. Had to flash back to bruce2728's kernel to get it to boot again, this is on stock 4.4.2. Any ideas Render?
[G2 Android Development] Raagh:
This kernel is for aosp... Stock versions are not ready yet, thats your problem

Sent from my D806
[G2 Android Development] dubsflyt:
I must have missed that sorry, I dont see it anywhere on the front page, but many references to it supporting LG roms....

Well I hope it supports them soon, this kernel looks awesome
[G2 Android Development] RenderBroken:
It will. I will be working on it this week. Sorry for the confusion.
[G2 Android Development] Raagh:
Wait a lil an you ll have one for stock, its working great on aosp so i think you ll be pleased.... Not being an asshole or something but the zips clearly says AOSP xd, you should be more careful when flashing something can go wrong.

Sent from my D806
[G2 Android Development] RenderBroken:
Last bit of testing. If you are interested in what changes I have mode look here:

https://github.com/RenderBroken/render_kernel_msm8974/commits/kk-test

A Major revamp of PM functions which should further help with batterylife. Numerous stability inducing patches. A TEST commit regarding the Modem Resets. I had done some research on these and they are hard to really fix or nail down. One source was saying that Kernel Panic occurs when Subsystem Restart Dumps to ram during a Modem subsystem reset. I have disabled the function of Dumping to Ram entirely. Lets see how that helps.

Should eliminate completely the Vibration bug thanks to dr87

Added support for Smart Covers

Also stability for the touch screen driver that was causing kernel panic

And of course other optimizations that should induce a smooth experience.
[G2 Android Development] zauzaupt:
It seems that the IR remote don't work.

Sent from LG G2 d802 with mahdi-rom 2.7 + renderbroken kernel + philz cwm 6.0.5.0
[G2 Android Development] Raagh:
Sounds amazing, cant wait

Sent from my D806
[G2 Android Development] RenderBroken:
Works fine for me. Can anyone else verify this?
[G2 Android Development] zauzaupt:
Made a wipe to cache and dalvik and now work great. And what about FM radio? Keep up the good work.

Sent from LG G2 d802 with mahdi-rom 2.7 + renderbroken kernel + philz cwm 6.0.5.0
[G2 Android Development] bps119:
The op has stated clearly in the title of the thread and the first line of the op that the kernel is for aosp
[G2 Android Development] MRobbo80:
Hi can confirm on rev 2 screen cover does not work. Just a heads up noticed you added in the op :√
[G2 Android Development] crnkoj:
where did oyu find rev 2? on the link in the op there are still only rev1 under releases (at least for me)
[G2 Android Development] RenderBroken:
Good news is the kernel works for both. I am trying to make the kernel more generic so it will work for more roms. Thanks for the compliment!
[G2 Android Development] Konamy:
Does this kernel works with CM11 and Paranoid Android?
[G2 Android Development] 1ceb0x:
[MENTION=5438598]RenderBroken[/MENTION] - dude, check this out:

https://plus.google.com/app/basic/stream/z13rixbparibybpbe04cervoqxekxndb1us0k those batt stats on a Hammerhead...

https://github.com/AICP/kernel_lge_hammerhead/commit/723c44a5c53f47e730ea6812c9e789aaf9cd2995
[G2 Android Development] Lawlrus:
Negative.

Sent from my Vs980 running CloudyFlex v2.6
[G2 Android Development] 1ceb0x:
False.

The kernel works on CM11, AlegenRom, GummyRom, Liquid Smooth rom. Does not work on PA (still old JB sources).
[G2 Android Development] Lawlrus:
Liquid and gummy are not based on cm11.

Pa is not on 4.2 sources. Less with Houston gone they have heavily reverted the builds.

And he said cm11 which is way too broad of a statement. I read it as officials. Which it won't boot, because its on 4.2 kernel base, and a totally different variation of caf.

As far as alegen, I don't know why it works, unless it is based off dr87 source. Is r17 the new resbased kernel off simple kernel? Or still furance?

Sent from my Vs980 running CloudyFlex v2.6
[G2 Android Development] 1ceb0x:
Rebased of simple kernel from R16.
[G2 Android Development] Lawlrus:
Weird then. I knew it booted on alegen, but I was thinking that was because his old base was furnace which was car based. So even after he tweaked it, it still booted. Regardless just saying cm11 is too broad.

Sent from my Vs980 running CloudyFlex v2.6
[G2 Android Development] RenderBroken:
Thanks for the info, I will try it out!
[G2 Android Development] hovanhuang:
It's weird. From Mahdi change log, they have something newer than 8/17. But no more update available.

What's the major downside of 7/29 compare to 8/17? I saw lots of audio fix in the log but haven't notice any issue yet.
[G2 Android Development] RenderBroken:
Holy Crap! I have finally finished updating to Linux 3.4.103

That is as up to date as it gets. Now I have to merge all my commits ontop! lol We will see how that goes. . .
[G2 Android Development] mhajii210:
Mahdi 7/29 versus 8/17

I have not noticed any downside with Mahdi 7/29 on my D801 and R17. In fact I was getting slight audio distortion with R17 on Mahdi 8/17. I have no audio distortion on Mahdi 7/29. I was getting the audio distortion when playing YouTube or Vevo videos.

mhajii210
[G2 Android Development] REV3NT3CH:
Thanks a lot bud [emoji4]
[G2 Android Development] MaluNoPeleke:
Can / will you include this in the next build [MENTION=5438598]RenderBroken[/MENTION]? Sounds promising
[G2 Android Development] RenderBroken:
Yea
[G2 Android Development] ckyy:
WHAT? Are you serious?? I achieved 8h only once on the G2 and had 1% left. WE NEED THIS.
[G2 Android Development] blacklight1025:
I've been running R17 on PA 4.6 without one problem with dt2w, but when I was on Mahdi it was finnicky.
[G2 Android Development] RenderBroken:
So close. . .apparently there are alot of build errors when you go from Linux 3.4.0 to Linux 3.4.103 lol
[G2 Android Development] abby_nitewolf:
:o I remember you from the Rezound forums! It's good to see you in the G2 community!
[G2 Android Development] RenderBroken:
Awe man! Testing now! About to flash this sucka and see if all of today's work has paid off.
[G2 Android Development] bleached45:
So then you got those build errors sorted out? Good job.
[G2 Android Development] c_brown93:
How is it running Render? ?
[G2 Android Development] RenderBroken:
Yes sir, it was a pain but worth it. Just by doing that I have been able to increase benchmarks by 1500. I don't pit alot into benchmarks but they do give a good baseline and don't always compare to him the rom/kernel appears to run.

Running great! Still have memory frame buffer memory corruption at boot up between the LG logo and the ROM logo. It doesn't mean anything since you still boot up fine, you just get weird artifacts like colored lines or dots. They go away when the ROM logo appears. Still it bugs me so I am going to hold off release til I squash it. Still it's not that easy to do. But I am certain to fix it. I have alot in this new build that I want you all to experience. If you are interested in my changes/commits look at my

Patch-bringup

Branch.
[G2 Android Development] Konamy:
Sorry, but it is not clear for me... This kernel works with what ROMs?

CM11 works? The other ones i don't even know. and sorry for asking this. This is my last question.
[G2 Android Development] 1ceb0x:
Seems that we already had that implemented so in our case, having a bigger battery than N5 and we are still struggling to get even 7 hours of SOT, my believe is that the AOSP roms still need some work here and there to make them more battery friendly.

That - or the guy just got lucky with those stats :).

Interesting - we have overclocking again (https://github.com/RenderBroken/msm...t/ae9d0dec1df3cc70bc25d1a5acd4fb3880742a39 )?

A lot of goodies in this last build. Cannot wait to test it!

CM11 unofficial for D802 works.

This kernel works with any AOSP based rom that has 4.4 KK sources bring up, such as: Mahdi, Alegenrom, GummyRom, AICP, Liquid Smooth, SlimKat.

Does not work on PA. I don't know if it works on CM11 official though.
[G2 Android Development] Lawlrus:
Official cm11 is 4.2 based sources.

Sent from my Vs980 running CloudyG3 1.3
[G2 Android Development] RenderBroken:
Its fine, this is a muddy issue so I don't expect everyone to know about it. This is one of the bigger thorns in the sides of AOSP Roms/Kernels for the G2. At least now it seems to be opening back up like it should thanks to Dr87 and rmcc.
[G2 Android Development] 1ceb0x:
Guys. the new version will blow your minds. trust me! [MENTION=5559940]Lawlrus[/MENTION], you might wanna switch back to AOSP for this :D
[G2 Android Development] ThatKidDrew:
I can't understand how people get more than 4 hours of SOT.. I usually get 3 to 3 1/2

VS980 running AICP 4.4.4
[G2 Android Development] 1ceb0x:
Well i have mixed results. Sometimes i get 5 or 6 hours, sometimes i get 3.

What i have noticed from experience is that, if you let your phone to charge overnight, the SOT will decrease drastically versus if you leave your phone to charge up to 90-95% only.

I also use xposed framework + NLPUnbounce module - which greatly improve the battery.

I don't use greenify though. Last time i tried that app, it made my battery good in the first week, then it went from good to worse in a couple of days. So i avoid it ever since. Others might find it very useful.
[G2 Android Development] Lawlrus:
Only on stock based for the camera as I just started my yearly week long beer tour.

Was planning on not flashing as I normally do while jumping from state to state, but knowing my addiction, I'm sure I'll break down and flash something

Definitely eager to try the new build.

Sent from my Vs980 running CloudyG3 1.3
[G2 Android Development] hovanhuang:
It looks like the latest chrome has temporary freeze problem and got one reboot. I originally thought it's because of r17 but it's not. R17 is still rock. Can't wait for R18
[G2 Android Development] ThatKidDrew:
Hmmmm.. I charge my phone overnight every single night but I do use that module which noticeably reduces battery life taken up during deep sleep. Never have I ever gotten over 4 hours though. Sometimes I feel like I have a bad battery ?

VS980 running AICP 4.4.4
[G2 Android Development] 1ceb0x:
There is a new kid in town called Liquid Smooth. Way better than AICP in my opinion.
[G2 Android Development] Lawlrus:
I don't get it either. I posted a few weeks ago an idea of my battery on aicp for everyone. I had 4 hours sot 17 hours off charge and still had 45% battery left.

Sent from my Vs980 running CloudyG3 1.3
[G2 Android Development] glacies:
Sorry to sound noobish but how do I check out that branch? I went to your kernel git but couldn't find it
[G2 Android Development] ThatKidDrew:
Holy shi*... I'm almost convinced I have a bad battery everytime I see people post and talk about their SOT. The most heavy battery using things I do is YouTube and clash of clans/boom beach and sometimes twitch. Otherwise it's just twitter, snapchat, and reading articles

VS980 running AICP 4.4.4
[G2 Android Development] Lawlrus:
Granted that was with no gaming and good signal. Signal is a huge factor in battery that most people dont think about.

Sent from my Vs980 running CloudyG3 1.3
[G2 Android Development] RenderBroken:
I have my old G2 source in github too so it is easy to get confused. Here:

https://github.com/RenderBroken/msm8974_G2_render_kernel/commits/patch-bringup
[G2 Android Development] ThatKidDrew:
Definitely tru, but my city is well covered so that's not the case. I also always have max clock speed at 1.7 so help but apparently it doesn't help enough compared to others

VS980 running AICP 4.4.4
[G2 Android Development] 1ceb0x:
it does not help. change it back to 2.3. from my experience, underclocking does not help at all.. instead of helping, it even degrades your battery stats, draining even faster.

what else do you set up?
[G2 Android Development] ThatKidDrew:
Max frequency 1.7 and governor is interactive, whether I'm on AICPs stock kernel or renders. The rest of my setup is in the screenshots. I also use fast charge when the kernel supports it, and sometimes I'll have temperature throttle on

VS980 running AICP 4.4.4
[G2 Android Development] RenderBroken:
Are you running my kernel (R17)? I dont use intelliplug so I am not sure why it is enabled in your picture.
[G2 Android Development] ThatKidDrew:
No I'm on AICPsstock kernel right now until R18

VS980 running AICP 4.4.4
[G2 Android Development] bleached45:
I believe it will be R19 you should be on the lookout for.

There was an R18 but it misbehaved and was taken down. Just FYI.
[G2 Android Development] Raagh:
hey [MENTION=5438598]RenderBroken[/MENTION] which of your Github Branches is the correct one for building your kernel?
[G2 Android Development] RenderBroken:
None right now, I could not tell you which is stable by memory. I am going to start making sure master is updated to the closest stable release.
[G2 Android Development] Matze060906:
[MENTION=5438598]RenderBroken[/MENTION]: will you release the next build in a few days? Can't wait to test it on liquid smooth... [emoji2]
[G2 Android Development] Raagh:
okey then i ll wait and ask later, i wanna start building my custom AICP with your kernel :)
[G2 Android Development] c_brown93:
Can't wait for R19 [MENTION=5438598]RenderBroken[/MENTION] ?
[G2 Android Development] RenderBroken:
That's the plan!

I will push a special branch for you that will be essentially R17. Just remember my Ramdisk is actually a separate repo. Its in my github as well.

My test build has been fantastic. I would release but I dont want people freaked out with the screen glitch. People are still freaked over the reboots and dont know that R17 is stable. I would rather not release til I know its ready. It will be worth the wait.
[G2 Android Development] bleached45:
Darn. Was hoping to get the new release before the next week of class. Oh well. I know it will come out when it comes out. I understand staying on the side of caution. With the screen issues, some people may be quick to point fingers if they don't understand it. Eagerly awaiting the new release with he updated sound control.

You know, I have a D800 if you needed another tester for your device. Since your test builds would work.

:p

I joke.
[G2 Android Development] RenderBroken:
If you are game I don't mind. Then you can tell me if Sound Control works for you. I just don't use it so I don't know if its working or not.
[G2 Android Development] fix-this!:
Wanted to drop in and say thanx to render for the kernel. I upgraded to the g3 today, nice phone btw. Gave the g2 to the wife and sold her crapsung s4. See you around.
[G2 Android Development] RenderBroken:
Hate to see you go! Hope they did it right the second time around.
[G2 Android Development] bleached45:
Yeah, I'm definitely game. I flash all the time anyways and usually flash betas. This is my hobby. I'd love to help.
[G2 Android Development] fix-this!:
Ill still flash the kernel for her, just not as much. She hates when i tinker with her device lol.
[G2 Android Development] bleached45:
Do it while she sleeps!
[G2 Android Development] glacies:
Lol. This describes my life with my wife and mom in law.

Just don't get caught.

PS. Sorry for OT.
[G2 Android Development] arifqur:
You guys are just a bunch of frightened hen pecked husbands.

Ssh I got a go, I think my wife is coming.
[G2 Android Development] cortex69:
My girlfriend couldn't stand it, and I couldn't stand the fact that she was on stock software on sgs3. So she sold it and got iphone 5s, cause she knew I could not do anything with it ;D
[G2 Android Development] 1ceb0x:
i would dump her.. what is this... apple user. bleah!

Namaste! Sent from Orion Galaxy.
[G2 Android Development] chrisexv6:
We're still talking about flashing the kernel on her phone, right?

:)

---------- Post added at 07:17 AM ---------- Previous post was at 07:16 AM ----------

This is such easy pickins I wont comment (sorry about OT as well)
[G2 Android Development] markjh:
Yeah, once you get caught, tinkering with her device then it's FML... Mine has an iPhone 5s and when I Jailbreak it and make it "pretty" I'll get in trouble ?

Gesendet von meinem LG-D802 mit Tapatalk
[G2 Android Development] RenderBroken:
I see what you did there . . .

I don't mind being a little OT, especially in the downtime.
[G2 Android Development] ckyy:
Little update on the black line issue. This is definitely not caused by your kernel. I got that line 3 times now in a Week. And i'm using LS and the included kernel. It suddenly appears for no reason. The phone doesn't even reboot, it's just there out of nowhere. Good thing is that using a stuck pixel fixer solves this issue. Even if it's just temporary.
[G2 Android Development] RenderBroken:
Man that sux, Good to know though. I cant believe have F'ed they (LG) handled the G2.
[G2 Android Development] bleached45:
You would think they would know. And at the very least replace them free as a courtesy, maybe extend the manufacturer warranty due to their derp.