Skip to content

Navigating the Android Sysfs

Venture into the depths of Linux sysfs with our expertly crafted guide, tailored for those intrigued by the intricacies of Linux's virtual filesystem. Sysfs serves as a bridge to the kernel, exposing a plethora of information about the system's devices, drivers, and overall state. This guide demystifies sysfs, presenting a curated selection of commands and paths that allow direct interaction with the kernel's components. Discover how to monitor hardware sensors, adjust device functionalities, and obtain real-time system data. Whether you're a seasoned system administrator or a curious Linux user, this guide provides valuable insights into sysfs, empowering you to optimize and troubleshoot your Linux environment effectively.


Sysfs Commands

Dump everything that will trigger the LED, section 1

cat /sys/class/leds/leds-sec1/trigger

Dump temperature for sensors that support this feature

grep . /sys/class/sensors/*/temperature

Dump ID name for all sensors

grep . /sys/class/sensors/*/name

Dump settings for FOTA limits

cat /sys/power/fota_limit

Dump current state values

cat /sys/power/state

Dump version of firmware, DHD, NV, and CLM

cat /sys/wifi/wifiver

Dump wifi MAC address

echo $(cat /sys/wifi/mac_addr)

Dump roaming status for wifi (read-only from sysfs)

cat /sys/wifi/roamoff

Set display brightness to darkest

echo 1 > /sys/class/backlight/panel/brightness

Set display brightness max (default)

echo 255 > /sys/class/backlight/panel/brightness

Dump current setting for USB mode

cat /sys/devices/soc0/hw_platform

Dump all kernel drivers supported for device

ls /sys/bus/usb/drivers/

Print current panel alias

cat /sys/devices/platform/panel_0/modalias