可以进行拷贝文件:
androidWear/device/intel/spectralite/device.mk
# Unified build
include device/google/clockwork/build/clockwork_unified_top_config.mk
PRODUCT_COPY_FILES += \
device/intel/robby/ueventd.robby.rc:root/ueventd.spectralite.rc \
device/intel/robby/init.robby.sensorv2.rc:root/init.robby.sensor.rc \
device/intel/robby/gps/bcm/init.gps.rc:root/init.gps.rc
ifneq (,$(filter $(TARGET_BUILD_VARIANT),eng userdebug))
PRODUCT_COPY_FILES += \
device/intel/robby/MOS_sensors_A_calibrate.sh:system/etc/MOS_sensors_A_calibrate.sh \
device/intel/robby/MOS_sensors_G_calibrate.sh:system/etc/MOS_sensors_G_calibrate.sh
endif
PRODUCT_COPY_FILES += \
device/intel/spectralite/init.spectralite.rc:root/init.spectralite.rc \
device/intel/spectralite/init.spectralite.usb.rc:root/init.spectralite.usb.rc \
device/intel/spectralite/init.recovery.spectralite.rc:root/init.recovery.spectralite.rc \
device/intel/spectralite/init.spectralite.iiodevice.rc:root/init.spectralite.iiodevice.rc \
device/intel/spectralite/init.spectralite.unified.rc:root/init.spectralite.unified.rc
# Boot Animation
PRODUCT_COPY_FILES += \
device/intel/spectralite/bootanimation.zip:system/media/bootanimation.zip
# touchscreen
PRODUCT_COPY_FILES += \
device/intel/spectralite/touch/startup_fw_update_product_000a.img:system/vendor/firmware/startup_fw_update_product_000a.img
# Sensor HAL
PRODUCT_PACKAGES += \
sensors.spectralite \
sensor_proximity.robby \
libsensors_iio_v3.robby \
sensor_als.robby
......
androidWear/device/intel/spectralite/init.spectralite.rc
#
# Copyright 2017 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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 init
# Add fstab product symlink
symlink fstab fstab.spectralite
# OEM
mkdir /oem 0550 root root
on fs
# Keeping following partitions outside fstab file. As user may not have
# these partition flashed on the device. Failure to mount any partition in fstab file
# results in failure to launch late-start class.
wait /dev/block/by-name/oem
mount ext4 /dev/block/by-name/oem /oem ro nosuid nodev context=u:object_r:oemfs:s0
on post-fs
# Kernel 4.4 has tracefs, so mount and label it properly
mount tracefs none /sys/kernel/debug/tracing mode=755
restorecon_recursive /sys/kernel/debug/tracing
#Nfc
mkdir /data/nfc 0770 nfc nfc
# Set MMC autosuspend_delay to 10 ms
write /sys/devices/pci0000:00/0000:00:01.0/power/autosuspend_delay_ms 10
# Set I2C 2 (haptics and fuel gauge) autosuspend_delay to 10 ms
write /sys/devices/pci0000:00/0000:00:08.1/power/autosuspend_delay_ms 10
# Set I2C 5 (charger) autosuspend_delay to 10 ms
write /sys/devices/pci0000:00/0000:00:09.0/power/autosuspend_delay_ms 10
# Set I2C 7 (touch controller) autosuspend_delay to 10 ms
write /sys/devices/pci0000:00/0000:00:09.2/power/autosuspend_delay_ms 10
service stflashtool /system/vendor/bin/STFlashTool -c /etc/st21nfc_conf.txt
class main
user system
group system nfc
oneshot
disabled
# skinmond
service skinmond /sbin/skinmond
class core
seclabel u:r:skinmond:s0
group system
on boot
# disable network time update
setprop config.disable_networktime true
# check if fw update is needed for the st21d nfc controller then load the RF & HW configuration.
start stflashtool
on post-fs-data
# enable pwm for vibrator
write /sys/class/pwm/pwmchip0/export 1
chown system system /sys/class/pwm/pwmchip0/pwm1/enable
chown system system /sys/class/pwm/pwmchip0/pwm1/period
chown system system /sys/class/pwm/pwmchip0/pwm1/duty_cycle
chown system system /sys/spid/hardware_id
on property:sys.boot_completed=1
# set the max frequency back to 1GHz in case the device has booted
# with 'battlow' cmdline option
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000
import init.robby.rc
import init.spectralite.usb.rc
import init.spectralite.unified.rc
执行了以下操作后:
write /sys/devices/pci0000:00/0000:00:01.0/power/autosuspend_delay_ms 10
cat此文件验证,确实是10
mkdir /data/nfc 0770 nfc nfc