BLN Support for SGS2 - With Example. - Galaxy S II Themes and Apps

Hi Dev's
This is not my code, so credits to the owner 'creams'
I happened to stumble on some code yesterday from somebody who have attempted to integrate BLN to his kernel and done it successfully.
I thought the dev's might like to take a look at this one and implement this on their work.
blog : http://creamsnexus.blogspot.com/
git : git://github.com/creams/SGS2-SC02C-BLN-Kernel.git
His kernel was built for the Jap version of GS2.
Cheers!

AdamG has already implemented this into his AOSP ROM and it's working fantasticly, I know another Dev has already implemented it into a ROM just forgot his name. Thanks for pointing us to the source though!

hope that the devs give credit to the fix/implementation.

Ninpo also has putted it into his GIT so maybe they are already aware of it

oh i gave him a pm about it before i posted this.

samaral said:
oh i gave him a pm about it before i posted this.
Click to expand...
Click to collapse
July 31 in his GIT. You're ahead of him maybe.

I hope we will get it on MIUI and CM7 as well

vegetaleb said:
I hope we will get it on MIUI and CM7 as well
Click to expand...
Click to collapse
Don't know about MIUI but for sure on CM7. It's probably low on their to do list but BLN is something they will most definitely support just as they did with the 2X/G2X

mach0boi said:
July 31 in his GIT. You're ahead of him maybe.
Click to expand...
Click to collapse
im from the past
i didnt check his git commit date. thanks for the correction.

Do i also need to install any app from the market to enable it ?
Answer : Yes

Sorry if this is a noob question but what is BLN?

soupiejr said:
Sorry if this is a noob question but what is BLN?
Click to expand...
Click to collapse
Back Light Notification
using the led keys for notification.

Yay, my kernel will have BLN support to in the next version, just need to build all the seperate versions
(time to make a "one-for-all" kernel, that goes onto any (stock) ROM.... )

the only downside to this bln "version" is that it uses a kernel wakelock that will be hard on the battery

ogdobber said:
the only downside to this bln "version" is that it uses a kernel wakelock that will be hard on the battery
Click to expand...
Click to collapse
Yep, people are in for a treat when they realize their battery is being raped. We'll have to wait for CM7 to implement it into the framework like they did with the Optimus 2X/G2X

Nothing can beat the old good trackball lights on N1
It's a pitty all the brands stopped producing trackball,they could just reduce its size

ogdobber said:
the only downside to this bln "version" is that it uses a kernel wakelock that will be hard on the battery
Click to expand...
Click to collapse
jlevy73 said:
Yep, people are in for a treat when they realize their battery is being raped. We'll have to wait for CM7 to implement it into the framework like they did with the Optimus 2X/G2X
Click to expand...
Click to collapse
Yeah.... that is.... so not nice.... but well.... can't have everything.... :-/
// EDIT
Hm, for one, maybe some things can still be tweaked in the involved kernel code and for the other, how about disabling BLN when not needed? Does that release the wakelock? Haven't checked yet.... should check....
And does the drain/wakelock accour all the time while while activated or only when the lights are actually on - as far as I understood it so far the wakelock ist required to keep the powersupply up for the lights, but when no blinking is needed (due to no notification) the wakelock could/should be released....
Maybe that's something to tweak if that isn't already the case.
If the drain only accours when the lights are on, that's kinda OKish IMO, time to answer the damn phone *lol*

so creams put out an update that is supposed to release wakelock after the led cycle (pro app needed)
That would be an acceptable solution, I am testing to see
ps, btw jlevy he wasn't keen to your battery rape comment
HellcatDroid said:
Yeah.... that is.... so not nice.... but well.... can't have everything.... :-/
// EDIT
Hm, for one, maybe some things can still be tweaked in the involved kernel code and for the other, how about disabling BLN when not needed? Does that release the wakelock? Haven't checked yet.... should check....
And does the drain/wakelock accour all the time while while activated or only when the lights are actually on - as far as I understood it so far the wakelock ist required to keep the powersupply up for the lights, but when no blinking is needed (due to no notification) the wakelock could/should be released....
Maybe that's something to tweak if that isn't already the case.
If the drain only accours when the lights are on, that's kinda OKish IMO, time to answer the damn phone *lol*
Click to expand...
Click to collapse

ogdobber said:
so creams put out an update that is supposed to release wakelock after the led cycle (pro app needed)
That would be an acceptable solution, I am testing to see
Click to expand...
Click to collapse
NICE!
Compiler is already running

ogdobber said:
so creams put out an update that is supposed to release wakelock after the led cycle (pro app needed)
That would be an acceptable solution, I am testing to see
ps, btw jlevy he wasn't keen to your battery rape comment
Click to expand...
Click to collapse
It wasn't anything personally directed at him. I'm very grateful for his work in bringing BLN to our devices. I appreciate the update it looks like it will have a helpful impact on battery life.

Related

[APK] Blinky {Captivate Forum} [BLN Blinking]

So I'm going to maintain the latest and greatest version of Blinky in the Captivate forum, but I didn't want other users to miss out.
http://forum.xda-developers.com/showthread.php?t=854721
This should work with any ROM that supports neldar's BLN patch, though some ROMs replace the library on boot.
ROM maintainers - Contact me if you want the source to the lights library.
WOW i thought this wasn't possible because our boards don't support it? Anyway thanks, i'll try it
MAMBO04 said:
WOW i thought this wasn't possible because our boards don't support it? Anyway thanks, i'll try it
Click to expand...
Click to collapse
I'm very interested in if this doesn't work for a ROM or rev of the phone. Like I said, if neldar's patch works (meaning you have BLN now) this should work.
It says it's found Enhanced BLN, i flashed the zip via Voodoo Recovery, seems like it worked now to test, will report back in 5.
I can confirm that this indeed works on the I9000. I tested it with the ROM in my signature, so my guess is it will work with every Doc ROM and hopefully others. We need more people to test this, so please do and report back here for the benefit of everyone and the dev
Great job here bud! So when the lights pulse (e.g in the Nokia phones - fade in and out) is that also possible in the future?
MAMBO04 said:
It says it's found Enhanced BLN, i flashed the zip via Voodoo Recovery, seems like it worked now to test, will report back in 5.
I can confirm that this indeed works on the I9000. I tested it with the ROM in my signature, so my guess is it will work with every Doc ROM and hopefully others. We need more people to test this, so please do and report back here for the benefit of everyone and the dev
Great job here bud! So when the lights pulse (e.g in the Nokia phones - fade in and out) is that also possible in the future?
Click to expand...
Click to collapse
While throbbing is possible, it would require a fair amount of CPU scheduling. If I implement it, it will be only while plugged in.
Just tested it on DOC's 4.0 JPU 2.2.1 froyo rom and it works like charm . Great work !
Guardian_Bob said:
While throbbing is possible, it would require a fair amount of CPU scheduling. If I implement it, it will be only while plugged in.
Click to expand...
Click to collapse
Ah i see, sounds great anyway pretty amazing how a Nokia 5800 can handle throbbing and our phone can't..
Would it strain the CPU if you kept throbbing on whilst it was charging (i.e to show it's charging)?
MAMBO04 said:
Ah i see, sounds great anyway pretty amazing how a Nokia 5800 can handle throbbing and our phone can't..
Would it strain the CPU if you kept throbbing on whilst it was charging (i.e to show it's charging)?
Click to expand...
Click to collapse
So here's the thing, there's an embedded microprocessor controlling the capsense buttons and lights. If we could get a hold of the firmware, then we could do very cool things. But we can't so the light control has to be done by the main CPU.
I'll see how well throbbing works, I may be overestimating the drain.
Guardian_Bob said:
So here's the thing, there's an embedded microprocessor controlling the capsense buttons and lights. If we could get a hold of the firmware, then we could do very cool things. But we can't so the light control has to be done by the main CPU.
I'll see how well throbbing works, I may be overestimating the drain.
Click to expand...
Click to collapse
Ah i see.. it all makes sense to me now thanks for explaining! Damn, how on earth could one get that firmware
Yeah, it'd be cool to test out and see what happens.
P.S: Last question, would it be possible to change the colour of the lights?
MAMBO04 said:
Ah i see.. it all makes sense to me now thanks for explaining! Damn, how on earth could one get that firmware
Yeah, it'd be cool to test out and see what happens.
P.S: Last question, would it be possible to change the colour of the lights?
Click to expand...
Click to collapse
Wow; pulsing will be incredible!
Colour change will only be available via a hardware modification (manually unsoldering and changing the SMD LEDs.
KLoNe1 said:
Wow; pulsing will be incredible!
Colour change will only be available via a hardware modification (manually unsoldering and changing the SMD LEDs.
Click to expand...
Click to collapse
Cheers for explaining

Proximity sensor?

Searching on the proximity sensor I found these two parameters for the startup.txt:
board-htcrhodium-proximity.on=1 to enable the proximity device (default off)
board-htcrhodium-proximity.wake=1 to wake up the phone on proximity
http://xdandroid.com/wiki/Kernel_boot_command-line_parameters
But I can't get them to work.
Are they really available on FRX07 or NeoFroyo?
Thanks
Daved+ said:
Searching on the proximity sensor I found these two parameters for the startup.txt:
board-htcrhodium-proximity.on=1 to enable the proximity device (default off)
board-htcrhodium-proximity.wake=1 to wake up the phone on proximity
http://xdandroid.com/wiki/Kernel_boot_command-line_parameters
But I can't get them to work.
Are they really available on FRX07 or NeoFroyo?
Thanks
Click to expand...
Click to collapse
The prox sensor is not enabled on the hardware level (kernel). Perhaps they will be available soon tho, I think ACL was working on them.
arrrghhh said:
The prox sensor is not enabled on the hardware level (kernel). Perhaps they will be available soon tho, I think ACL was working on them.
Click to expand...
Click to collapse
Oh... good. Thanks for letting me know!
Would you mind if I ask you about using the PTT button?
Daved+ said:
Oh... good. Thanks for letting me know!
Would you mind if I ask you about using the PTT button?
Click to expand...
Click to collapse
What about it? Only the RHOD300 has it... No other RHOD has one.
arrrghhh said:
What about it? Only the RHOD300 has it... No other RHOD has one.
Click to expand...
Click to collapse
Yes and I have one of those. Any chance I can give it some use? I googled a lot and tried a couple things with no success. Thanks!
Daved+ said:
Yes and I have one of those. Any chance I can give it some use? I googled a lot and tried a couple things with no success. Thanks!
Click to expand...
Click to collapse
I think that if it's enabled kernel-side(I don't think so) you need to edit keymaps in rootfs to use it
But if it's not used kernel-side then you have to mess with the source
Daved+ said:
Yes and I have one of those. Any chance I can give it some use? I googled a lot and tried a couple things with no success. Thanks!
Click to expand...
Click to collapse
There's some hacking at the rootfs you'd have to do. F22's rootfs allowed you to remap the key to a few different things, but unfortunately he never made a merge request for his code... which wouldn't have been easy, he would've had to change the way he did certain things. His rootfs hasn't been updated in quite some time, so I would not recommend using it. I'm sure you can take his keymap stuff tho and put it into an updated rootfs - with a little bit of manual labor you'll be able to remap the PTT key to a few different things.
See F22's rootfs thread for more info on that.
i should have something to test for the prox sensor this week. Just finished the patch .. To be honest i have no idea when it's actually used or if our userland is ready for it.
[ACL] said:
i should have something to test for the prox sensor this week. Just finished the patch .. To be honest i have no idea when it's actually used or if our userland is ready for it.
Click to expand...
Click to collapse
I'll be happy to test it
kernel done but turns out we need some userland patches.
Wow you're really Johnny on the spot
i dunno if thats good or bad
I thought it was good, but sometimes when I try to make a reference it goes horribly awry.
Looks like this will be saved for gingerbread. Since userland changes need to be made, its not worth it to make em for froyo.
So next release of GB will have it
[ACL] said:
Looks like this will be saved for gingerbread. Since userland changes need to be made, its not worth it to make em for froyo.
So next release of GB will have it
Click to expand...
Click to collapse
One more reason to be eagerly awaiting a new GB drop.
Any ETA at all on that?
mbellot said:
One more reason to be eagerly awaiting a new GB drop.
Any ETA at all on that?
Click to expand...
Click to collapse
Never ask for eta.
It's better to have a nice surprise than a delayed build..
helicopter88 said:
Never ask for eta.
It's better to have a nice surprise than a delayed build..
Click to expand...
Click to collapse
Pretty much the first rule of any dev work - especially free/OSS - never ask for ETA.
Thanks!
actually prox is only tested on cdma and the gsm portion needs to be checked. Anyone have a recmodded rom ? or know how to pull dlls? PM me please since i need to double check on some stuff

Now we have CWM - Notification Indicator??

Hiya all,
Well, now that we have CWM and could mess around with the phone with ease, is it possible for someone with the knowledge to try and get someone kind of notification indicator working on this phone? It could either be a Mod or an app, either one will be great, but while we wait for great ROMs coming out, maybe someone can work on this? I know we don't have any indicator LED on the phone, so maybe we can work on using the softkey LEDs to indicate things like missed calls, incoming texts or IMs or emails, etc. It will be great if it's customizable but let's just start with getting it to work with the notifications.
Thanks in advance
What happened to that app you once posted about? any news from the developer?
If someone can compile a custom kernel, it would be fairly easy to integrate BLN
== What is the BLN mod? ==
The BLN mod turns the touchkey backlights into a notification led.
It enables any android application to use the touchkey backlights of your phone as a notification led.
Click to expand...
Click to collapse
[email protected] said:
What happened to that app you once posted about? any news from the developer?
Click to expand...
Click to collapse
No news from him. I will reach out to him again and see if he is more interested now that we have made much more progress, but I'm not holding my breath for him to follow up.
KernelPanic, I have no clue what to do with kernels so I'm gonna go n sit on the bench on this lol. Unless u or someone can instruct me on what needs to be done. And yeah, it'll be great if we can intergrate BLN into the Rom.
I'll see what I can do. Maybe I can compile a kernel with a few tweaks and BLN real soon.
Found this: http://forum.xda-developers.com/showthread.php?t=1424668
hansmrtn said:
I'll see what I can do. Maybe I can compile a kernel with a few tweaks and BLN real soon.
Click to expand...
Click to collapse
Thank you very much for any support you can provide. Really much appreciated.
For now, those who would like to get some kind of notification via the softkey, Xigzil came through with updating his app to support our phone. You can look for the download here: http://forum.xda-developers.com/showthread.php?p=22047422#post22047422
Of course it will always be better if we can have BLN compiled into a kernel, much better to have it running natively rather than via an app, but for now, this can help us all.
lilbluemirage said:
Found this: http://forum.xda-developers.com/showthread.php?t=1424668
Click to expand...
Click to collapse
LOL! Bluemirage, you stole my thunder Haha
aquariuz23 said:
LOL! Bluemirage, you stole my thunder Haha
Click to expand...
Click to collapse
Sorry! I read this post and when i jumped to the dev forums, I saw your post and had to share All credits go to you!
lilbluemirage said:
Sorry! I read this post and when i jumped to the dev forums, I saw your post and had to share All credits go to you!
Click to expand...
Click to collapse
LOL! Silly u, no credits go to me whatsoever, everyone can spread the good news

[DEV/WIP] doubletap2wake & swipe2wake

Hello,
I'm currently implementing doubletap2wake and swipe2wake into the stock unsecured kernel.
If someone could help, that would be great. My C/C+ experience = 0%.
So if you guys have tips or source, help is always welcome!
Thanks,
Rinse
TheRinseM said:
Hello,
I'm currently implementing doubletap2wake and swipe2wake into the stock unsecured kernel.
If someone could help, that would be great. My C/C+ experience = 0%.
So if you guys have tips or source, help is always welcome!
Thanks,
Rinse
Click to expand...
Click to collapse
actually, the stock kernel has support for this,only with root, but sadly its a propitiatory app (i dont get it either) called PGM nexus which makes use of it and u can double tap to wake, slide to wake and touch to wake .
https://play.google.com/store/apps/details?id=net.ponury.pgm2&hl=en
shriom_manerker said:
actually, the stock kernel has support for this,only with root, but sadly its a propitiatory app (i dont get it either) called PGM nexus which makes use of it and u can double tap to wake, slide to wake and touch to wake .
https://play.google.com/store/apps/details?id=net.ponury.pgm2&hl=en
Click to expand...
Click to collapse
Thanks alot sir! I'll request to delete this thread.
Thanks!!
Rinse
TheRinseM said:
Thanks alot sir! I'll request to delete this thread.
Thanks!!
Rinse
Click to expand...
Click to collapse
hold on, never give your hopes up, This is only for the galaxy nexus and the nexus 4 if you can do this for other devices it would be great
shriom_manerker said:
hold on, never give your hopes up, This is only for the galaxy nexus and the nexus 4 if you can do this for other devices it would be great
Click to expand...
Click to collapse
And better if possible via kernel SysFS,not an app.A module like sweep2wake(the one from Showp1984) would be better!And not closed source like PGM is..sadly
sert00 said:
And better if possible via kernel SysFS,not an app.A module like sweep2wake(the one from Showp1984) would be better!And not closed source like PGM is..sadly
Click to expand...
Click to collapse
yes ! exactly ! open source is the way to go besides pgm no longer supports newer kernels for 4.3 (only stock no trace and trace methods are supported ) which i guess some kernel developers dont use. anyways please make it open source if possible
shriom_manerker said:
yes ! exactly ! open source is the way to go besides pgm no longer supports newer kernels for 4.3 (only stock no trace and trace methods are supported ) which i guess some kernel developers dont use. anyways please make it open source if possible
Click to expand...
Click to collapse
Sadly my C\C++ skills are very limited,i would have been happy to help you out
TheRinseM said:
Hello,
I'm currently implementing doubletap2wake and swipe2wake into the stock unsecured kernel.
If someone could help, that would be great. My C/C+ experience = 0%.
So if you guys have tips or source, help is always welcome!
Thanks,
Rinse
Click to expand...
Click to collapse
How far have you come?
I can imagine, with 0% C/C++ experience, it is somewhat of an uphill.
sert00 said:
Sadly my C\C++ skills are very limited,i would have been happy to help you out
Click to expand...
Click to collapse
Here is an implementation for Nexus7 (2013)
https://github.com/flar2/flo/tree/ElementalX
Something to work with perhaps?
Cheers,
/J
I'd check @faux123 git. He's done this for a few devices with settings to turn on and off in his app.
Anybody still working on? Got a few thoughts.
A good place to start would be to look up the "gpm hack" and "gpm mouse" in duckduckgo. I think there is a lot of good stuff you'll find. Another thing to get familiar with is parsing the output of /dev/input/event* and the builtin touch screen emulation with android's "input" command line function, "input touchscreen" to be more exact.
Shameless bump, but is someone still interested in this?
I Am!
thewisenerd said:
Shameless bump, but is someone still interested in this?
Click to expand...
Click to collapse
I am lol

[Kernel][LOS-14.1][DT2W] TP/KB kernel for a5_ul

Turns your phone into a touchpad mouse for PC!​ Works with LOS14.1 by bigsupersquid​
Changelog:
171116:simulated touchpad support. thx pelya
171127:Now with dt2w support. Goodbye broken power button. thx showp1984
Click to expand...
Click to collapse
Download:
Code:
[URL="https://www.androidfilehost.com/?fid=962021903579495061"]AFH[/URL]
Flash:
Code:
[COLOR=Black]fastboot flash boot <boot_img_here>[/COLOR]
For Keyboard app, always download from Play store/Github
Root required, Magisk recommended.
I'm either trying to port DT2W for this device, but no luck. Done.
Anyway you may give me some feedback, source below.
​ Source: Github​
XDA:DevDB Information
HID-compliant TP/KB kernel, Kernel for the HTC Desire 816
Contributors
Aerotinge, bigsupersquid, pelya, showp1984
Kernel Special Features:
HID-compliant driver,Doubletap2wake
Version Information
Status: Beta
Beta Release Date: 2017-11-16
Created 2017-11-16
Last Updated 2017-11-27
Dammit I finally make dt2w running on this himax touchscreen driver.
No one done this before and I know little about C. That's...awwww
Enjoy!
Hi, Thank you for your work, Do you tell me i can use this for HTC816 DWG or no?
faezehya said:
Hi, Thank you for your work, Do you tell me i can use this for HTC816 DWG or no?
Click to expand...
Click to collapse
As "a5_ul" is there in the title, I'll say no.
But you can have a try. It won't explode (I guess so.)
Aerotinge said:
As "a5_ul" is there in the title, I'll say no.
But you can have a try. It won't explode (I guess so.)
Click to expand...
Click to collapse
The dts might be a little different.
Overall it'll probably work.
I hadn't seen this, nice work!
If you don't mind I'd like to import your changes, both the dt2w and the hid configs.
initial feedback, it works on my DUG
going to test it all day tomorrow
Edit: ok nvm it works for some time then touch screen stops working when the phone goes in deep sleep
bigsupersquid said:
The dts might be a little different.
Overall it'll probably work.
I hadn't seen this, nice work!
If you don't mind I'd like to import your changes, both the dt2w and the hid configs.
Click to expand...
Click to collapse
can this be ported fow dwg/dug?
Roberto Nigel said:
can this be ported fow dwg/dug?
Click to expand...
Click to collapse
If I import the kernel patches and it all works right, it'll be fine when it's built in to LOS.
Roberto Nigel said:
initial feedback, it works on my DUG
going to test it all day tomorrow
Edit: ok nvm it works for some time then touch screen stops working when the phone goes in deep sleep
Click to expand...
Click to collapse
Yes I found that issue recently...
I always connect the phone to charger so I didn't found it at the first time.
It seems to be something about deep doze mechanism, which a noobie like me can't solve alone, sorry.
I would port a fix if someone found a solution on other devices.
Aerotinge said:
Yes I found that issue recently...
I always connect the phone to charger so I didn't found it at the first time.
It seems to be something about deep doze mechanism, which a noobie like me can't solve alone, sorry.
I would port a fix if someone found a solution on other devices.
Click to expand...
Click to collapse
I'll look into it, dt2w is pretty cool and I'd like to incorporate it
No guarantee of fixing anything of course.
bigsupersquid said:
If I import the kernel patches and it all works right, it'll be fine when it's built in to LOS.
Click to expand...
Click to collapse
welp if that helps, after removing android system from battery optimization the touch screen doesnt die but dt2w is not consistant, some times it stops and have to open from the power button for it to work again
Roberto Nigel said:
welp if that helps, after removing android system from battery optimization the touch screen doesnt die but dt2w is not consistant, some times it stops and have to open from the power button for it to work again
Click to expand...
Click to collapse
Excellent observation and a perfect place to post it.
Kudos!
Can we get n overclock kernel...
Hey bro PLEASE make it work for a5 dug/DWG...I f**king love d2tw feature
In exchange can I do something for you ?donations ? Any help? I will do anything XD just please make it work on a5 dug/dwg models

Categories

Resources