How to set the minimum brightness of android via ADB? - General Questions and Answers

I flashed a custom MIUI 8 rom on my android smartphone. But accidentally when I reduced the brightness it went pitch black. I set it to 50 via adb. Is there any way I can set the default minimum brightness value to any other integer than zero so that I don't have to wait to get to my laptop to be able to use my mobile again?

Related

[Kernel Module] Backlight: Lower Brightness (Useful at Night)

(dev only for now, you need to know how to install/load a kernel module by hand/write a init.d script for it)
Hi,
I was annoyed by the too bright backlight especially at night. Even the lowest (non-zero) setting was too bright for me (see my thread in general section).
Thanks to irfanbagus BCM-TWEAK which I could easily adapt here's kernel module to lower the lowest brightness. This means that only the former lowest mode is changed to an even lower brightness, the other modes remain the same.
I've attached a kernel module for this incl. source (based on irfanbagus' source, say thanks to him ).
After loading this module you can simply use the system backlight setter to dim the backlight. In case it was already set to lowest brightness, simply increase the brightness and then decrease it again to apply the updated mode.
This doesn't work with GO Launcher's setting widget's backlight setter and probably also not with other 3rd party backlight setters.
If you test it, please report.
More details about backlight/brightness (see aat1401_bl.c in kernel source if you're interested):
- brightness level is a value in [0,255] (most apps map this to [0,100]%)
- in fact there're just about 25 different brightness levels which a stored in a table, each entry has a 'level' and a 'tune_level' value
- the tune_level (>0) determines the brightness: low level low brightness, high level high brightness
- there's a "lowest" level (30) but only the system setter respects this. This level's tune_level is changed by my kernel module to 1 instead of 2
- system's brightness setter allows no level below 30 thus my mod works good with it
- other setters allow levels below 30 and here is the problem:
The responsible module for setting the backlight brightness looks at the level value in [0,255]. If it's below 30 then a default tune_level of 2 is used.
The GO Launcher widget probably simply sets the level to 0.
I don't know a way to change this default tune_level in a already compiled/running kernel.
So if you want to use another setter, make sure to choose level 30 or about 12% because then my updated tune_level will be used. Usually 12% should map to level 30. If not, I can't help you. Use system setter instead.
Btw to switch backlight off (warning, not recommended) you can use the direct way: echo 0 > /sys/class/backlight/aat1401-backlight/brightness
Found a widget which allows custom brightness values and works fine with my mod: Brightness Widget - Backlight!
Tested with this settings: 30,1,150,255
i am using switch pro widget..range from
0% ----> 100%
ronnieryan said:
i am using switch pro widget..range from
0% ----> 100%
Click to expand...
Click to collapse
0% = no backlight?
Anyway, with my mod you'd have the lowest brightness at 12%.
mikstev said:
0% = no backlight?
Anyway, with my mod you'd have the lowest brightness at 12%.
Click to expand...
Click to collapse
yes, 0% no backlight, but its so inconvenient ..10% is better
Interesting, I'll have a look.
Edit: As far as I see this widget doesn't require root. Even if it could disable backlight (I'm not sure if this is possible) its lowest non-zero brightness is higher than with my mod.
how can i use this sir?
nakawanaoki said:
how can i use this sir?
Click to expand...
Click to collapse
1. Copy the .ko file to /system/lib/modules
2. Set the file permissions to 644
3. Install the module via insmod bl_brightness-tweak.ko (you can also use a init.d script for this, you can adapt the one I uploaded in the droidwall thread)
I am not sure why,
but on trying to turn off screen with "echo 0" it is only get darker, but not completely off.
Is there any way to really turn of screen ?
Thank you,
Ranchu

[Help] Tasker & Brightness Script

Writing my first scripts for Tasker & looking for some help while I try to figure this out.
I'm trying to write 2 scripts. One is to increase brightness, and one is to decrease it.
I have tasker, and I have the Screen Filter app (which has a plug in for Tasker).
I'd like to make a shortcut (that I will be calling from yet another app) that will increase brightness from:
Screen Filter 40%, Screen 0
SF 0%, S 0
SF 0%, S 50
SF 0%, S 150
SF 0%, S 255
Then the opposite for decrease.
The idea was to set a variable called %Bright, and use a if-else-else-else-end if that checked the current level of the variable, and set the screen 1 brighter and set the variable to a new value. (ie, check current brightness then increase by 1 level).
Problem is if anything other then my shortcut changed the brightness, Tasker doesn't know about it. (Say if I use Quick Settings)
There any way to get Tasker to check the current state of the brightness (and screen filter)? There a better way to do this inside Tasker?
(btw, I am aware of other apps to control brightness. please don't mention them in this thread)
EDIT: Wrote the script out with no problems assuming variable is set. For now, using variable 1-5 (dimmest to brightest). If variable is not set, or anything else, then both my dim script & my bright script will just set it to 1 and go from there.

Super brightness

Hello to everyone,
Can someone make a super brightness like the galaxy phone when they watch a youtube video or something... I see that this mode already exist if you open the google pay market card... Thanks
I don't understand what you mean. with the Google Pay Market card. I do know you can increase max brightness with the high brightness mode app by Flar2. You have to be rooted with EX Kernel manager installed though.
Eric214 said:
I don't understand what you mean. with the Google Pay Market card. I do know you can increase max brightness with the high brightness mode app by Flar2. You have to be rooted with EX Kernel manager installed though.
Click to expand...
Click to collapse
I would something that in automatic increase the brightness like in the samsung phones. When you watch a youtube video the screen go in a brightness mode and is very good... I saw that this thing already appen in the google pay when you put some market friend card on the screen
"However, if you root your OnePlus 7 Pro, feel free to enjoy these higher display brightnesses at your own risk:
With an elevated adb shell, run
echo 5 > /sys/class/backlight/panel0-backlight/device/drm/card0/card0-DSI-1/hbm
To make it trigger automatically, you can create a Tasker profile that triggers at high ambient lighting (%LIGHT > 20000) or when the system brightness is set to maximum (system screen_brightness = 1023)."
https://www.xda-developers.com/oneplus-7-pro-display-review-finally-flagship-quality/

Screen turns off completely when brightness is less than 15%

Hello! Greetings from Russia!
After replacement screen on my MI MIX 3 i faced a problem.
When my brightness less then 15% my screen turns off completely.
MIUI 12.0.2 Global, device is rooted (Magisk) .
Can i fix brightness-slider to minimum 15-20% ?
I tryed use GravityBox module for Magisk.
When i set my minimum brightness level range to MIN-70 MAX-255 it have 0 result.
Where i can find the display-cfg file, to set minimum brightness level more then 20% ?
Just guessing here, thinking networking lol, Notice in a network, when setting subnet mask you cannot manualy set 255.255.255.255, but must drop one digit? So 255.255.255.254
Instead of max 255, try 254. Try setting lower to 64?
I know, flawed logic... but you wont know until you try

Android minimum brightness fix

Hello all
I've used Samsung and some other android devices which their brightness can go very low but some other devices can't
This brought me to install pixel experience gsi and it solved the problem but there are many limitations on a gsi so I'm back to stock rom
I rooted the device and went to root directory and changed the brightness llevel from 255 to 50
But although it does get lower, the maximum brightness is now really low
I want a fix, how do custom roms solve this problem

Categories

Resources