Skip to content

Instantly share code, notes, and snippets.

@Geofferey
Last active October 10, 2019 03:43
Show Gist options
  • Save Geofferey/b854d82fd5ee71a5eb439d232a3622ef to your computer and use it in GitHub Desktop.
Save Geofferey/b854d82fd5ee71a5eb439d232a3622ef to your computer and use it in GitHub Desktop.
lineage/vendor/lineage/prebuilt/common/etc/init/lineage-system.rc (run in magisk context)
# LineageOS core functionality
on init
export ANDROID_CACHE /cache
export TERMINFO /system/etc/terminfo
on post-fs-data
mkdir /cache/recovery 0770 system cache
# Run sysinit
start sysinit
# Change permissions on fsck log so it can be added to the dropbox
chown root log /dev/fscklogs/log
chmod 0640 /dev/fscklogs/log
on boot
# Persistent properties (only created if persist exists)
mkdir /persist/properties 0770 system system
# sysinit (/system/etc/init.d)
service sysinit /system/bin/sysinit
user root
oneshot
disabled
# LineageOS core functionality
on init
export ANDROID_CACHE /cache
export TERMINFO /system/etc/terminfo
on post-fs-data
mkdir /cache/recovery 0770 system cache
# Run sysinit
start sysinit
# Change permissions on fsck log so it can be added to the dropbox
chown root log /dev/fscklogs/log
chmod 0640 /dev/fscklogs/log
on boot
# Persistent properties (only created if persist exists)
mkdir /persist/properties 0770 system system
# sysinit (/system/etc/init.d)
service sysinit /system/bin/sysinit
user root
oneshot
disabled
seclabel u:r:magisk:s0
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -p -B -z \
-o /data/user_de/0/com.android.shell/files/bugreports/bugreport
oneshot
disabled
keycodes 114 115 116
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/dumpstate -d -p -B -z \
-o /data/user_de/0/com.android.shell/files/bugreports/bugreport
oneshot
disabled
keycodes 114 115 116
@Geofferey
Copy link
Author

Geofferey commented Oct 10, 2019

Run init.d in magisk context
seclabel u:r:magisk:s0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment