android - 如何在 Nexus 7 上通过 ADB 设置亮度

标签 android adb android-source brightness nexus-7

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

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

最佳答案

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

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

adb shell settings put system screen_brightness 200

Read more about SCREEN_BRIGHTNESS请注意,值的范围是 [0 - 255]

关于android - 如何在 Nexus 7 上通过 ADB 设置亮度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17026171/

相关文章:

java - Android EditTextPreference 样式

android - 单声道安卓 : how to call a number with "#" at the end of it by the application?

android - 如何使用 adb 命令在 android 设备中启用鼠标指针

java - Eclipse 找不到 Oracle VM 模拟器

android - 更新 Android 中的系统应用程序

android - 没有指令 stranih、lsreg、stream 的引用

android - Android系统服务如何提供RPC接口(interface)?

android - 更改 Android 模拟器麦克风的默认设置

android - 在 Google map V2 中绘制多边形网格

android - 我正在尝试使用 adb monkey 命令通过 adb 启动设置,但它一直打印出 "Killed"。我怎样才能找出造成这种情况的原因?