diff --git a/rootdir/init-debug.rc b/rootdir/init-debug.rc index 435d4cb25..cac88fd3f 100644 --- a/rootdir/init-debug.rc +++ b/rootdir/init-debug.rc @@ -6,3 +6,10 @@ on property:persist.mmc.max_write_speed=* on property:persist.mmc.cache_size=* write /sys/block/mmcblk0/cache_size ${persist.mmc.cache_size} + +on early-init && property:ro.product.enforce_debugfs_restrictions=true + mount debugfs debugfs /sys/kernel/debug + chmod 0755 /sys/kernel/debug + +on property:sys.boot_completed=1 && property:ro.product.enforce_debugfs_restrictions=true + umount /sys/kernel/debug diff --git a/rootdir/init.rc b/rootdir/init.rc index 5a9cc993b..5fbdcd6df 100644 --- a/rootdir/init.rc +++ b/rootdir/init.rc @@ -985,9 +985,6 @@ on boot && property:ro.config.low_ram=true write /proc/sys/vm/dirty_expire_centisecs 200 write /proc/sys/vm/dirty_background_ratio 5 -on property:sys.boot_completed=1 && property:ro.product.enforce_debugfs_restrictions=true - umount /sys/kernel/debug - on boot # basic network init ifup lo @@ -1263,10 +1260,6 @@ on userspace-reboot-resume on property:sys.boot_completed=1 && property:sys.init.userspace_reboot.in_progress=1 setprop sys.init.userspace_reboot.in_progress "" -on early-init && property:ro.product.enforce_debugfs_restrictions=true - mount debugfs debugfs /sys/kernel/debug - chmod 0755 /sys/kernel/debug - # Migrate tasks again in case kernel threads are created during boot on property:sys.boot_completed=1 copy_per_line /dev/cpuctl/tasks /dev/cpuctl/system/tasks