[Q] Can you add features to cm11 kernel? - One (M7) Q&A, Help & Troubleshooting

I'd like to add the knock to wake function to the cm11 m7spr kernel. I'm not sure if this is possible. I've seen the bulletproof kernel and it adds knock tp wake, among other features, to the htc one m7. Is there anyway to build the knock to wake function into the cyanogenmod 11 kernel or, if that isnt possible, perhaps some other alternative?

Related

[MOD][KERNEL] Touchkey Backlight Dimmer (BLD)

**** OUTDATED !!!! SEE BELOW ****
Version 1.0
It bugged me that there was no way to switch off the touchkey backlights on the Nexus S, so I looked into it. Starting with the Netarchy kernel I made some modifications exposing two switches in /sys/.../backlightnotification/ to manually turn on/off the button backlights. However on my i9020 the button backlights get activated automatically once you use the touchkeys - I could not check the i9023 since I do not have one. This behaviour seems to be controlled by the touchkey firmware which only is available as a binary, so without some hex editing the binary there seems to be no way to change this. The next best thing would be to disable the touchkey backlights everytime they get activated, however since I am lazy instead I chose a quick and dirty approach of using a cron daemon to simply trigger the off-switch once every minute. This is good enough so the backlight does not bother me while watching movies, etc. and the extra battery drain is practically zero.
Downloads:
www.multiupload.com/CHFDDBV6BP Kernel for 2.3.3 Custom ROMs
www.multiupload.com/0RPO16QCN0 Kernel for 2.3.4 Custom ROMs
www.multiupload.com/823MR3UZVD Kernel for 2.3.4 Stock ROM (unlock and root required)
www.multiupload.com/WYBGK5N3H9 Cron Backlight Dimmer for all ROMs (root and busybox with crond* required)
www.multiupload.com/EXC6465ZRC Cron Backlight Dimmer for all ROMs including busybox 1.18.4 (root required)
* How to check if your busybox supports crond:
Either in terminal app or adb shell write 'busybox --list | grep crond'. If you get 'crond' as a response your version of busybox supports crond.
Changes to the source code:
www.pastie.org/2122063
**** ALSO OUTDATED !!!! SEE BELOW ****
Version 2.0
Based on the latest BLN version 9, I made some modifications to implement a backlight dimmer which does not need an external program (like cron) to trigger an off-switch.
To activate the dimmer, just echo the dim interval in ms (this is milliseconds; 1000ms = 1s) into /sys/class/misc/backlightnotification/in_kernel_dimmer. If you pass a value of 0, the dimmer will be deactivated.
Here are the modifications to the source code: http://www.pastie.org/2378721
**** UPDATE ****
Version 3.0
Another day, another backlight dimmer version.
The previous implementations had the drawback that the time when the touchkey backlights were switched off was entirely independent of the time the touchkeys were pressed (and thus reactivated) for the last time. Consequently, the time until the backlights were deactivated was essentially random and could vary from practically zero up to the defined interval value.
Some people commented on that and I agree that it would simply look much more elegant if the dimmer would behave more consistently. So I sifted through the source code and found a way to detect the a press of the touchkeys which both works for the i9020 and i9023. This made it possible to link the dimming of the touchkey backlights to a touchkey press and have the backlights switched off with a consistent delay.
Also, this time instead of being lazy and simply hacking the dimmer functionality into BLN, this implementation does not depend on BLN anymore and can be included in the kernel independently of BLN (with CONFIG_BLD=y). This should improve the maintainability in case BLN or this tweak gets updated.
In /sys/class/misc/backlightdimmer, pass 1 or 0 to 'enabled' to enable or disable the dimmer. Pass the delay in ms (this is milliseconds; 1000ms = 1s) to 'delay'. The default state is disabled and a delay of 5000 = 5s.
Changes to the source code:
http://www.pastie.org/2388552
http://www.pastie.org/2388562
http://www.pastie.org/2388614
BUGFIX
I got reports about the delay not properly working. Found a bug that might have caused this problem.
Bug fix: http://www.pastie.org/2392734
BUGFIX #2
Turns out the implementation of the Backlight Dimmer was potentially unstable. I have made some changes to avoid possible problems.
Bug fix: http://www.pastie.org/2403815
BUGFIX #3
BLD was not working properly for the i9023 since the backlights were not re-enabled on touch which has been fixed in this patch.
Bug fix: http://www.pastie.org/2419575
BUGFIX #4
Patch to avoid race conditions.
Bug fix: http://www.pastie.org/2441553
No further patches will be published here. I have set up a git repo for all my tweaks. Each mod has its own branch to keep the tweaks cleanly separated and one can simply pull the latest patches from the corresponding branch.
https://github.com/Ezekeel/GLaDOS-nexus-s/tree/bld
Get Jonathon Grigg's 'Spark Mod Manager' GUI for controlling BLD: http://forum.xda-developers.com/showthread.php?p=17291034
Thanks to Netarchy for his help.
I do not accept donations and since I reached my 50GB limit of free space on SpiderOak, thanks to all of you kind people who got an account using my referral link, I could not ask for more.
Instead if you really want to donate your hard earned money to someone who deserves and needs it, consider donating to the Free Software Foundation at fsf.org: These guys are at the frontline when it comes to keeping Linux free and fighting these greedy bastards who think they are entitled to collect royalties and other fees from Linux users due to some silly patents - and if Linux falls, Android will be next.
nice work man
now if only we could make em brighter too >.>
also here for everyone
www.multiupload.com/CHFDDBV6BP Kernel for 2.3.3 Custom ROMs
www.multiupload.com/0RPO16QCN0 Kernel for 2.3.4 Custom ROMs
www.multiupload.com/823MR3UZVD Kernel for 2.3.4 Stock ROM (unlock and root required)
www.multiupload.com/WYBGK5N3H9 Cron Backlight Dimmer for all ROMs (root and busybox 1.17 or higher required)
source changes
www.pastie.org/2122063
op if you want these removed just say the word, just figured id help others out with your work til you earn your wings round here
Haha exactly, mine are very dim as well.
any chance of a ns4g edition?
I use Adjbrightness to turn off the button lights on my Aria. Works wonders.
shabbypenguin said:
any chance of a ns4g edition?
Click to expand...
Click to collapse
The 2.3.4 kernels should work for ns4g. If you run into problems I will look into it again.
I also send Netarchy the changes to the kernel I made and asked him if he could integrate it into his kernel, so I do not have to compile my own version each update. If you feel that this tweak is useful, sending him a PM and telling him that you like this tweak might help (but please do not get on his nerves; he has more important stuff to do).
ah alright, cool thanks
Thanks!
And yes, these restrictions are retarded
Optic2 said:
I use Adjbrightness to turn off the button lights on my Aria. Works wonders.
Click to expand...
Click to collapse
Sadly that doesn't work since the Nexus S button lights are being *****es...
does this affect bln?
theallian said:
does this affect bln?
Click to expand...
Click to collapse
No. I am using both BLN and this tweak simultaneously.
Ezekeel , thank you for this tweak and taking the time to share it with us. This is one thing that has annoyed me about this phone!
I'm nto sure if you know but Netarchy's latest version is now 1.3.7!
Will you be keeping this thread updated?
bringonblink said:
I'm nto sure if you know but Netarchy's latest version is now 1.3.7!
Will you be keeping this thread updated?
Click to expand...
Click to collapse
I asked Netarchy if he could include the changes in his kernel but have not received an answer yet.
I am using the latest stable CM, so everytime a new stable CM version using a new kernel will be released I will compile a modified version of corresponding Netarchy kernel (with bfs) including these backlight tweaks for my personal use. So, I can upload these and put the links in here.
However, I am not planning on providing modified kernels for all versions of the Netarchy kernel and for all possible variations (cfs - bfs, custom - stock) anymore. I have published the changes I made to the source code and every kernel dev can easily intregrate these into his custom kernel. So if you want this feature available in your favourite kernel, contact the corresponding kernel dev and ask him nicely to integrate these backlight tweaks.
I too would like this option. I love how sleek the Nexus looks as a black slate. Is making just the changed files into a flashable zip possible? That way anyone on any kernel can use this?
Ezekeel said:
I asked Netarchy if he could include the changes in his kernel but have not received an answer yet.
I am using the latest stable CM, so everytime a new stable CM version using a new kernel will be released I will compile a modified version of corresponding Netarchy kernel (with bfs) including these backlight tweaks for my personal use. So, I can upload these and put the links in here.
However, I am not planning on providing modified kernels for all versions of the Netarchy kernel and for all possible variations (cfs - bfs, custom - stock) anymore. I have published the changes I made to the source code and every kernel dev can easily intregrate these into his custom kernel. So if you want this feature available in your favourite kernel, contact the corresponding kernel dev and ask him nicely to integrate these backlight tweaks.
Click to expand...
Click to collapse
Thanks for the reply, will do
Sent from my Nexus S
anaglich said:
I too would like this option. I love how sleek the Nexus looks as a black slate. Is making just the changed files into a flashable zip possible? That way anyone on any kernel can use this?
Click to expand...
Click to collapse
I do not see any way one can achieve the same without a custom kernel.
Alright, I wish I knew how to compile a kernel. I would love to see this option implemented in Netarchy's or Mathkids kernel. I have attempted to contact both in regards to this.
anaglich, I will definitely look into it. Sorry for the late response!
ezekeel: since i only looked at the cron .zip last night after nightshift, i didn't see crond and there is none on my phone. Do you have an arm version to slap on there?
Unless it's part of busybox 1.17, then i'm a victim of old ass cm7 busybox it;s 1.16 and does not have crond either.
Alright, there is also such a thing as "too new", exactly 1.17.1 and there is a crond.
now let's see about installing this. patch is long in.
EDIT: Thanks, seems to work just fine. Can't say it ever bothered me, but i don't watch movies on it either.
EDIT2: Thanks again, users like it. Really appreciate you offering this.
You are welcome. I am glad some of you kernel devs have already integrated this tweak into your kernels.
It was fun figuring out how to compile a kernel and how to package it properly, but once I knew it, it was quite repetitive and got old fast. So for me personally, I am glad that now I have a broader choice of kernels available without modifying it myself. Yeah I am lazy.
Now if I can get Netarchy to include it too, I would be settled for future updates.

Pure stock with double tap to wake

Hello all.
I just thought that a pure stock kernel with no other addons except double tap to wake is very much required for our Z phone. That way we would have a complete stock experience(Very much similar to the Z tablet) with minimal inconsistencies in the usage of the phone. I think the present stock kernels are having too many features. Is it possible for the devs in the forum to compile a pure stock kernel with just double tap to wake. Thanx in advance.
So you think there are TOO many features? Why not wait for the 4.4 update, that should have it. Or instead of begging for developers to do things for you, do it yourself.

[q&a] [rom][m7][sep2014] aicp - 6.0 - kk 4.4.4

Q&A for [ROM][M7][SEP2014] AICP - 6.0 - KK 4.4.4
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer. Thanks for understanding and for helping to keep XDA neat and tidy! :smile:
I've had this flashed for some time on my M7_UL because it functions so beautifully.
I love it so much that I've forgiven it for making my phone crash 50% of the time when trying to answer a phone call, and at other random times about once a day. Not sure if the newest 7.0 release has fixed that or not.
One feature I'd suggest is enable some sort of default CPU O/C controls and maybe smartassv2.
EDIT: Didn't mean for this to end up in Q&A
Deleted
Even though the rom now supports wake gestures, the Wake Gestures xposed module doesn't seems to recognize it. It says the kernel doesn't support it or it's not enabled.
dushan90 said:
Even though the rom now supports wake gestures, the Wake Gestures xposed module doesn't seems to recognize it. It says the kernel doesn't support it or it's not enabled.
Click to expand...
Click to collapse
You need to flash a kernel that supports wake gestures. Elemental x for example.
Wake gestures are not support in th Stock M7 kernel.
Elemental x is for sense based roms. Not for aosp. And if this rom doesn't support wake gestures, whats this?
dushan90 said:
Elemental x is for sense based roms. Not for aosp. And if this rom doesn't support wake gestures, whats this?
Click to expand...
Click to collapse
The problem still remains the same. I used Elemental x as an example (mainly because I don't know which kernels support wake gestures for aosp roms.)
But the fact remain weather a Rom support wake gestures or not is irrelevant if the kernel running it doesn't support wake gestures they won't work. These gestures are an after market feature for the m7. Only the m8 supports Wake gestures officially.
Sent from my HTC One M7 - ARHD 81.0 Using Tapatalk
If you found my posts helpful, Please click thanks :good:
Currently I'm using dt2w with the AICP's default kernel... So doesn't it means the kernel supports wake gestures?
dushan90 said:
Currently I'm using dt2w with the AICP's default kernel... So doesn't it means the kernel supports wake gestures?
Click to expand...
Click to collapse
Looking at the main thread it would appear that wake gestures are a "work in progress" for the kernel with that Rom. :good:
Sent from my HTC One M7 - ARHD 81.0 Using Tapatalk
If you found my posts helpful, Please click thanks :good:
Hi, is it possible to restore the old s2w and s2s behavior? I would love to update to 7.0 but since the new kernel, I can't wake my device when in deepsleep, or it needs 5 or 6 attempts. Can anyone advice me which kernel I need to flash?
What firmware are you guys using with this ROM for the m7_ul? I've got the ATT version and I want to make try to get rid of some freezing issues I've been having.
Andriod L having problem with Gallery Settings
Hey thanks for the ROM. Just flashed it and everything working great except gallery setting for now. I didn't checked all the apps. Just seen few.
Can it be used with multirom?
battery percentage
How do i disable battery percentage?
TreyBello said:
How do i disable battery percentage?
Click to expand...
Click to collapse
Settings > AIPC Extras > Various **** > Battery Status Percentage
Now, can somebody give me the apk of the Google Keyboard. It's not available from Play Store in our country. (Don't know what's the latest version and that's why I didn't googled it)
Tethering Issue
This only affects certain carriers. The below fix worked for me.
Do this from ADB shell:
settings put global tether_dun_required 0
and reboot. Tethering will work once again.
Download link isn't working
Hi guys,
Just flashed latest nightly of lollipop.
Is the kernel included in the zip best for stability and battery time? Or is there an alternative to be recommended?
A few things I noticed :
Performance settings in ROM control leads to an empty screen that allows searching for all control panel items, is that intentional? I expected kernel tweaker?
Can the x pixel battery bar line be added?
Under settings, and screen, I have an advanced settings headline, but nothing below it? http://i.imgur.com/KYJWJP7.png
What is the status of lollipop in terms of mods that are ported? A lot from 4.4.4 is not ported yet, and xposed can't help due to art runtime. I am aware that lollipop is VERY different from kitkat, and I am not nagging about 'when will x and y be here', just a status from HQ about the transition from KK to LP
Does anyone know about customizing the soft keys and enabling logo key? And does the standard kernel support it?
Any way to customize toggles on kitkat?
I got the wrong apn settings from my carrier, but I guess that's their problem (or mine for running an unsupported Android version they probably do not detect correctly)..
Any way to remove carrier text and camera /call shortcuts from lock screen? So far I have found a guy who will mod system ui apk......
All in all lollipop is awesome, and running superb!! :good:
Thanks to all devs for their time and effort :good::good:
Kind Regards
TwinAdk
TwinAdk said:
Hi guys,
Just flashed latest nightly of lollipop.
Is the kernel included in the zip best for stability and battery time? Or is there an alternative to be recommended?
A few things I noticed :
Performance settings in ROM control leads to an empty screen that allows searching for all control panel items, is that intentional? I expected kernel tweaker?
Can the x pixel battery bar line be added?
Under settings, and screen, I have an advanced settings headline, but nothing below it? http://i.imgur.com/KYJWJP7.png
What is the status of lollipop in terms of mods that are ported? A lot from 4.4.4 is not ported yet, and xposed can't help due to art runtime. I am aware that lollipop is VERY different from kitkat, and I am not nagging about 'when will x and y be here', just a status from HQ about the transition from KK to LP
Does anyone know about customizing the soft keys and enabling logo key? And does the standard kernel support it?
Any way to customize toggles on kitkat?
I got the wrong apn settings from my carrier, but I guess that's their problem (or mine for running an unsupported Android version they probably do not detect correctly)..
Any way to remove carrier text and camera /call shortcuts from lock screen? So far I have found a guy who will mod system ui apk......
All in all lollipop is awesome, and running superb!! :good:
Thanks to all devs for their time and effort :good::good:
Kind Regards
TwinAdk
Click to expand...
Click to collapse
X Pixel battery?
No way to remove those shortcuts still.
No toggles customizations just yet
LorD ClockaN said:
X Pixel battery?
No way to remove those shortcuts still.
No toggles customizations just yet
Click to expand...
Click to collapse
Battery line at the top of the display. On AICP KK edition it can be 1 to 4 px thick.
Toggles and shortcuts, fair enough
Kernel advice / options?
I miss the Xposed framework, and the rom options for customization, but I will be patient, lollipop is very different from kitkat, and the work being put into this by devs is truly amazing!
I have had a few instant reboots, that's all the problems with this rom so far, and that's really very acceptable
Kind Regards
TwinAdk

No ROMs with moto apps right

Hello, I'd like if somebody could just confirm that. Also, are they trying to achieve it or it is just impossible?
I think some of the roms have some of the moto actions. You will have to read them to find out which ones.
Red_81 said:
I think some of the roms have some of the moto actions. You will have to read them to find out which ones.
Click to expand...
Click to collapse
No Moto apps are present in any of the ROMs
But in CM 12 based ROMS You have gestures which have been ported
1. if u wave over your phone the display will pulse kinda like active dsiplay
2. You can silence the call also by waving over the Screen
3. You can Open camera by twisting like stock rom
4. You can open flashlight by chop gesture
And in Render Kernel for CM 12 you can double tap to wake the mobile
So either u can use stock + gravity box or move over to CM12 which has theme engine and other useful features
Personally i came back to Stock from cm12 because of Performance and battery
blademaster1990 said:
No Moto apps are present in any of the ROMs
But in CM 12 based ROMS You have gestures which have been ported
1. if u wave over your phone the display will pulse kinda like active dsiplay
2. You can silence the call also by waving over the Screen
3. You can Open camera by twisting like stock rom
4. You can open flashlight by chop gesture
And in Render Kernel for CM 12 you can double tap to wake the mobile
So either u can use stock + gravity box or move over to CM12 which has theme engine and other useful features
Personally i came back to Stock from cm12 because of Performance and battery
Click to expand...
Click to collapse
Wow, are you serious? That's pretty bad ass.
Thanks for the info

ElementalX question.

So this one is simple, does anyone else notice that the dt2w and other screen off gestures only work SOMETIMES? Is it something different on my device or is this kernel just a bit buggy sometimes? Thanks in advance guys!
H4X0R46 said:
So this one is simple, does anyone else notice that the dt2w and other screen off gestures only work SOMETIMES? Is it something different on my device or is this kernel just a bit buggy sometimes? Thanks in advance guys!
Click to expand...
Click to collapse
Dt2w always working. But .... it seems that the tapping is time sensitive. Tapping 'slow' does not work.
H4X0R46 said:
So this one is simple, does anyone else notice that the dt2w and other screen off gestures only work SOMETIMES? Is it something different on my device or is this kernel just a bit buggy sometimes? Thanks in advance guys!
Click to expand...
Click to collapse
If your ROM has it built in, which many do, then it is really buggy and simply setting dt2w in elementalx - it will still use ROM implementation. If you want to use Kernel DT2w, you must also set one of the sweep options too.
I'm on stock Android with ElementalX, I wonder why it only works sometimes. I have that enabled as well as sweep 2 sleep on. The double tap isn't always 100% responsive.
Sent from my Nexus 6
H4X0R46 said:
I'm on stock Android with ElementalX, I wonder why it only works sometimes. I have that enabled as well as sweep 2 sleep on. The double tap isn't always 100% responsive.
Sent from my Nexus 6
Click to expand...
Click to collapse
How are you activating dt2w?
If it is with an app may be activating google dt2w and not flar2's gestures. From what I understand, when dt2w is unreliable is if you are using the incomplete google code found in stock android. But flar2 wake gestures are much more reliable. I found double tap and sweep up to be 100% reliable as far as I noticed. I'm using the donate elementalx app to adjust the settings and elementalx kernel with cataclysm rom.
H4X0R46 said:
I'm on stock Android with ElementalX, I wonder why it only works sometimes. I have that enabled as well as sweep 2 sleep on. The double tap isn't always 100% responsive.
Sent from my Nexus 6
Click to expand...
Click to collapse
I meant one of the sweep to wake gestures.
if you're not finding elementalX gestures reliable, its a timing issue as someone else suggested.
Please try to quote people you are replying to. Some of us navigate this forum mainly by using notifications
arcane spade said:
How are you activating dt2w?
If it is with an app may be activating google dt2w and not flar2's gestures. From what I understand, when dt2w is unreliable is if you are using the incomplete google code found in stock android. But flar2 wake gestures are much more reliable. I found double tap and sweep up to be 100% reliable as far as I noticed. I'm using the donate elementalx app to adjust the settings and elementalx kernel with cataclysm rom.
Click to expand...
Click to collapse
It's through the ex kernel manager app. Maybe if I reinstall the kernel and add dt2w in the aroma installer. Thanks dude!
Sent from my Nexus 6
H4X0R46 said:
It's through the ex kernel manager app. Maybe if I reinstall the kernel and add dt2w in the aroma installer. Thanks dude!
Sent from my Nexus 6
Click to expand...
Click to collapse
Wont make a difference doing that.
danarama said:
Wont make a difference doing that.
Click to expand...
Click to collapse
Just did that and you're right, hmm...... Maybe it is just timing. You said to also add a sweep to wake option? I'll try that.
Sent from my Nexus 6
H4X0R46 said:
Just did that and you're right, hmm...... Maybe it is just timing. You said to also add a sweep to wake option? I'll try that.
Sent from my Nexus 6
Click to expand...
Click to collapse
yeah both options just write the same thing to a text file, so it makes no difference.
The sweep to wake option only improves dt2w if you're using the "stock implementation" that wasn't actually implemented. Only if you've downloaded a stock rooted "custom" rom would you have this.
That said, i found dt2w very dodgy in my pockets when I had no screenlock on so I only use sweep now.
danarama said:
yeah both options just write the same thing to a text file, so it makes no difference.
The sweep to wake option only improves dt2w if you're using the "stock implementation" that wasn't actually implemented. Only if you've downloaded a stock rooted "custom" rom would you have this.
That said, i found dt2w very dodgy in my pockets when I had no screenlock on so I only use sweep now.
Click to expand...
Click to collapse
Alright! Thanks again guys! Always helpful answers on here!
Sent from my Nexus 6
danarama said:
yeah both options just write the same thing to a text file, so it makes no difference.
The sweep to wake option only improves dt2w if you're using the "stock implementation" that wasn't actually implemented. Only if you've downloaded a stock rooted "custom" rom would you have this.
That said, i found dt2w very dodgy in my pockets when I had no screenlock on so I only use sweep now.
Click to expand...
Click to collapse
Also! I just enabled sweep 2 wake and it's MUCH more responsive! I wonder why that is really.
Sent from my Nexus 6
just FYI, you can enable/disable any combination of the various wake and sleep gestures using Tasker or terminal, instructions are in post #2 here:
http://forum.xda-developers.com/showthread.php?p=57079648
PhilDX said:
just FYI, you can enable/disable any combination of the various wake and sleep gestures using Tasker or terminal, instructions are in post #2 here:
http://forum.xda-developers.com/showthread.php?p=57079648
Click to expand...
Click to collapse
That's good to know! Thanks!
Sent from my Nexus 6

Categories

Resources