diff --git a/device/rockchip/common/device.mk b/device/rockchip/common/device.mk
index b6cf119260..d48d1609d0 100755
--- a/device/rockchip/common/device.mk
+++ b/device/rockchip/common/device.mk
@@ -218,7 +218,8 @@ PRODUCT_COPY_FILES += \
device/rockchip/common/ff680030_pwm.kl:system/usr/keylayout/ff680030_pwm.kl \
device/rockchip/common/alarm_filter.xml:system/etc/alarm_filter.xml \
device/rockchip/common/ff420030_pwm.kl:system/usr/keylayout/ff420030_pwm.kl \
- device/rockchip/common/bootanimation.zip:system/media/bootanimation.zip
+ device/rockchip/common/bootanimation.zip:system/media/bootanimation.zip \
+ device/rockchip/rk3399/mcu_set.sh:/system/bin/mcu_set.sh
PRODUCT_COPY_FILES += \
hardware/rockchip/libgraphicpolicy/graphic_profiles.conf:$(TARGET_COPY_OUT_VENDOR)/etc/graphic/graphic_profiles.conf
@@ -244,7 +245,8 @@ PRODUCT_PACKAGES += \
wpa_supplicant \
wpa_cli \
wpa_supplicant.conf \
- dhcpcd.conf
+ dhcpcd.conf \
+ init.rk3399.rc
ifeq ($(ROCKCHIP_USE_LAZY_HAL),true)
PRODUCT_PACKAGES += \
diff --git a/device/rockchip/rk3399/init.rk3399.rc b/device/rockchip/rk3399/init.rk3399.rc
index c7cdd060b7..529e7ab044 100755
--- a/device/rockchip/rk3399/init.rk3399.rc
+++ b/device/rockchip/rk3399/init.rk3399.rc
@@ -7,6 +7,12 @@ on property:sys.boot_completed=1
chmod 0664 /sys/class/devfreq/ff9a0000.gpu/max_freq
chown root system /sys/class/devfreq/dmc/governor
chmod 0664 /sys/class/devfreq/dmc/governor
+ service mcu_set /system/bin/mcu_set.sh
+ user root
+ group root
+ disabled
+ oneshot
+ seclabel u:r:su:s0
on early-boot
# Update dm-verity state and set partition.*.verified properties
diff --git a/device/rockchip/rk3399/mcu_set.sh b/device/rockchip/rk3399/mcu_set.sh
new file mode 100755
index 0000000000..b645bc5f29
--- /dev/null
+++ b/device/rockchip/rk3399/mcu_set.sh
@@ -0,0 +1,5 @@
+#! /system/bin/sh
+echo "--------------------mcu set start-----------------------"
+echo 1 > /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0015/EthWol
+echo 1 > /sys/devices/platform/jw_io_init/led_display
+echo "--------------------mcu set end-----------------------"
diff --git a/packages/apps/Settings/src/com/android/settings/McuStateReceiver.java b/packages/apps/Settings/src/com/android/settings/McuStateReceiver.java
index ddf38b4ddc..7b48baa09e 100755
--- a/packages/apps/Settings/src/com/android/settings/McuStateReceiver.java
+++ b/packages/apps/Settings/src/com/android/settings/McuStateReceiver.java
@@ -28,7 +28,7 @@ import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import com.android.settings.McuSetting;
-
+import android.os.SystemProperties;^M
public class McuStateReceiver extends BroadcastReceiver {
private static final String TAG = "McuStateReceiver";
@@ -100,7 +100,9 @@ public class McuStateReceiver extends BroadcastReceiver {
setFileState(flag_ethwol, mEnable, ETH_WOL_ENABLE_FILE);
}else{
setFileState(flag_ethwol, mDisable, ETH_WOL_ENABLE_FILE);
- }
+ }^M
+ ^M
+ SystemProperties.set("ctl.start", "mcu_set"); ^M
}
}
05-19