Skip to content

Commit

Permalink
For Redmi Note 10 5G, brightness range is 1-4095, even though /sys/..…
Browse files Browse the repository at this point in the history
…./brightness range is 1-2047 (/=2 done in lights HAL). So we need to manually set the range
  • Loading branch information
phhusson committed May 10, 2022
1 parent 2f9ccbe commit 71f0000
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rw-system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1081,3 +1081,7 @@ mount /system/phh/empty /vendor/bin/install-recovery.sh
if getprop ro.vendor.radio.default_network |grep -qE '[0-9]';then
setprop ro.telephony.default_network $(getprop ro.vendor.radio.default_network)
fi

if getprop ro.vendor.build.fingerprint |grep -iq redmi/camellia;then
setprop persist.sys.qcom-brightness 4095
fi

3 comments on commit 71f0000

@LGeekMX
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is two versions of this device (camellia and camellian), for this to work properly in all versions maybe you need to add this fingerprint:

Redmi/camellian_global/camellian:11/RP1A.200720.011/V12.5.5.0.RKSMIXM:user/release-keys

@phhusson
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ echo Redmi/camellian_global/camellian:11/RP1A.200720.011/V12.5.5.0.RKSMIXM:user/release-keys |grep -iq redmi/camellia && echo success || echo failure
success

@AljunCortez
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add this line to fix Brightness

while true; do cat /sys/class/leds/lcd-backlight/brightness_clone > /sys/class/leds/lcd-backlight/brightness; done

setprop persist.sys.qcom-brightness 4095

Redmi/camellian_global/camellian:12/SP1A.210812.016/V13.0.2.0.SKSMIXM:user/release-keys

Please sign in to comment.