-# Android fstab file.
-#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
-# The filesystem that contains the filesystem checker binary (typically /system) cannot
-# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+## Dynamic partitions
+odm /odm ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount
+product /product ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount
+system /system ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount
+system_ext /system_ext ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount
+vendor /vendor ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount
-odm /odm ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount
-product /product ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount
-system /system ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount
-system_ext /system_ext ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount
-vendor /vendor ext4 ro,barrier=1,discard wait,avb,logical,first_stage_mount
-/dev/block/boot /boot emmc defaults defaults
-/dev/block/dtbo /dbto emmc defaults defaults
-/dev/block/misc /misc emmc defaults defaults
-/dev/block/data /data ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,fileencryption=aes-256-xts,quota,formattable,reservedsize=32M
+## Block devices
+/dev/block/boot /boot emmc defaults defaults
+/dev/block/dtbo /dbto emmc defaults defaults
/dev/block/cache /cache ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,formattable
-/dev/block/metadata /metadata ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,formattable,first_stage_mount
-/devices/*.sd*/mmc_host/sd* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
-/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sd* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
-/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sr* auto auto defaults voldmanaged=sr0:auto,encryptable=userdata
-/dev/block/loop auto loop defaults voldmanaged=loop:auto
-/dev/block/param /mnt/vendor/param ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,quota
-# Add for zram. zramsize can be in numeric (byte) , in percent
-/dev/block/zram0 none swap defaults wait,zramsize=268435456
-/dev/block/tee /mnt/vendor/tee ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check
-/dev/block/factory /mnt/vendor/factory ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check
+/dev/block/data /data ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,fileencryption=aes-256-xts,quota,formattable,reservedsize=32M
+/dev/block/factory /mnt/vendor/factory ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check
+/dev/block/metadata /metadata ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,formattable,first_stage_mount
+/dev/block/misc /misc emmc defaults defaults
+/dev/block/param /mnt/vendor/param ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check,quota
+/dev/block/tee /mnt/vendor/tee ext4 noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic wait,check
+
+## Virtual devices
+/dev/block/loop auto loop defaults voldmanaged=loop:auto
+/dev/block/zram0 none swap defaults wait,zramsize=268435456
+
+## Removable devices
+/devices/*.sd*/mmc_host/sd* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
+/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sd* auto auto defaults voldmanaged=usb:auto,encryptable=userdata
+/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sr* auto auto defaults voldmanaged=sr0:auto,encryptable=userdata
on early-init
loglevel 3
-on init
-
on post-fs-data
insmod /vendor/lib/modules/mali.ko
insmod /vendor/lib/modules/dovi.ko
insmod /vendor/lib/modules/amlogic_fbc_lib.ko
insmod /vendor/lib/modules/amvdec_mavs.ko
insmod /vendor/lib/modules/amvdec_av1.ko
-
# Support legacy paths
symlink /sdcard /mnt/sdcard
start console
- #30 means reserve 3% memory using for high water mark, 1GB DDR x 3% = 30MB
+ # 30 means reserve 3% memory using for high water mark, 1GB DDR x 3% = 30MB
write /proc/sys/vm/watermark_scale_factor 30
- #12288KB
+ # 12288 KB
write /proc/sys/vm/min_free_kbytes 12288
- #init the unifykeys
+ # Init the unifykeys
write /sys/class/unifykeys/attach 1
chmod 666 /dev/video_composer.0
chmod 666 /dev/video_composer.1
+
on boot
chown system graphics /sys/module/fb/parameters/osd_logo_index
chmod 0660 /sys/module/fb/parameters/osd_logo_index
chown media system /sys/devices/virtual/switch/hdmi/state
chmod 0660 /sys/devices/virtual/switch/hdmi/state
chmod 666 /dev/v4lvideo
- # thermal
+
+ # Thermal
chown system system /sys/class/thermal/thermal_zone0/mode
chown system system /sys/class/thermal/thermal_zone1/mode
chmod 664 /sys/class/thermal/thermal_zone0/mode
chmod 664 /sys/class/thermal/thermal_zone1/mode
- #power
+ # Power
chmod 664 /sys/power/early_suspend_trigger
chown root system /sys/power/early_suspend_trigger
- #vfm map
+ # vfm map
chown media system /sys/class/vfm/map
chmod 666 /sys/class/vfm/map
write /sys/class/vfm/map "rm default"
write /sys/class/vfm/map "add default decoder ppmgr deinterlace amvideo"
- #0: normal user and root user can read
- #1: only root user can read
+ # 0: normal user and root user can read
+ # 1: only root user can read
write /proc/sys/kernel/dmesg_restrict 0
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
on early-boot
mount configfs none /config
mkdir /config/usb_gadget/g1 0770
-on fs
service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
-O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \
-g@android:wpa_wlan0
-# /dev/ devices
+## /dev/ devices
#
# Amlogic AV streaming devices
/dev/amvideo 0666 media system
/dev/ionvideo 0666 media system
-/dev/video_composer.0 0660 media system
-/dev/video_composer.1 0660 media system
+/dev/video_composer.0 0660 media system
+/dev/video_composer.1 0660 media system
/dev/ppmgr 0660 media system
/dev/amstream_* 0666 media system
/dev/audiodsp0 0660 media system
/dev/video19 0660 system mediadrm
/dev/video20 0660 system mediadrm
/dev/video21 0660 system mediadrm
-/dev/video23 0660 system mediadrm
-/dev/video26 0660 system mediadrm
-/dev/video30 0660 system mediadrm
-/dev/video31 0660 system mediadrm
-/dev/video32 0660 system mediadrm
-/dev/video33 0660 system mediadrm
-/dev/video34 0660 system mediadrm
-/dev/video35 0660 system mediadrm
-/dev/video36 0660 system mediadrm
-/dev/video37 0660 system mediadrm
-/dev/video38 0660 system mediadrm
-/dev/video50 0660 system camera
+/dev/video23 0660 system mediadrm
+/dev/video26 0660 system mediadrm
+/dev/video30 0660 system mediadrm
+/dev/video31 0660 system mediadrm
+/dev/video32 0660 system mediadrm
+/dev/video33 0660 system mediadrm
+/dev/video34 0660 system mediadrm
+/dev/video35 0660 system mediadrm
+/dev/video36 0660 system mediadrm
+/dev/video37 0660 system mediadrm
+/dev/video38 0660 system mediadrm
+/dev/video50 0660 system camera
/dev/amaudio_utils 0660 media system
/dev/amaudio_ctl 0660 media system
/dev/amvenc_avc 0660 mediacodec system
/dev/HevcEnc 0660 mediacodec system
/dev/amsubtitle 0660 media system
/dev/jpegenc 0660 media system
-/dev/videosync 0666 media system
-/dev/ac_sbuf0 0660 system camera
-/dev/ac_isp4uf 0660 system camera
+/dev/videosync 0666 media system
+/dev/ac_sbuf0 0660 system camera
+/dev/ac_isp4uf 0660 system camera
-#audio data
+# Audio data
/dev/audio_data_debug 0660 mediacodec audio
/dev/amjpegdec 0666 system system
/dev/ge2d 0660 system system
/dev/vdin0 0660 system system
-/dev/vdin1 0660 system system
+/dev/vdin1 0660 system system
/dev/virtmem 0666 system system
# Mali
# uvm
/dev/uvm 0660 system graphics
-# video tunnel
+# Video tunnel
/dev/videotunnel 0666 system graphics
# sw_sync
/dev/sw_sync 0666 system graphics
-#possible serial
+# Possible serial
/dev/ttyS1 0660 bluetooth bluetooth
/dev/ttyS2 0660 bluetooth bluetooth
/dev/ttyS3 0666 system system
/dev/rtk_btusb 0660 bluetooth bluetooth
-#mtkbt
+# mtkbt
/dev/stpbt 0664 bluetooth bluetooth
/dev/rtkbt_dev 0660 bluetooth bluetooth
/dev/hidraw* 0660 system audio
/dev/block/by-name/frp 0660 system system
-# /sys/ sysfs
+## /sys/ sysfs
#
-#bluetooth
+# Bluetooth
/sys/devices/platform/bt-dev/rfkill/rfkill0 state 0666 bluetooth bluetooth
/sys/devices/platform/bt-dev/rfkill/rfkill0 type 0660 bluetooth bluetooth
/sys/devices/platform/aml_bt/rfkill/rfkill0 state 0666 bluetooth bluetooth
/sys/devices/bt-dev.*/rfkill/rfkill0 state 0660 bluetooth bluetooth
/sys/devices/bt-dev.*/rfkill/rfkill0 type 0660 bluetooth bluetooth
-#hdmi cec
+# HDMI CEC
/sys/class/amhdmitx/amhdmitx0 hpd_state 0664 system system
/sys/class/amhdmitx/amhdmitx0 disp_mode 0664 system system
/sys/class/amhdmitx/amhdmitx0 config 0664 system system
/sys/class/amhdmitx/amhdmitx0 contenttype_cap 0664 system system
/sys/class/amhdmitx/amhdmitx0 contenttype_mode 0664 system system
-#graphic
+# Graphics
/sys/class/graphics/fb* blank 0664 media system
/sys/class/graphics/fb* order 0664 media system
/sys/class/graphics/fb* scale 0664 media system
/sys/class/graphics/fb0 free_scale_axis 0664 system system
/sys/class/graphics/fb0 window_axis 0664 system system
-#cpu
+# CPU
/sys/devices/system/cpu/cpu1 online 0664 system system
/sys/devices/system/cpu/cpu0 cpufreq/scaling_governor 0664 system system
/sys/devices/system/cpu/cpu0 cpufreq/hmp_boost 0664 system system
-#led
-/sys/devices/platform/gpioleds/leds/yellow_led trigger 0666 root root
+# LED
+/sys/devices/platform/gpioleds/leds/yellow_led trigger 0666 root root
/sys/devices/platform/gpioleds/leds/sys_led brightness 0666 root root