[HTC U11  ROMs, Kernels, Recoveries, & Other Develo] tbalden:
Set up, changing default settings

For newbies, let's start with basics.

1. This is a custom kernel, no additional applications included, and as such, does not change the UI, or add any additional menus for tweaking.

1.1 rootless, no tweak app, keeping Ota update possible guide here: https://xdaforums.com/showpost.php?p=74341460&postcount=1237

2. If you want to change the possible options of the kernel (see below the Sysfs endpoints for the broad list of possibilities), you can simply use the /sdcard/uci_user.cfg file to set 99% of the CleanSlate kernel options. Just copy/rename the preinstalled sample file uci_user.cfg_sample to uci_user.cfg, Edit in a text editor, save it, and it's set!

2.a: Use CleanSlate Kernel Configuration app (see post 1) - all CS features covered, using UCI interface, without rooting!!

2.b: Optionally if you have root, you can use also a Kernel tweak app. For this I suggest to use either one of the following: LeeDroid Tweaks by [MENTION=398245]LeeDroid[/MENTION], EXKM by [MENTION=4684315]flar2[/MENTION]

3. two small exceptions is

---- how you can set up Squeeze Control, without a kernel tweak app. Read the following post about this: Squeeze control setup

---- how you can switch between Full light mode and Low light modes. Read here: Low light mode switch

4. Clarification about Squeeze Control vs. Edge Sense/Edge Sense plus. If you plan to use Squeeze Control of the kernel, you need to know that you will need to leave free the Short squeeze gesture to be taken over by Squeeze control. If you plan NOT to use Squeeze Control, either do NOT set it up in system Settings, or disable it in the chosen kernel tweak application.

5. If the given kernel setting detailed below in Sysfs settings, you can still add them to EXKM with custom settings added in Advanced settings of EXKM and specifying the sysfs paths.

Exkm sysfs settings, for easy import. Credit to [MENTION=271041]p50kombi[/MENTION]

https://www.dropbox.com/s/bzxdw6v364nbmlh/cleanslate_3_7_1.exkm?dl=0

https://www.dropbox.com/s/k978pb2oqf8sb6r/Cleanslate_2_6_4.exkm?dl=0

Changelogs

Release 3.7.0 - 17 dec 2017

- K.AdAway feature - adblocking easy, no-root, no-system mod, no magisk needed

Release 3.6.0/1/2 - 14 dec 2017

- Oreo update

- Color Control with CS Config App

Release 2.6.8 - 13 dec 2017

Release 2.6.6 - 11 dec 2017

- WireGuard alpha support

- minor fixes

- bundling zip with Configuration/Companion apps

Release configuration app 1.0.0 - 3 Dec 2017

Release 2.6.5 - 25 nov 2017

Notification whitelist fix with companion app

Release 2.6.4 - 24 Nov 2017

- notification revamp with companion app

- Kad interrupt with two finger gesture

Release 2.6.3 - 20 Nov 2017

- Screen off when phone put Face Down (default ON, optional)

Release 2.6.2 - 19 Nov 2017

- option to Flashlight notify only face down (default on)

--- /sys/class/leds/indicator/flash_only_face_down 1/0 (1 default)

- option to do Notif Vibration booster only in pocket -- do in proximity and NOT face down

--- /sys/fpf/boost_only_in_pocket 1/0 (1 default)

- adding logic to delay in-pocket blocked KAD and schedule KAD screen to the event of leaving proximity state. Will start KAD like if just triggered at that moment.

Keep your phone in your pocket, incoming notification won't start Ambient Display in the pocket/face-down/poach, but only when you pull it out.

--- /sys/fpf/kad_start_after_proximity_left 1/0 (1 default)

Release 2.6.1 - 18 Nov 2017

- critical UCI fixes

Release 2.6.0 - 15 Nov 2017

- CS companion app

- UCI configuration without rooting from internal memory (/sdcard/uci_user.cfg)

- many new features, configs, extras

Release 2.5.0 - 5 Nov 2017

- Smart Notif Control

Release 2.4.9 - 1 Nov 2017

- set bln_light_level to 20 (most dimmed setting) to fully turn off keys backlight (BLN will still work if you leave them on!). Thanks [MENTION=4258077]jwong.hhf[/MENTION] for bringing up the idea.

- fix issues with screen RGB calibration becoming too bright in some rare cases with Kernel Amibent Display

- fix issue with touches getting stuck in very rare cases when using Squeeze-To-Swipe and at the same time touching screen

- shorten KAD screen touch input readiness time, touch events will be working quicker after a three finger touch/squeeze event

Release 2.4.4 - 28 Oct 2017

- added vibration based alarm-clock screen-on detection to make sure alarm can work with KAD on.

- usb disconnect now should stop KAD correctly

- fixing Call problems with KAD (still Call needs to be with vibration to work with KAD!)

--- now if KAD is not active at the moment of call, the call should be okay even without.....

------ ....call vibration. Only issue remaining, active KAD screen will conflict with.....

------- .....calls without vibration.

- fix KAD on charger only mode + BLN on, and off the charger it was not blinking

Release 2.4.3 - 26 Oct 2017

- making grayscale to color restore instant (by emulation of small touchscreen events)

- adding KAD cancelling phone call detection based on vibration pattern (1000msec) - still no detection for calls without vibration.

---- without vibration for calls a call screen can conflict with KAD screen / input blocking

- fixing touch input issues with squeeze swipe / KAD touch wake, (should not stuck with active touch points)

Release 2.4.2 - 23 Oct 2017

KAD - three finger gesture / sysfs --> touch screen with 3 fingers, much safer for in-pocket situations than Fingerprint tap.

(FP input is now default blocked for this reason, and this 3 finger gesture is default on.)

------- /sys/fpf/kad_three_finger_gesture 1/0 (default 1) - interrupts KAD and wakes device

- add KAD setting: disable fingerprint input interruption / sysfs

------- /sys/fpf/kad_disable_fp_input (default 1) - blocking fingerprint tap input from waking fully on KAD screen. A fingerprint unlock still gets through

- faster color restore, almost instant (KAD kcal grayscale mask /squeeze peek kcal mask)

- fix touch input mess-up bug

Notifications Switch Control (new name for Low light switch :) ) :

- add very long volUp/Dn gesture to access LowLight/Vib with KAD mode

Release 2.4.1 - 23 Oct 2017

BLN/Notification LED fixes

KAD fixes

Release 2.4.0 - 21 Oct 2017

- Kernel Ambient Display

- notif booster voltage maxed up

- High light/vib switch binding with KAD

Release 2.3.1- 15 Oct 2017

Flashlight notification update:

- Battery optimizations, more deepsleep

- More consistent blinking (with additional alarmtimer based smp idle cpu wake for workqueue)

- Default delay between flashlight blinks is increased to 3 seconds, and the auto increasing of delay time is quicker, for less battery drain

- somewhat shortened blinking for battery saving

Release 2.3.0- 7 Oct 2017

- double VolUp+Down press for Full Light/Vib mode with

- Vibrating Notification Reminder feature

- WLAN non-vital wakelocks blocking

- Wakelock stats enabled with kernel debug fs

Release 2.2.1 - 29 Sep 2017

- fix too long buzz on long VolUp+Down press for Lowlight/vib mode

Release 2.2.0- 29 Sep 2017

- finalized Low light/low vib switch

- blueborne kernel patch

Release 2.1.1- 28 Sep 2017

- Low light switch

- Notification booster update/fixes

Release 2.1.0 - 27 Sep 2017

- Notification Booster feature for Vibration

- Squeeze Control - Squeeze2Swipe update! - revisiting the scrolling smoothness and additional goodies

- Adreno Boost v2.2 - merged from htc m10 cleanslate line

- Flashlight notification - in-kernel feature Updates, new parameters (haptic mode/dim mode/dim period)

Release 2.0.0 - 21 Sep 2017

- Update to htcdev sources base 1.28

Release 1.8.1 - 17 Sep 2017

- Flashlight notifications: more parameters, smaller concurrency fix

Release 1.8.0 - 15 Sep 2017

- New feature: flashlight notifiaction

Release 1.7.3 - 10 sep 2017

- Fingerprint Vib_strength -> is now tuning the Fingerprint unlock haptic feedback strength. Set it to 1 or 0 to have no vibration feedback

Release 1.7.2 - 7 sep 2017

- Bln Rgb led sync issue fix

Release 1.7.1 - 6 Sep 2017

- BLN/Notifiaction LED pulsating: more fluid transitions for blinking

Release 1.7.0 - 3 Sep 2017

- Squeeze2Swipe feature addition

Release 1.6.0 - 27 Aug 2017

- Squeeze2Peek/Keep feature addition

- fixing BLN bug accidental RGB led turning off rarely

- fixing squeeze_wake/sleep sysfs

Release 1.5.6 - 24 aug 2017

Stutter fix for 1.27 base

Release 1.5.5 - 21 aug 2017

Enhance squeeze2sleep/wake reliability

Release 1.5.4 - 19 aug 2017

Bugfix: squeeze to wake/sleep reliability fix,

Release 1.5.2 - 11 aug 2017

Bugfix: fixing squeeze power threshold setting bug, now it should work for all cases, if you set on Edge Sense settings to 1, Squeeze2Sleep/Wake should work now (Thanks [MENTION=2344619]guidogsbn[/MENTION] for reporting and providing so many log files, it helped a great deal!)

Release 1.5.1 - 10 aug 2017

- squeeze to sleep/ wake bound to activate when minimum squeeze power is set in stock Settings of EdgeSense

- fix some minor false positive with squeez functionality

Release 1.5.0 - 8 aug 2017

- squeeze to sleep/ wake

- fixes

Release 1.4.0

- Bln dim blink mode

- fixes

Release 1.3.0 - July 20

- BLN doubleblink notifications

- BLN parameters: number of blinks, speed, intensity

Release 1.2.0 - July 15

- Chromatic charging LED feature (ported my m10 code to u11 led driver)

Release 1.1.0 - June 21

- Button Light Notification

- Button Light Notification on charger triggered by notification vibration pattern

Release 1.0.0 - June 17

- Initial release

- Pulsating green notification LED

Sysfs paths for settings

BLN

sysfs: /sys/class/leds/indicator/

----	bln - 1/0 - BLN on/off

----	bln_no_charger - 1/0 - BLN on when not on charger

or only on charger based on vib pattern

----	bln_rgb_pulse - 1/0 - pulsating Green led

---- bln_rgb_batt_colored - 1/0 - Chromatic charging LED on/off

---- bln_pulse_rgb_pattern - 0-4 (normal/1plus5/triple/triple down/triple up)

---- bln_dim_blink - 0/1 - pulse Buttons after normal BLN number blinking was done

------- bln_dim_number - 0 infinite / 1-50 - number of dim blinks if bln_dim_blink = 1

---- bln_rgb_light_level - 0-20 (the lower value the brighter) notification led light dimmer

---- bln_light_level - 0-20 (the lower value the brighter) key buttons light dimmer

Flashlight notification:

-- bln_flash_blink - 0/1

-- bln_flash_blink_number - 0 (infinite) 1-50

-- bln_flash_blink_wait_sec - 1-10 delay in seconds between blinks

---- bln_flash_wait_inc - 1/0 increase/not increase delay with time

------ bln_flash_wait_inc_max - maximum plus in seconds of the delay, increased with time 1-8

----- bln_flash_haptic_mode 1/0 - 1 = flash only when DND is off (vibration notifications will trigger the blinking) ( default value: 1 )

----- bln_flash_dim_mode 2/1/0 - 2 = in dim mode do NOT flash at all, 1 = in dim mode flash half the brightness of the full flashing, 0 = no dimming ( default value: 1 )

----- bln_flash_dim_use_period 1/0 - 1 = switch to dim flash mode in a given period, 0 = no restriction for dimming, if you set it, it will be flashing dim regardless of current time ( default value: 1 )

--------- bln_flash_dim_period_start_hour 0-23 - start hour for dimmed flashing (default 22 (10PM))

--------- bln_flash_dim_period_end_hour 0-23 - end hour for dimmed flashing (default 6 (6AM))

notification booster:

--- /sys/fpf/notification_booster : 0 off, 1-100 value by which voltage will be multiplied (default 2) (maximum voltage ~3300mV)

vib. notification reminder:

/sys/class/leds/indicator/bln_vib_notification 1/0 (default 0 OFF)

/sys/class/leds/indicator/bln_vib_notification_slowness 5-30 (default 15, periodicity bound with flashlight notif)

/sys/class/leds/indicator/bln_vib_notification_length 1-500 (how many milliseconds to vibrate on each reminder, default 250)

Squeeze to wake sleep, to disable

/sys/fpf/squeeze_wake 0 and

/sys/fpf/squeeze_sleep 0

/sys/fpf/squeeze_peek : peek on/off 1/0

/sys/fpf/squeeze_peek_halfseconds : peek time 2-6 (default 4 -> 2 seconds peek time)

/sys/fpf/squeezee_max_power_level : 0-9 the maximum level of squeeze power that you can set in Edge Sense settings,

---------------------- where in-kernel Squeeze functionality will be enable. Set this level or below to enable it.

/sys/fpf/squeeze_swipe 1/0 (on - off)

/sys/fpf/squeeze_swipe_vibration 1/0 (on - off)

Fpf

Fingerprint doubletap sleep / configurable Home button functionality

-- /sys/fpf/fpf -- Value 1 -> work simple HOME input button (configurable), Value 2 (default) - work as doubletap sleep without 3rd party apps, Value 0 - off, stock behavior

-- /sys/fpf/vib_strength -- set it to 0 to have no vibration, set about 20 for normal

-- /sys/fpf/fpf_dt_wait_period -- Values: min 0 max 9 , (default value without tweak app setting is 2 -> 90msec, 0 = 72msec... 9 = 146msec wait before press is interpreted as single press)

KAD:

/sys/fpf/kad_on 1/0 (1) kad on or off at all? (This is overridden if you use High light/vibration mode (by double pressing volUp/Dn while screen is off))

/sys/fpf/kad_only_on_charger 1/0 (0) Should KAD happen only if phone is on charger?

/sys/fpf/kad_disable_touch_input 1/0 (1) Should touch input be disabled when AmbientDisplay is going on? Still tapping/pressing fingerprint or a short squeeze or pressing volume will keep screen on.

/sys/fpf/kad_repeat_period_sec 4-20 (8) time between firt repetition, and if multiplication set, this will be added newly to lengthen delay upon each repetition.

/sys/fpf/kad_repeat_times 1-10 (4) How many times to repeat the display

/sys/fpf/kad_halfseconds 5-20 (10) How long the display should show

/sys/fpf/kad_repeat_multiply_period 1/0 (1) Should the repeat period lengthened upon each repetition?

/sys/fpf/kad_kcal 1/0 (1) Should the grayscale high contrast coloring be applied when AmbientDisplay comes on?

/sys/fpf/squeeze_peek_kcal 1/0 (0) Should grayscale coloring be applied when squeeze peek (short squeeze gesture) happens?

/sys/fpf/kad_three_finger_gesture 1/0 (default 1) - interrupts KAD and wakes device with a three-finger touch gesture

/sys/fpf/kad_disable_fp_input (default 1) - blocking fingerprint tap input from waking fully on KAD screen. A fingerprint unlock still gets through

Smart Notif Control:

-- 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

/sys/fpf/smart_silent_mode_stop=1 --. Use DND silent mode to switch to smart stop mode

/sys/fpf/smart_silent_mode_hibernate=0 - use DND silent mode to switch to smart hibernate mode

/sys/fpf/unlock_vib_strength configuration to enable setting of Unlock FP vibration strength (0-90)

/sys/fpf/kad_kcal_cont /sys/fpf/kad_kcal_val -- UCI: kad_kcal_cont and kad_kcal_val - set kcal filter greyscale values Contrast/Magic value

/sys/fpf/block_power_key_in_pocket (0 default / 1) off/on

/sys/fpf/phone_ring_in_silent_mode (0 default /1) off/on

/sys/class/leds/indicator/flash_only_face_down 1/0 (1 default)

--- /sys/fpf/boost_only_in_pocket 1/0 (1 default)

--- /sys/fpf/kad_start_after_proximity_left 1/0 (1 default)

/sys/fpf/face_down_screen_off (default 1 on, 0 = off)