yashsingh1/xdaforums huggingface dataset:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Talk to [MENTION=398245]LeeDroid[/MENTION] add a quick tile/ hover to switch squeeze swipe/ sleep it on/off and disable off /on edge sense short squeeze option automatically... That way easy switch between them possible...

But

Unfortunately not really possible in kernel only. Also a fancy launcher? Who cares lol, it's like paranoid halo but triggered with squeeze :)

Well sarcasm away, no idea, especially because it's not possible to filter squeeze events in kernel.

If it would be, then I could add short squeeze kernel only, middle long user space
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
It's indeed a Google driven thing since a few years. :)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] sttw1fa:
ooh... sounds interesting. can't wait to try it out.

Other than the u11 not having BT 5.0, the u11 is a great device imho. Between CS kernel and LeeDroid and the u11, 2018 may be a year I skip a phone update (did I say that?).
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Good to hear that you like the idea as well.

Let me know if you have any special setting to auto tune based on last registered user activity time... Apart from those I listed in my post
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
BTW, isn't setting the edge sense launcher trigger for the long squeeze enough as a compromise. Haven't tried it yet to know what else in the launcher is controlled by squeeze
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] sttw1fa:
Hmm......in my case, it would work best just seeing if DND was set, or maybe the time the screen had been 'off' after going to sleep. Otherwise, it's a bunch of coding to specific apps I'd think.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
DND status is not possible to access in kernel as of now. Knowing how much time passed since powering down the screen is possible. Based on that I plan to work this on. Like setting a limit by user, after how many minutes to stop doing flashlight notification or KAD, how many minutes after to yet just make them happening less often once triggered.

I'm looking for other such kernel features of notifications to tune, how strong and how often to do them based on this time setup
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] sttw1fa:
Oops. Yeah, forgot you had mentioned the DND polling not possible via the kernel before. Don't you have a beta yet? ;) I've only flashed LD and CS once today.... already missing my 2x/day flash fix! :highfive: All in fun...
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tetrabyt:
I think KAD is changing back from gray scale to quickly before the screen goes off..
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Rhadamanthis:
vibration still impossible to disable with ex kernel manager or edit files with root explorer
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
- Update 2.4.10 stable -​

Updates:

- KAD: add doubletap to quickly dismiss an ongoing KAD status and power screen off.

----> Intercept double press on screen while KAD displays, interrupt it, and powerdown. Stop flashlight/BLN etc.

- if kad KCAL grayscale is set (on by default) and squeeze peek is happening, but interrupted to keep screen on (short squeeze etc) quicken up restoration of screen colors by an emulated poke of touchscreen

- kad: fix KCAL messing with screen rgb/ brightness when using sRGB profile

Download (v2):

https://www.androidfilehost.com/?fid=889964283620763298

Next feature will be the Smart automatic settings based on last user activity...
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
which vibration, sorry? home button?

isn't this working? /sys/fpf/vib_strength -- set it to 0 to have no vibration, set about 20 for normal
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
you mean for a split second you can see the color coming back? hmm yes, i'll see what I can do about that
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
fixed! release post updated with 2.4.10 v2
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Rhadamanthis:
yes home button, impossible to disable in ex kernel manager and with your path.... when i edit file (20 to 0) and save, if i re-open file or reboot, 20 still.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Could you try terminal?

su

echo "0">/sys/fpf/vib_strength
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tetrabyt:
Holy s***.. The scrolling works nice with the edge sense launcher.. Thanks [MENTION=506238]OMJ[/MENTION]..
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
I don't get this exactly. Where can this be checked? Sounds epicly great btw
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tetrabyt:
Using the U11+ edge sense launcher works beautifully with this kernel.. [MENTION=506238]OMJ[/MENTION] posted the U11+ launcher and sense home in his ROM thread.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tetrabyt:
Loving it...
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
cool, I'll try it as well, when I get there. I just wonder how the squeeze scrolling can work together with the edge sense launcher... so if you do a short squeeze, won't it switch on the launcher and scroll at the same time?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tetrabyt:
I have mine set to the squeeze and hold. So the short squeeze is disabled as before. It's working great.. The squeeze scrolling is what I was referring to...
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
ok, now I get it. Cool! :good::good::highfive:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
...making progress with Smart Notification Settings...

trimming and stopping of a few notification types will be automated based on time passed since last user activity on the phone...

first: half as long KAD time, double delay between KAD repetitions, and halve the number of repetitions after an inactive period. And after an even longer inactivity, just stop it automatically.

as soon as you switch on phone etc, it will reset the time counting (but i'm thinking about making it smarter...a one time screen on might be not enough to start activity... i'm still considering some ideas here)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] LibertyMonger:
Great work everyone! Can't wait till I get my U11 back. Was supposed to be today, promised by many HTC reps. Very disappointing. I have the new sense launcher working great on my HTC 10 but I suppose the icon wheel pie looking thingy is not possible without edge sense squeeze function? Can't wait hopefully get it back early next week.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Yep, it's part of the edge sense framework.

You'll get that u11 back in no time, I foresee, a few days and you can forget about the fuss... Yeah disappointing, like it was to wait day over day at launch time for the shipment... But it happened :good:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
progress...

- led / bln smart timed dimming done

- flashlight/vib notif reminder smart timed dimming/stopping done

left:

notif booster,

sysfs :D
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
- Update 2.5.0 stable -​

Smart Notification Control - in-kernel awesomeness

This is to provide an automated Notification "density": based on user inactivity time notifications will start to be trimmed/dimmed/stopped. :)

-- Three intervals: Trim / Stop / Hibernate ... you can switch them off with setting sysfs to 0. Otherwise default on each:

-- Default trim: 6 minutes

sysfs /sys/fpf/smart_trim_inactive_minutes 0 = off, 1... minutes

-- Default stop: 1 hour

sysfs /sys/fpf/smart_stop_inactive_minutes 0 = off, 1... minutes

-- Default hibernate: 4 hours

sysfs /sys/fpf/smart_hibernate_inactive_minutes 0 = off, 1... minutes

What will happen in different periods?

Trim:

smart_trim_kad = NOTIF_TRIM;
// Double the time between KAD screen ons,
// halve the time of KAD screen displaying,
//halve the number of KAD repetitions per notification
smart_trim_flashlight = NOTIF_TRIM;
// double the number of blinks between Bright flashlight blinks,
// double the time between each blink
smart_trim_vib_reminder = NOTIF_DEFAULT; // no change
smart_trim_notif_booster = NOTIF_DEFAULT; // no change
smart_trim_bln_light = NOTIF_DEFAULT; // no change
smart_trim_pulse_light = NOTIF_DEFAULT; // no change

Stop period:

// notif settings for stop period
smart_stop_kad = NOTIF_STOP; // stop KAD
smart_stop_flashlight = NOTIF_DIM;
// double the time between each blink, no bright flashes
smart_stop_vib_reminder = NOTIF_TRIM;
// double the time between vib reminders
smart_stop_notif_booster = NOTIF_DEFAULT;
smart_stop_bln_light = NOTIF_TRIM; // Only do the BLN when on charger
smart_stop_pulse_light = NOTIF_DEFAULT;

Hibernate:

// notif settings for hibernate period
smart_hibernate_kad = NOTIF_STOP; // stop KAD
smart_hibernate_flashlight = NOTIF_STOP; // stop Flashlight notif
smart_hibernate_vib_reminder = NOTIF_STOP; // stop vib reminder
smart_hibernate_notif_booster = NOTIF_STOP; // stop vib notif booster
smart_hibernate_bln_light = NOTIF_DIM; // Only do the BLN when on charger,
// Dim the light of it
smart_hibernate_pulse_light = NOTIF_DIM; // dim the notification LED

- Fixes: user input event registration to avoid registering Fingerprint

irq/wake part and only register fp vibration as user input if either

single fp vibration (unlock) or double vib with not-KAD-running or

KAD running but FP input not filtered by setting.

Download (v2):

https://www.androidfilehost.com/?fid=745849072291686451
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
sorry, insta bumped to a 2.5.0v2, the default button backlight was set to 20, always off... uploaded with normal defalt (6)... edited OP and previous post!
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] beartiger:
Would be great to have an exkm file that includes all the settings. Anyone got one for import to save typing?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Hmm [MENTION=271041]p50kombi[/MENTION] ? :angel::D
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] p50kombi:
Coming up later today...
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Thanks, I'll link it in the first post then, it's quite handy. :)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] p50kombi:
Fill your boots...

https://www.dropbox.com/s/eq6zngawot9gveb/Cleanslate2_5.exkm?dl=0
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
:good: added to setup guide :highfive:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
been digging deeper to find if there's any hack to get proximity sensor (for pocket detection) through nanohub device, but i'm afraid it's futile...

I'm looking at the Poll device published by kernel driver, but it's not even really used by userspace, as far as my added debug logging shows it... meh. :|

seems the nanohub firmware took over this thing some other way...
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Next idea is to provide an unrooted dynamic non ramdisk configuration interface, like putting a file into SD card.

I'm all for non rooting, so while letting a file on SD card do this carries some vulnerability but it's going to affect only safe settings.

So UCI it will be, to escape usage of rooting and still have configuration possibility if you vouch for that.

I'll check if I can set specific sysfs paths to more permissive or will add some file based interface
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tetrabyt:
I like
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Then next is to try some android magic service application for sensor access without root as a service kind of thingy. So maybe it could be possible to push proximity status with stock rom, no root.. Through UCI.

But that's a whole different story. I'm not much pro in Android Java stuff;)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] androidfreak11:
how do i disable home button feedback vibration?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
script :

su
echo "0" > /sys/fpf/vib_strength
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Some progress. The basics of the UCI module is ready, but I need to dig deeper to let the kernel read a file from sdcard in this very specific case.

The nice thing about android security is, that even the kernel is very much obligated by the security/acl rules of the filesystem (obviously).

I need to see if this is resolvable, then there's clear path for unrooted configuration.

Unfortunately simply loosening the permissions on sysfs endpoints is not really enough, as filesystem permissions/probably selinux as well, on higher levels are still blocking. But I'm on track :)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] android_patrizian:
Hope that this will not cause security holes. ;) The speed of innovations is incredible. :) Thank you.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
I'm on to make sure that it will be fool proof.

I'm aware that it's anti pattern to do this in kernel, but I'll be cautious to protect from memory overflow issues, and to do this on a long enough periodic base and with testing for concurrency/ locking issues... Will see. :) rooting is actually the biggest security hole , so it can't be worse than that, unrooted configuration should be safer, but you're right about being cautious
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
:victory:

First successful unrooted configuration interface from kernel, SD card stored configuration without rooting... Attachment :)

KAD + Bln + flashlight as testing, already works
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] aadeshiscool:
I installed this over kirasuka (EAS) kernel and now the wifi isn't working. Is there a way to fix this without dirty flashing the rom? And also the governer of this kernel is set to performance by default should I change it or something?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
eek, don't know why it's set to performance. It's interactive default as in stock kernel, no change there.

Apart from flashing back a backup of system partition, or reflash rom without Wipe (dirty flash) + flash kernel, I don't know another way.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Unprivileged configuration interface

Demo, editing cfg file without rooting, button lights fully off and on... Yep, that easy :)

Opening a text editor on a stock unrooted phone, with cleanslate kernel,

Edit the value you want to change, and save. That's all, settings applied.

Also works across reboots.

[YOUTUBE]J8QwytOHuyw[/YOUTUBE]
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] LeeDroid:
That's awesome!... Will it override tweaks though? :-O
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
If you place there the configuration file then yes, the sysfs value will be overridden. If no, then it will just work as before.

So it's fully optional. But if you use configuration, you'll need to remember that sysfs won't work :good:

Also this will serve as an entry point to pass android framework events like proximity sensor. I'll create a simple Apk that will pass the values, an Apk that will work without root again :)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] radeon_x:
Will this disable just the home button vibration, or will it also disable the vibration when unlocking the phone via fingerprint as well?

(i.e. are the vibrations for home and fingerprint scanner linked like they are on the newer versions of the HTC 10 kernel?)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Yes, they're linked
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Progressing with the secondary purpose of the unprivileged configuration interface.

Created a first version of cleanslate kernel companion app.

Needs more work to keep it running all the time, but I'm very new to actual Android application and service development.

Nevertheless, KAD screen ons are now blocked in pocket :D :good: with UCI and the companion app.

No rooting needed.

[YOUTUBE]vSdQSyy0Usk[/YOUTUBE]

More CS Companion app goals:

- add DND state interception and passing to kernel to use with different CleanSlate kernel notification types

- add LockScreen state detection and possibly detect Home screen, and passing to kernel, especially related to Swipe Scroll disabling if on lockscreen and also to enable KAD only when lockscreen active
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] radeon_x:
Is there any particular reason for having them linked? That's the only real complaint I have with CleanSlate - I'd like haptic feedback for the fingerprint unlock, but not the normal home button presses (as per stock).
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Reason, only to keep it simple. But I'll check upon this. Makes sense.

One thing till that, if you don't need kernel double tap sleep, you can set fpf'/fpf to 0 , then normal stuck home button behavior will depend on system haptic setting
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] guidogsbn:
Will this new app also allow to configure the kernel settings as described in post 2? Don't forget to offer a version we can pay for to give a little back to you for your excellent work ! We take and take, why not give back!?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Well, it's not impossible, tho' I'm not much experienced with Android app development. But it's fun... for now I plan it to be a very lightweight app, so that it can stay in memory easily, without being dumped upon memory needs of other apps. :)

But now that I've installed all necessary stuff to start experimenting with it, I can see that happening..

Also I'd need to create some kind of business account with google...

And the other half of the story is, I don't really want to cover all kernels, all options like the fantastic EXKM does. I just want to support the cleanslate kernel... Anyway as it looks fun to experiment with it, I might do come up with something, another app probably, not this Kernel Companion lightweight service approach...

And BTW, I've received great support here, from such excellent fellas like yourself! Eventho' HTC forums and phones seems to have lost a big chunk of their earlier popularity. :crying::crying: But I'm here to stay, hoping for a better future for HTC
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
progressing nicely with the CleanSlate Companion app:

detected and passed to the kernel ...things so far:

- DND / Silent mode - will think about this one, what to bind with it...

- Locked/Unlocked (but unfortunately only if screen is ON, with timeout Locked detection is not happening, only after a screen on... )

- Proximity sensor

- Incoming call (to block/stop KAD running)

Also I found out how to make the application more persistent with it's own sticky background service! :)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
at last, I'm ready with all cleanslate sysfs (except kcal color controls) :D

Using a texteditor on the sdcard, it's going to be that simple to modify it.

I plan to provide some few default config profiles for download...

Now some more testing, and to take care of using DND mode detection... and Lockscreen state based KAD blocking

... [MENTION=2632943]Whiskey103[/MENTION] it's almost as you imagined just took a hack load of work and some smart tweaking in the kernel filesys driver ;)

Also added fp_unlock_vib_strength for the request recently mentioned, to have Home button vibration separated from Unlocking

# Kernel Ambient Display
kad_on=0
kad_only_on_charger=0
kad_disable_touch_input=1
kad_disable_fp_input=1
kad_kcal=1
kad_halfseconds=11
kad_repeat_times=4
kad_repeat_times=1
kad_repeat_period_sec=12
kad_three_finger_gesture=1

# Fingerprint
fingerprint_mode=2
fp_vib_strength=20
fp_unlock_vib_strength=20
fp_doubletap_wait_period=2

# Squeeze Control
squeeze_wake=1
squeeze_sleep=1
squeeze_peek=1
squeeze_peek_halfseconds=4
squeeze_peek_kcal=0
squeeze_swipe=1
squeeze_swipe_vibration=1

# Flashlight notif
flash_blink=1
flash_blink_bright=1
flash_blink_bright_number=5
flash_blink_number=46
flash_blink_wait_sec=4
flash_blink_wait_inc=1
flash_blink_wait_inc_max=8
flash_haptic_mode=1
flash_dim_mode=1
flash_dim_use_period=1
flash_dim_start_hour=22
flash_dim_end_hour=6
# Vib notif reminder
vib_notification_reminder=1
vib_notification_slowness=12
vib_notification_length=250

# Buttonlight
bln=1
bln_light_level=20
bln_no_charger_switch=1
bln_number=6
bln_speed=1
bln_dim_blink=1
bln_dim_number=0
bln_rgb_batt_colored=1
bln_rgb_light_level=0
bln_rgb_pulse=1
bln_rgb_pulse_pattern=0

#Notif booster
notification_booster=1

# Adreno Boost
adrenoboost=1
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Whiskey103:
Nice work mate, sounds promising [emoji106]
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Yes, it is :D I love text file based configuration instead of a UI... i'm too much of a UNIX/POSIX config fan :good: :victory:

Next release gonna be a breakthrough on all fronts ... lol :D
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Whiskey103:
Oh, I didn't have a problem with the text base configuration. Just that is was in multiple files.

That's why I made myself a init.d for it [emoji1]
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
this is a text based config, just not a script. But a real file configuring all. On your sdcard. No rooting... (I call it Unprivileged Configuration Interface, next new thing to melt brains :P :D -- I'm adding a companion app too without root privilege that will pass down events like Proximity/Lockscreen state/Phone call/Silent mode through this config interface, and use it in kernel...)
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Whiskey103:
Yea, I guessed you used that path to tell the kernel what state the device is in.

It's the only way I get it.
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Yeah, without rooting or severe security changes, this is a good way.

Also it's not a common solution, rather the opposite. But I was working to make it not vulnerable.

It's also very easy to use, and applying is simply saving the file, kernel going to be notified and all applied.

You can also copy the file to your PC, edit and copy back, and it's all done.

And there's a second file which is updated by a service like companion app. And yes, using an Android app and a stored file is the only way to pass certain info without rooted apps.

These information are not present on kernel level at all. So this is the way to go

:good::good:
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] Whiskey103:
Yea, I imagine the only downside of it is having an extra "constant running background service" thing right?

Probably with a persistent notification to keep it alive or something?
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
On Android nougat and such it's like nothing. It's all broadcast event based and doesn't even need much cputime, next to nothing, till phone event triggers it. ;)

And with some techniques it's working without persistent notification...

[MENTION=398245]LeeDroid[/MENTION] gave me further tips how to start it up auto on boot.

Gonna be all bells and whistles
[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
It seems this worked out mighty well.

Testing still.

Added DND mode detection to switch to smart stop and smart hibernate notification modes as possibility.

The companion application makes a lot possible:

- Silent mode sets smart stop/ hibernate notifications

- Lockscreen detection to let you set lockscreen timeout in security, and KAD will display only when the timeout passed and it's really going to display the notifications at that

- proximity detects in pocket and blocks KAD displaying

:good:

I see a beta coming soon