11

我在网上找到了一些资料:

echo 1 /sys/devices/platform/flashlight.0/leds/flashlight/brightness

但是在我的 Nexus 7(闪过 AOSP)上,我找不到那个目录。

关于我应该写入哪个文件的任何想法?这是可行的吗?

之后ls /sys/devices/platform,我得到:

LID
alarm
arm-pmu.0
bcm4330_rfkill
bcmdhd_wlan.1
bluesleep
fiq_debugger.0
fsl-tegra-udc
gpio-keys.0
grouper_misc
leds-gpio
oprofile-perf.0
power
power.0
pwm-backlight
ram_console
reg-dummy
reg-fixed-voltage.1
reg-fixed-voltage.10
reg-fixed-voltage.11
reg-fixed-voltage.2
reg-fixed-voltage.3
reg-fixed-voltage.4
reg-fixed-voltage.6
reg-fixed-voltage.8
regulatory.0
sdhci-tegra.2
sdhci-tegra.3
serial8250
snd-soc-dummy
spdif-dit.0
spdif-dit.1
spi_tegra.0
spi_tegra.3
tegra-ehci.1
tegra-i2c.0
tegra-i2c.1
tegra-i2c.2
tegra-i2c.3
tegra-i2c.4
tegra-nvmap
tegra-otg
tegra-pcm-audio
tegra-se
tegra-snd-rt5640.0
tegra30-ahub
tegra30-dam.0
tegra30-dam.1
tegra30-dam.2
tegra30-hda
tegra30-i2s.1
tegra30-i2s.3
tegra30-i2s.4
tegra30-spdif
tegra_camera
tegra_pwm.0
tegra_rtc
tegra_smmu
tegra_uart.1
tegra_uart.2
tegra_uart.3
tegra_uart.4
tegra_wdt
uevent
4

5 回答 5

36

Android Jellybean 4.2 附带了一个新的二进制文件,可用于直接读取/写入系统设置提供程序,可通过命令行访问。

例如:为了增加屏幕​​的亮度,使用下面的命令:

adb shell设置把系统screen_brightness 200

阅读更多关于SCREEN_BRIGHTNESS注意值的范围是 [0 - 255]

于 2015-01-30T18:27:47.097 回答
2

值的范围不一定是 0 - 255。例如,在我的 OnePlus 上,它的范围是 0-2047。如果您想知道自己的,只需将亮度滑块设置为最大,然后键入:adb shell settings get system screen_brightness.

于 2021-02-03T17:47:42.843 回答
1

您应该使用pwm-backlight

于 2013-06-10T18:58:27.653 回答
0

这对我来说不适用于最新的 Nexus 7 (2013)。但是这个答案解释了在任何版本上查找您正在寻找的内容的方法:https ://stackoverflow.com/a/13492336

但是我们需要注意,要更改任何内容,您需要具有root访问权限。

于 2013-10-13T12:45:58.200 回答
0

您可以使用此 adb 命令设置屏幕亮度

adb shell settings put system screen_brightness 255

如果您的设备具有自动亮度设置,请先使用此命令

adb shell settings put system screen_brightness_mode 0
于 2021-12-20T10:13:47.820 回答