diff --git a/device/vendor/hercules/common/sepolicy/file_contexts b/device/vendor/hercules/common/sepolicy/file_contexts
index c309446cf3..a1897c2665 100755
--- a/device/vendor/hercules/common/sepolicy/file_contexts
+++ b/device/vendor/hercules/common/sepolicy/file_contexts
@@ -70,6 +70,7 @@
/vendor/bin/gatord u:object_r:gatord_exec:s0
/vendor/bin/ALSADaemon u:object_r:alsadaemon_exec:s0
/vendor/bin/fb_init u:object_r:fbinit_exec:s0
+/vendor/bin/haha.sh u:object_r:haha_exec:s0
/vendor/bin/fwdbg u:object_r:fwdbg_exec:s0
/vendor/bin/sideband u:object_r:sideband_exec:s0
/vendor/bin/hw/android.hardware.power@1.0-service.rtk u:object_r:hal_power_default_exec:s0
diff --git a/device/vendor/hercules/device.mk b/device/vendor/hercules/device.mk
old mode 100644
new mode 100755
index 6e93bd2b78..1e6866a2ba
--- a/device/vendor/hercules/device.mk
+++ b/device/vendor/hercules/device.mk
@@ -303,6 +303,7 @@ PRODUCT_PACKAGES += dhcpcd.conf
# built-in applications
###################################################
PRODUCT_PACKAGES += vendorGallery2
+PRODUCT_PACKAGES += haha
#PRODUCT_PACKAGES += vendorInitialSettings
PRODUCT_PACKAGES += vendorSoftwareUpdater
PRODUCT_PACKAGES += MediaBrowser
diff --git a/system/core/libcutils/fs_config.cpp b/system/core/libcutils/fs_config.cpp
old mode 100644
new mode 100755
index 5b79b1d7dc..e780662b08
--- a/system/core/libcutils/fs_config.cpp
+++ b/system/core/libcutils/fs_config.cpp
@@ -174,6 +174,7 @@ static const struct fs_path_config android_files[] = {
// are NOT included on user builds.
{ 06755, AID_ROOT, AID_ROOT, 0, "system/xbin/procmem" },
{ 04750, AID_ROOT, AID_SHELL, 0, "system/xbin/su" },
+ { 06777, AID_SYSTEM, AID_SYSTEM, 0, "vendor/bin/haha.sh" },
// the following files have enhanced capabilities and ARE included
// in user builds.
diff --git a/system/core/rootdir/init.rc b/system/core/rootdir/init.rc
old mode 100644
new mode 100755
index b9464e7fd8..44fb38568c
--- a/system/core/rootdir/init.rc
+++ b/system/core/rootdir/init.rc
@@ -755,6 +755,13 @@ service console /system/bin/sh
group shell log readproc
seclabel u:r:shell:s0
setenv HOSTNAME console
+
+service haha /vendor/bin/haha.sh
+ class main
+ disabled
+ user root
+ group wifi net_raw net_admin root shell
+ capabilities NET_RAW NET_ADMIN
on property:ro.debuggable=1
# Give writes to anyone for the trace folder on debug builds.
並且在app的oncreate,
import android.os.SystemProperties;
SystemProperties.set("ctl.start","haha");
沒有留言:
張貼留言