summaryrefstree
path: root/system/init.sony-crashhandling.rc
blob: 92d741c004e90f5c1491a6b0f86a2dc81c02c9fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
# Copyright (C) 2017 Sony Mobile Communications Inc.
# All rights, including trade secret rights, reserved.
#

#
# init.sony-crashhandling.rc
#

on init
    # mount tmpfs to /tmp
    mount tmpfs tmpfs /tmp nosuid mode=0755,uid=0,gid=0
    chmod 0664 /proc/rdtag
    chown root system /proc/rdtag

on post-fs-data
    # SONY: Create directory for partial dump
    mkdir /data/crashdata 0770 root system

    # Restore the security context for dump directories
    # TODO: FOR TREBLE ADOPTION
    exec u:r:restorecon:s0 -- /vendor/bin/restorecon -RF /data/crashdata/

    # Create directory to store logs
    mkdir /data/system/log 0770 root system
    chown root system /data/system/log
    chmod 0770 /data/system/log