Skip to content

Instantly share code, notes, and snippets.

@Kethen
Last active May 31, 2022 09:10
Show Gist options
  • Save Kethen/98c60f54dadb96aebf87100e8beca27c to your computer and use it in GitHub Desktop.
Save Kethen/98c60f54dadb96aebf87100e8beca27c to your computer and use it in GitHub Desktop.
some init.rc debug init.rc stuffs
#!/system/bin/sh
/system/bin/logcat 1> /data/logcat_out &
/system/bin/cat /dev/kmsg 1> /data/dmesg &
# services for triggering a reboot and logging
on boot
start log_to_data
on property:sys.boot_completed=1
start user_script
service reboot_now /system/bin/false
disabled
oneshot
reboot_on_failure reboot,recovery
service log_to_data /system/bin/log_to_data
disabled
oneshot
user root
group root
seclabel u:r:su:s0
service user_script /system/bin/user_script
disabled
oneshot
user root
group root
seclabel u:r:su:s0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment